• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

NUL char failure with Postfix

NicolasC

New Pleskian
Hi,

Version : 9.2.2 / Debian 4.0

I recently received a lot a failure messages in my postmaster mailbox :

Transcript of session follows.

Out: 220 mx.********.fr : ********.fr MX
In: EHLO **********
Out: 250-mx.********.fr
Out: 250-PIPELINING
Out: 250-SIZE 20971520
Out: 250-VRFY
Out: 250-ETRN
Out: 250-XFORWARD NAME ADDR PROTO HELO SOURCE
Out: 250-ENHANCEDSTATUSCODES
Out: 250-8BITMIME
Out: 250 DSN
In: MAIL FROM:<nicolas@********.com>
Out: 250 2.1.0 Ok
In: RCPT TO:<admin@********.fr>
Out: 250 2.1.5 Ok
In: DATA
Out: 354 End data with <CR><LF>.<CR><LF>
Out: 451 4.3.0 Error: queue file write error

Session aborted, reason: lost connection

While scanning the tcp communication, I finally noticed there was a NUL char (0x00h) in the e-mails generating this error.

I tried to add the "message_strip_characters = \0" statement in the postfix main.cf but it looks useless as postfix seems to directly pass the data to the plesk postfix-queue (before-queue).

I then replaced the :

smtp inet n - - - - smtpd -o smtpd_proxy_filter=127.0.0.1:10025

by :

smtp inet n - - - - smtpd -o content_filter=remove00:
remove00 unix - n n - - pipe
flags=DORhu user=mhandlers-user argv=/etc/postfix/remove00.pl ${recipient} ${sender}

remove00.pl simply scans the data, remove the NUL char(s) and sends the result via SMTP to the 10025 port. Then, the plesk postfix-queue (before-queue) acts normally and the message can be delivered.

Therefore, I think this is the plesk postfix-queue (before-queue) that cannot support the NUL char.

This is easy to reproduce this issue by sending a mail containing a NUL char.

Thanks
Best regards
 
Could you please provide records related to the mail transaction from /usr/local/psa/var/log/maillog ?

The problem may be a known one. It is that Postfix MTA segmentation faults upon postfix-queue execution when processing a message that contains a string of more than 4096 symbols long.

Please find details in this KB article: http://kb.odin.com/en/6394
 
Hi,

Here is the log output :

08-14 11:29:50 (+02:00) postfix/master[21073]: daemon started -- version 2.3.8, configuration /etc/postfix
08-14 11:30:02 (+02:00) postfix/smtpd[21152]: connect from ********.org[87.***.***.***]
08-14 11:30:03 (+02:00) postfix/smtpd[21152]: warning: ***.***.***.87.dun.dnsrbl.net: RBL lookup error: Host or domain name not found. Name service error for name=***.***.***.87.dun.dnsrbl.net type=A: Host not found, try again
08-14 11:30:03 (+02:00) postfix/smtpd[21170]: connect from localhost.localdomain[127.0.0.1]
08-14 11:30:03 (+02:00) postfix/smtpd[21152]: NOQUEUE: client=********.org[87.***.***.***]
08-14 11:30:05 (+02:00) postfix/smtpd[21170]: warning: 1.0.0.127.dun.dnsrbl.net: RBL lookup error: Host or domain name not found. Name service error for name=1.0.0.127.dun.dnsrbl.net type=A: Host not found, try again
08-14 11:30:05 (+02:00) postfix/smtpd[21170]: BFBDD700757: client=********.org[87.***.***.***]
08-14 11:30:05 (+02:00) postfix/cleanup[21178]: BFBDD700757: message-id=<DE0FC5CBE0564C9281DE923962B4CC98@ASUS2Coeurs>
08-14 11:30:24 (+02:00) postfix/smtpd[21210]: connect from ********.org[87.***.***.***]
08-14 11:30:24 (+02:00) postfix/smtpd[21210]: disconnect from ********.org[87.***.***.***]
08-14 11:31:45 (+02:00) postfix/smtpd[21152]: warning: timeout talking to proxy 127.0.0.1:10025
08-14 11:31:45 (+02:00) postfix/spawn[21165]: warning: command /usr/lib/plesk-9.0/postfix-queue exit status 255
08-14 11:31:45 (+02:00) postfix/spawn[21167]: warning: command /usr/lib/plesk-9.0/postfix-queue exit status 255
08-14 11:31:45 (+02:00) postfix/smtpd[21170]: lost connection after DATA from localhost.localdomain[127.0.0.1]
08-14 11:31:45 (+02:00) postfix/smtpd[21170]: disconnect from localhost.localdomain[127.0.0.1]
08-14 11:31:45 (+02:00) postfix/cleanup[21178]: CF18A700757: message-id=<20090814093145.CF18A700757@mx.********.fr>
08-14 11:31:45 (+02:00) postfix/smtpd[21152]: disconnect from ********.org[87.***.***.***]
08-14 11:31:45 (+02:00) postfix/qmgr[21080]: CF18A700757: from=<double-bounce@mx.********.fr>, size=1019, nrcpt=1 (queue active)
08-14 11:31:45 (+02:00) postfix/pipe[21413]: CF18A700757: to=<admin@********.fr>, orig_to=<postmaster>, relay=plesk_virtual, delay=0.11, delays=0.02/0/0/0.08, dsn=2.0.0, status=sent (delivered via plesk_virtual service)
08-14 11:31:45 (+02:00) postfix/qmgr[21080]: CF18A700757: removed

I don't think this is the same problem as if I send the exactly same message without the NUL char, it works.

I attached the sample mail with the NUL char. I found this problem because of a French Internet provider "Club-Internet". It seems when a customer of Club-Internet automatically forwards his mails received @club-internet.fr to our Plesk server, the Club-internet MX adds a NUL char at the end of the DATA (just before "." and QUIT SMTP commands). On servers not having Plesk, the messages arrive. But with Plesk, it's always failure with the "postfix-queue exit status 255" message

Thanks for your help
 

Attachments

  • NUL_char.msg.gz
    558 bytes · Views: 5
Thank you very much for letting us know about the probelm.
I have reported the problem with all details to Parallels Plesk Develoeprs for double check and fix.
 
Back
Top