Postfix in Plesk: Out: 451 4.3.0 Error: queue file write error

Mattias Geniar, Tuesday, August 2, 2011 - last modified: Sunday, February 19, 2012

As the administrator of a Linux server running the Plesk Controlpanel, you may receive e-mails like this if you're running Plesk 9.x.

Transcript of session follows.
Out: 220 [hostname] ESMTP Postfix
In:  HELO 77.73.99.106
Out: 250 [hostname]
In:  MAIL FROM: <[FROM-address]>
Out: 250 2.1.0 Ok
In:  RCPT TO: <[TO-address]>
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

Disk space & mailbox quota

Check if you still have sufficient disk space on the server, and if the mailquota of the user that is supposed to receive this mail has not been reached.

Check the disk usage.

# df -h

And see the total mailbox quota of that user.

# du -hs /var/qmail/mailnames/[DOMAIN]/[USER]/

If the disk is either full, or the user has reached its quota, the same error message can occur.

Command time limit exceeded

There's a few things you can check to troubleshoot it. First, see if any of the following messages are found in the /usr/local/psa/var/log/maillog logfile.

# cd /usr/local/psa/var/log
# grep -P 'exit status' maillog
Jul 26 04:04:42 [hostname] postfix/spawn[7213]: warning: command /usr/lib64/plesk-9.0/postfix-queue exit status 255
Jul 26 04:04:42 [hostname] postfix/spawn[7215]: warning: command /usr/lib64/plesk-9.0/postfix-queue exit status 255
Jul 26 07:08:29 [hostname] postfix/spawn[19951]: warning: command /usr/lib64/plesk-9.0/postfix-queue exit status 255
Jul 26 09:26:31 [hostname] postfix/spawn[25609]: warning: command /usr/lib64/plesk-9.0/postfix-queue exit status 255
Jul 26 09:35:19 [hostname] postfix/spawn[25984]: warning: command /usr/lib64/plesk-9.0/postfix-queue exit status 255
Jul 26 09:35:19 [hostname] postfix/spawn[25982]: warning: command /usr/lib64/plesk-9.0/postfix-queue exit status 255

If you see those messages, do a search for the ID found in the spawn[ID] in the logs. See the underlined above.

# cd /usr/local/psa/var/log
# grep -P 25982 maillog
Jul 26 08:51:55 [hostname] postfix/spawn[25982]: warning: /usr/lib64/plesk-9.0/postfix-queue: process id 26095: command time limit exceeded
Jul 26 09:35:19 [hostname] postfix/spawn[25982]: warning: command /usr/lib64/plesk-9.0/postfix-queue exit status 255

If you get the above message, with command time limit exceeded, there's a known fix from Parallels in KB #6074. The default timeout from Postfix is 30 seconds, but that may be insufficient when you're retrieving large mails with attachments from slow hosts.

File permissions on postfix-queue

Check the file permissions on the postfix-queue file, they should be similar to this.

# ls -alh /usr/lib64/plesk-9.0/postfix-queue
-r-xr-x--- 1 mhandlers-user popuser 77K May  4  2010 /usr/lib64/plesk-9.0/postfix-queue

If you run a 32-bit linux, the file will be in the lib directory instead of lib64.

# ls -alh /usr/lib/plesk-9.0/postfix-queue
-r-xr-x--- 1 mhandlers-user popuser 77K May  4  2010 /usr/lib64/plesk-9.0/postfix-queue

Adjust the file permissions accordingly.

Nameservers in /etc/resolv.conf

The same problem can occur the nameservers in your /etc/resolv.conf are invalid, causing all DNS lookups to take extremely long and thus causing a timeout in the Postfix services.

Check each nameserver listed there, and see if they respond as you would expect them to.

# dig @[IP] google.be

If the response takes more than 30 seconds, consider removing that nameserver.

Disabling anti-spam routing Postfix

If you're still experiencing the problem, go into /etc/postfix/master.cf and search for the line beginning with "smtp inet", usually at the very top.

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

And change that to

smtp inet n - n - - smtpd

And restart your Postfix.

# /etc/init.d/postfix restart

This effectively disables anti-spam (regardless of what your Plesk may say), to be able to exclude that as the source of the problems.



Hi! My name is Mattias Geniar. I'm a Support Manager at Nucleus Hosting in Belgium, a general web geek & public speaker. Currently working on DNS Spy & Oh Dear!. Follow me on Twitter as @mattiasgeniar.

Share this post

Did you like this post? Will you help me share it on social media? Thanks!

Comments

Shadus Wednesday, January 11, 2012 at 00:22 - Reply

Also– sometimes plesk doesn’t look in the right place, an occasional fix is


cd /usr/lib
ln -s ../lib64/plesk-9.0


situs judi online terbaik Tuesday, May 5, 2015 at 15:08 - Reply

Hi! I could have sworn I’ve vsited this blog before but after browsing through some of
the posts I realized it’s new to me. Regardless, I’m definitely happy
I came across it and I’ll be book-marking it and checking
back regularly!


Leave a Reply

Your email address will not be published. Required fields are marked *