Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: ngmdat on June 30, 2015, 05:05:55 AM

Title: Today my RoundCube suddenly undeliverable attachments
Post by: ngmdat on June 30, 2015, 05:05:55 AM
Hi Everyone,

Today my RoundCube suddenly undeliverable attachments.

when I upload to send an error occurred in <$ RoundCube> / logs / errors:
file_get_contents(): Filename cannot be empty in /var/www/roundcubemail-1.1.2/plugins/redundant_attachments/redundant_attachments.php on line 104.

Thanks for any advices.
Regards,
NgMDat.
Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: SKaero on June 30, 2015, 10:22:45 AM
Make sure your temp directories are writable.
Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: ngmdat on June 30, 2015, 12:12:29 PM
Hi SKaero,

Thanks for your advice,
I confirmed then i saw "tempname" of uploaded files was created, but them size = 0.

Regards,
NgMDat
Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: SKaero on June 30, 2015, 12:51:51 PM
Does it work if you disable the redundant_attachments plugin?
Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: ngmdat on June 30, 2015, 01:08:11 PM
After disable the 'redundant_attachments' plugin
it didn't work (create size=0 file)
and roundcube client display error dialog with following message:

     [File upload failed.]

Regards,
NgMDat.
Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: SKaero on June 30, 2015, 06:25:49 PM
Are there any errors in the web server log? Do you a space quota that has been exceeded?
Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: ngmdat on June 30, 2015, 09:08:28 PM
Thanks for your response.

There are no error in web-server log and have a lot of disk space for my centos box.

After executing "yum update" I think that something affected to roundcube but i don't know what and where.

Regards,
NgMDat.
Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: ngmdat on July 07, 2015, 09:49:26 PM
Hi everyone

I still not resolve this issue yet,
thanks for any idea ?

Regards,
NgMDat.
Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: ngmdat on July 11, 2015, 08:53:14 AM
Hi Everyone,

After tracing roundcube upload process, i know that following code was reason of issue.
It take a lot time to find out.
Is it bug or special function ?
 
    <$ROUNDCUBE>/plugins/database_attachments/database_attachments.php

    /**
     * Save a newly uploaded attachment
     */
    function upload($args)
    {
        $args['status'] = false;
        ...

        if ($status) {
            $args['id']     = $key;
            $args['status'] = true;
            $args['path']   = null;       <---- it clear the path of temp file uploaded from client.
        }

        return $args;
    }
Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: SKaero on July 11, 2015, 10:16:25 AM
It should do that since at that point the attachment should be cached in the database.
Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: ngmdat on July 11, 2015, 11:26:20 AM
Hi SKaero,

Thanks for your comment.

If I disable that line, roundcube will send mail with attachments as expected.

      ...
      if ($status) {
            $args['id']     = $key;
            $args['status'] = true;
            // $args['path']   = null;       <---- disable this line.
      }
      ...

Something's wrong with that way to resolve this issue, isn't it ?

Regards,
NgMDat.


Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: SKaero on July 11, 2015, 06:09:46 PM
Do you have both the redundant_attachments and database_attachments plugins enabled?
Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: ngmdat on July 11, 2015, 07:45:31 PM
Yes, with default configuration, i have both of them enabled..
Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: SKaero on July 12, 2015, 09:11:17 AM
I think that maybe your problem, redundant_attachments stores in both the file system and the database, database_attachments just stores in the database. If database_attachments has already handled the attachment then its not available for the redundant_attachments plugin.
Title: Re: Today my RoundCube suddenly undeliverable attachments
Post by: ngmdat on July 12, 2015, 12:19:36 PM
Thanks for your advice,

when i disable database_attachments plugin, roundcube work fine.

I like to close this issue.

Thanks your time and dedication.
Regards,
NgMDat.