Postfix Troublehooting Errors

October 1, 2008 Troubleshooting

One of the best ways to begin troubleshooting is to check your logs.  Here is a script that you can create that provides a timestamp of the current problems and then will email you that data to a a chosen email account.

#!/bin/sh
# Check Logs, Mail Output with Timestamp
TIMESTAMP=`date +%Y%m%d_%H%M%S`;
echo $TIMESTAMP
egrep  ‘(warning|error|fatal|panic):’ /var/log/maillog > /root/mail_$TIMESTAMP
cat /root/mail_$TIMESTAMP | /usr/sbin/sendmail -f root someuser@example.com

Warning -  This is an error that will not stop Postfix but that should be fixed.  However, there may be warning errors that are a problem but not specific to Postfix, like DNS errors.

Error -  Again this will not prevent Postfix from starting but after 13 errors, Postfix is designed to not start, so pay attention to these errors.
Fatal – These are errors that involve a bad configuration, incorrect permissions or a software issue that could be fixed.  These are errors that you need to do some research on to solve the problem.
Panic – These are errors with the software  that likely you cannot fix unless you recompile the program differently.  Postfix will not start until these are fixed.

Tags: ,

Comments (1)

 

  1. dknight says:

    Script worked perfectly. Thanks