#1487997 closed Bugs (invalid)

mail messages with attachments send improperly

Reported by: mathog Owned by:
Priority: 5 Milestone: later
Component: Other Version: 0.5.3
Severity: normal Keywords:
Cc:

Description

Roundcube is working well on our x86_64 system in all ways so far tested EXCEPT that it cannot send attachments. The attachment appears to upload normally. The issue I am seeing might be the result of a protection problem associated with the attachment, but I could not figure out where they were being temporarily stored to check on that.

In any case, sending an mail with an attachment (size doesn't matter, 2kb or 0.5MB) results in the following problems:

  1. in /var/log/roundcubemail/errors

[14-Jul-2011 10:01:45] PHP Warning: strlen() expects parameter 1 to be string, resource given in /usr/share/pear/Net/SMTP.php on line 913

(there is a corresponding line in /var/log/roundcubemail/sendmail but it does not indicate any problems, having the exact same format [ "250 OK" ] as for mail without attachments.)

The line in question is:

            if (strlen($data) >= $this->_esmtp['SIZE']) {

  1. The message is sent but is horribly corrupted.

Subject becomes: N/A

Original message body is replaced by: Resource id #71

To: becomes: undisclosed recipients:;

(on previous line, the colon semicolon are as shown)

There is no attachment.

Change History (3)

comment:1 Changed 23 months ago by mathog

Have located where the attachments are being stored. They go into files like

-rw-r--r-- 1 apache apache 1709 2011-07-14 10:32 rcmAttmntvMGFH2

in /tmp. Did a chmod 777 on this one, and then sent it, and the same error was found. The
protection on /tmp itself is:

drwxrwxrwt 8 root adm 4096 2011-07-14 10:40 ./

comment:2 Changed 23 months ago by mathog

Upgraded from

php-pear-Net_SMTP-1.3.3-2mdv2010.0.noarch

to

php-pear-Net_SMTP-1.6.0-1-mdv2011.0.noarch.rpm

restarted the web server, and the problem went away. Looks like it was a bug in the older version of this module.

comment:3 Changed 22 months ago by alec

  • Resolution set to invalid
  • Status changed from new to closed

Required packages versions are listed in INSTALL file.

Note: See TracTickets for help on using tickets.