Add to Favourites Add to Favourites    Print this Article Print this Article

Postfix cannot send e-mails with attachments

Symptoms:
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[1331]: handlers_stderr: PASS
Dec 18 18:28:45 plesk before-queue[1331]: errno: Broken pipe
Dec 18 18:28:45 plesk before-queue[1331]: System error: Broken pipe
Dec 18 18:28:45 plesk before-queue[1331]: Unable to write data to stream
Dec 18 18:28:45 plesk before-queue[1331]: Some error occured
Dec 18 18:28:45 plesk postfix/spawn[919]: warning: command /usr/lib64/plesk-9.0/postfix-queue exit status 255

How do I resolve the problem?

Cause:
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.

Resolution:
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.

Was this answer helpful?

Also Read