Checking the Mail Log


Browse by products and services

  • Applies to: All DV
    • Difficulty: Medium
    • Time Needed: 20
    • Tools Required: SSH, root access

Overview

This guide will help beginners on the DV server find and view their email log file(s).

Requirements

READ ME FIRST

This article is provided as a courtesy. Installing, configuring, and troubleshooting third-party applications is unsupported by (mt) Media Temple. Please take a moment to review the Statement of Support.

Instructions

In order to see the mail log files, you should be logged into SSH as root.

For Plesk Users:

The email log is located in the following directory:

/usr/local/psa/var/log/

You can use the following command to view your mail log:

tail -f /usr/local/psa/var/log/maillog 

To search for a particular string:

grep someone@example.com /usr/local/psa/var/log/maillog |more 

Here's a typical log sequence showing the complete transmission of one piece of mail:

Oct  3 16:50:19 dv qmail: 1223077819.930048 new msg 163786382
Oct  3 16:50:19 dv qmail: 1223077819.930096 info msg 163786382: bytes 860 from <> qp 24106 uid 2522
Oct  3 16:50:19 dv qmail: 1223077819.937789 starting delivery 2: msg 163786382 to local 2-user@example.com
Oct  3 16:50:19 dv qmail: 1223077819.937835 status: local 1/10 remote 0/20
Oct  3 16:50:19 dv qmail-local-handlers[24107]: Handlers Filter before-local for qmail started ...
Oct  3 16:50:19 dv qmail-local-handlers[24107]: from=
Oct  3 16:50:19 dv qmail-local-handlers[24107]: to=user@example.com
Oct  3 16:50:20 dv qmail: 1223077820.159866 delivery 2: success: did_0+0+2/
Oct  3 16:50:20 dv qmail: 1223077820.160087 status: local 0/10 remote 0/20
Oct  3 16:50:20 dv qmail: 1223077820.160159 end msg 163786382 




For cPanel Users: 

Email logs are located in the following directory:

/var/log/ 

You can use the following command to view your mail log:

less /var/log/maillog 

To search for a particular string:

exigrep example.com /var/log/exim_mainlog

Here's an example of what a complete email transmission looks like when printed out using exigrep:

 2015-11-03 11:39:56 1ZthQy-000586-3x <= newtest@example.com H=localhost (pyxv-qnqd.accessdomain.com) [127.0.0.1]:42112 P=esmtpa A=dovecot_login:newtest@example.com S=597 id=33bac78ae03ebe8bb6ec5e545864caf6@example.com T="Hiya!" for norepmt@gmail.com
2015-11-03 11:39:56 1ZthQy-000586-3x SMTP connection outbound 1446579596 1ZthQy-000586-3x example.com norepmt@gmail.com
2015-11-03 11:39:56 1ZthQy-000586-3x => norepmt@gmail.com R=dkim_lookuphost T=dkim_remote_smtp H=gmail-smtp-in.l.google.com [173.194.203.27] X=TLSv1.2:ECDHE-RSA-C="250 2.0.0 OK 1446579596 fk5si44423567pbd.33 - gsmtp" 2015-11-03 11:39:56 1ZthQy-000586-3x Completed