Bug#688853: dspam: long line in message body causes '530 5.2.0 Message is empty. Aborting.'
severity 688853 normal retitle 688853 Incorrect error message when a line is too long in a message thanks Le jeudi 27 septembre 2012 07:23:49, Andrey a écrit : 'Broken pipe' error occurs in Exim because Dspam just drops connection while Exim trying to send data to the socket though 530 reply occurs also. I don't know whether this is the SMTP RFC rules? And this behavior causes delay and retries to send email to the other Dspam users. AFAIK it's legal. See [1]. You can send an error when message is too big or when a line is too long and this necessarily happen before all data are sent. Hence there is no problem on dspam part except that the error message should be different. [1] http://tools.ietf.org/html/rfc5321#section-4.5.3.1.9 I'm thus changing the bug title and severity. Feel free to duplicate it to exim if you think there is a bug in exim (either because it doesn't handle the error correctly at all or because only default configuration doesn't handle it). Best regards, Thomas Preud'homme signature.asc Description: This is a digitally signed message part.
Bug#688853: dspam: long line in message body causes '530 5.2.0 Message is empty. Aborting.'
Package: dspam Version: 3.10.1+dfsg-3~bpo60+1 Severity: critical dspam sends '530 5.2.0 Message is empty. Aborting.' while receiving incorrect spam message with long-long line, for example with length about 300K bytes: Content-Type: application/octet-stream; name=Pricediler.xls Content-Transfer-Encoding: base64 Content-Disposition: attachment 0M8R4KGxGuEAPgADAP7/CQAGAAAJTwQAEAAA/v///wD+AEYEAA...(whole length of the line is about 300K bytes) It causes MTA (exim in my case) to fail with 'Broken pipe' message for dspam router and use retries to send other emails to other recepients, so messages are deferred and delivered with delay. -- System Information: Debian Release: 6.0.5 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores) Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#688853: dspam: long line in message body causes '530 5.2.0 Message is empty. Aborting.'
Le mercredi 26 septembre 2012 11:07:09, vous avez écrit : Package: dspam Version: 3.10.1+dfsg-3~bpo60+1 Severity: critical dspam sends '530 5.2.0 Message is empty. Aborting.' while receiving incorrect spam message with long-long line, for example with length about 300K bytes: From what I read so far, dspam only reads a maximum of 1023 bytes per line but discard the whole line after that. I guess because of this it must be confuse by the quantity of bytes read and continues to read when there is no more data. The error you mention is raised by dspam when a message is empty. I'll continue to investigate. Thomas signature.asc Description: This is a digitally signed message part.
Bug#688853: dspam: long line in message body causes '530 5.2.0 Message is empty. Aborting.'
severity 688853 grave thanks Le mercredi 26 septembre 2012 14:40:20, Thomas Preud'homme a écrit : Le mercredi 26 septembre 2012 11:07:09, vous avez écrit : Package: dspam Version: 3.10.1+dfsg-3~bpo60+1 Severity: critical dspam sends '530 5.2.0 Message is empty. Aborting.' while receiving incorrect spam message with long-long line, for example with length about 300K bytes: From what I read so far, dspam only reads a maximum of 1023 bytes per line but discard the whole line after that. I guess because of this it must be confuse by the quantity of bytes read and continues to read when there is no more data. The error you mention is raised by dspam when a message is empty. I'll continue to investigate. Sorry I read to fast. What happen is that dspam read data from the socket by block of 1023 bytes and then search for a line in it by searching for the newline character with strchr. If it doesn't find a newline character, it returns NULL in cascade from pop_buffer up to read_sock through daemon_getline. When this returns NULL, it consider there is an error and return the error you saw. I didn't think much about it yet but I think a solution should be easy. Thomas signature.asc Description: This is a digitally signed message part.
Bug#688853: dspam: long line in message body causes '530 5.2.0 Message is empty. Aborting.'
Yes, I see in daemon_getline() function in daemon.c it tries to read buf[1024] with some timeout and get. But it seems that read_sock() returns NULL message. 26.09.2012 16:40, Thomas Preud'homme пишет: Le mercredi 26 septembre 2012 11:07:09, vous avez écrit : Package: dspam Version: 3.10.1+dfsg-3~bpo60+1 Severity: critical dspam sends '530 5.2.0 Message is empty. Aborting.' while receiving incorrect spam message with long-long line, for example with length about 300K bytes: From what I read so far, dspam only reads a maximum of 1023 bytes per line but discard the whole line after that. I guess because of this it must be confuse by the quantity of bytes read and continues to read when there is no more data. The error you mention is raised by dspam when a message is empty. I'll continue to investigate. Thomas -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#688853: dspam: long line in message body causes '530 5.2.0 Message is empty. Aborting.'
'Broken pipe' error occurs in Exim because Dspam just drops connection while Exim trying to send data to the socket though 530 reply occurs also. I don't know whether this is the SMTP RFC rules? And this behavior causes delay and retries to send email to the other Dspam users. 26.09.2012 17:22, Andrey пишет: Yes, I see in daemon_getline() function in daemon.c it tries to read buf[1024] with some timeout and get. But it seems that read_sock() returns NULL message. 26.09.2012 16:40, Thomas Preud'homme пишет: Le mercredi 26 septembre 2012 11:07:09, vous avez écrit : Package: dspam Version: 3.10.1+dfsg-3~bpo60+1 Severity: critical dspam sends '530 5.2.0 Message is empty. Aborting.' while receiving incorrect spam message with long-long line, for example with length about 300K bytes: From what I read so far, dspam only reads a maximum of 1023 bytes per line but discard the whole line after that. I guess because of this it must be confuse by the quantity of bytes read and continues to read when there is no more data. The error you mention is raised by dspam when a message is empty. I'll continue to investigate. Thomas -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org