Knowledgebase: Dedicated Servers
How do I check the mail logs on my Plesk Linux server?
Posted by Michael Upton on 02 March 2009 11:28 AM
If for whatever reason you're not receiving emails to your Plesk server that you know have been successfully sent by the external party it's worth checking the mail logs to see if the emails reached your server and the reason they were not delivered to the intended mailbox.|
To do this on a Linux server open an SSH session to your server and issue the following command to see the current latest mail log -
This will open the mail log in a viewer. In here you can issue a few commands to navigate your way around the log.
If you press SHIFT + G it will take you to the bottom of the log file, the bottom of the file contains the newest entries. Pressing G will take you back to the top.
To search for a specific string of text like an email address press / and enter the string of text you wish to search for and press enter. Search results will be highlighted. To search back up to a few weeks previous please change directory you are viewing to /usr/local/psa/var/log/ and see all the "maillog" files with extentions on the end such as .1, .2 etc.
To exit viewing the log files via the 'less' command press the Q button on your keyboard to exit.
You can also view the log file in a way that will print in your SSH session the newest additions added to your log file in a live view way. To do this we use the 'tail' command. Issue the following command to do this -
tail -f /usr/local/psa/var/log/maillog
Your SSH session will now print all new additions to your log file for up-to-date analysis. To exit from this press CTRL + C