Postfix cannot send e-mails with attachments
Parallels Plesk Panel version 9.0 is running with Postfix MTA.
E-mails with big attachments cannot be sent from the server. The following error is shown in mailog $PRODUCT_ROOT_D/var/log/maillog:
Dec 18 18:28:45 plesk before-queue: handlers_stderr: PASS
Dec 18 18:28:45 plesk before-queue: errno: Broken pipe
Dec 18 18:28:45 plesk before-queue: System error: Broken pipe
Dec 18 18:28:45 plesk before-queue: Unable to write data to stream
Dec 18 18:28:45 plesk before-queue: Some error occured
Dec 18 18:28:45 plesk postfix/spawn: warning: command /usr/lib64/plesk-9.0/postfix-queue exit status 255
How do I resolve the problem?
The error is caused by timeout received by postfix-queue during processing messages.
It is supposed that email messages are sent within 30 seconds. Utility postfix-queue is compiled with timeout value 30 seconds in Parallels Plesk Panel 9.0.
If sending lasts more then 30 seconds the procedure fails due to timeout.
Recompiled postfix-queue with timeout value 300 seconds (5 minutes) for Parallels Plesk Panel 9.0 is attached.
To install postfix-queue it is recommended to download the archive attached and unpack it with tar -zxf. In resulted directory find file postfix-queue appropriate to your operating system and architecture. The archive contains recompiled binary for all operating systems supported by Parallels Plesk Panel 9.0.
Replace existent file postfix-queue with one you have found. The location is defined by Plesk variable $PLESK_LIBEXEC_DIR. It may be /usr/lib/plesk-9.0/, /usr/lib64/plesk-9.0/ or /usr/local/libexec/plesk-9.0 according to your operating system and architecture. Look into this article to define the variable: http://kb.parallels.com/en/5794.
Do not forget to correct ownership and permissions. It should be mhandlers-user:popuser, 550.
You may correct permissions with commands chown and chmod. For example for CentOS5 32bit:
~# chown mhandlers-user:popuser /usr/lib/plesk-9.0/postfix-queue
~# chmod 550 /usr/lib/plesk-9.0/postfix-queue
Timeout value 300 seconds should be enough to process messaged up to 10M in size and normal server loading.
The recompiled utility with timeout value 300 seconds is included to Parallels Plesk Panel since version 9.2.
If messages cannot be sent within 300 seconds the same error occurs. To resolve the problem it is recommend to improve server loading.