Author Topic: Today my RoundCube suddenly undeliverable attachments  (Read 8239 times)

Offline ngmdat

  • Newbie
  • *
  • Posts: 9
Today my RoundCube suddenly undeliverable attachments
« 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.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #1 on: June 30, 2015, 10:22:45 AM »
Make sure your temp directories are writable.

Offline ngmdat

  • Newbie
  • *
  • Posts: 9
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #2 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

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #3 on: June 30, 2015, 12:51:51 PM »
Does it work if you disable the redundant_attachments plugin?

Offline ngmdat

  • Newbie
  • *
  • Posts: 9
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #4 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.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #5 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?

Offline ngmdat

  • Newbie
  • *
  • Posts: 9
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #6 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.

Offline ngmdat

  • Newbie
  • *
  • Posts: 9
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #7 on: July 07, 2015, 09:49:26 PM »
Hi everyone

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

Regards,
NgMDat.

Offline ngmdat

  • Newbie
  • *
  • Posts: 9
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #8 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;
    }

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #9 on: July 11, 2015, 10:16:25 AM »
It should do that since at that point the attachment should be cached in the database.

Offline ngmdat

  • Newbie
  • *
  • Posts: 9
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #10 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.



Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #11 on: July 11, 2015, 06:09:46 PM »
Do you have both the redundant_attachments and database_attachments plugins enabled?

Offline ngmdat

  • Newbie
  • *
  • Posts: 9
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #12 on: July 11, 2015, 07:45:31 PM »
Yes, with default configuration, i have both of them enabled..

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #13 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.

Offline ngmdat

  • Newbie
  • *
  • Posts: 9
Re: Today my RoundCube suddenly undeliverable attachments
« Reply #14 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.