The Postfix Cheat Sheet

mail-iconI recently had some trouble with my postfix mail service. Not knowing where to being looking for log files and restart commands, I thought this quick cheat sheet would come in handy in the future:

Starting and Stopping

On CentOS we can speak to postfix like this:

The this command re-reads the configuration files. Note that there is no restart command – you have to stop and then start the service again manually.

Log Files

On CentOS 6.5 I could find the log files in /var/log/maillog (that’s a file not a directory). Other installations may have it in /var/log/mail. Refer to your own /etc/syslog.conf file for the exact location.

To display log events life we can make use of tail -f

Alternatively we can come through the entire log and display the tricky bits:

Note that log files are rotated – what you’re looking for may be hiding in other log files (such as maillog-201xxxxx).

Postfix in Plesk

If you’re using Plesk then you can see the individual components of the service under Tools and Settings (or Server if you’re using Power User View) – Services Management. You can start/stop/restart each aspect from here.

Sometimes the SMTP service appears to be offline even though it’s running. This can happen on CentOS. It’s nothing to worry about – simply restart the service from the command line as explained above and it should show up fine in Plesk.

Screen Shot 2014-03-10 at 14.51.03

Further Reading

If you have any further ideas, please let me know in a comment below.

About Jay Versluis

Jay is a medical miracle known as a Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

Add your voice!