Unable to send mail via postfix. Messages get stuck in queue

Created:

2016-11-16 13:01:31 UTC

Modified:

2017-07-13 02:28:27 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to send mail via postfix. Messages get stuck in queue

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

Unable to send mail via postfix. Messages get stuck in the queue:

# postqueue -p | grep -a1 example.com 
94F7D600CB2D3* 957 Thu Jul 9 12:39:21 test@example.com
test1@example1.com

--
70D8460C37CE7* 934 Thu Jul 9 13:02:10 test@example.com
test1@example1.com

Cause

Postfix actively uses hostname getting from OS. As described at postix.com .

Postfix tries to get domain name by gethostname() posix call. But gethostname() checks FQDN hostname and returns error (the same error in newaliases output). As result postfix couldn't process e-mails in qmgr because of FQDN hostname used as a default value for many other configuration parameters.

Resolution

Set correct hostname like example.com in:

#vi /etc/hostname
#vi /etc/hosts
Have more questions? Submit a request
Please sign in to leave a comment.