After switching over the Purple Monkey Studio servers to Sentora I noticed that system email notifications from cron jobs and various other utilities we have installed were not being delivered. A quick check of the mail queue (mailq) on one of the servers showed errors in the messages being delivered.
C5048A0EC8 2713 Thu Oct 22 11:30:51 MAILER-DAEMON
(mail for delta.pmhost.xyz loops back to myself)
On our servers we redirect all root email via the aliases file to an external email address. Sentora’s install of postfix does not allow for the server’s name in the destination. Since this is a sub-domain of our main domain we do not want to setup the entire sub-domain as a mail host.
The fix is easy, a quick modification to the postfix configuration file located at /etc/postfix/main.cf
Look for the line specifying the destinations allowed:
mydestination = localhost.$mydomain, localhost
Correct this line to include your server’s hostname as well:
mydestination = delta.pmhost.xyz, localhost.$mydomain, localhost
At this point you can either wait for the mail queue to reattempt delivery of any messages pending in the queue or you can force a retry using the postfix flush command.