Exim trouble shooting maillog file


View full summary of mail activity from the Exim mail log

eximstats /var/log/exim4/mainlog | less

Viewing messages in the Exim mail queue

  1. Login to your server via SSH as the root user.
  2. Run the following command to view the current Exim mail queue:exim -bpYou should get back something that looks like:

    8m 13K 1TwJgO-0001q8-E5 <sender@example.com> *** frozen ***

    7m 7.5K 1TwJhK-00037o-U8 <sender@example.com> *** frozen ***

    5m 8.0K 1TwJic-00047T-70 <sender@example.com> *** frozen ***

    3m 7.6K 1TwJlQ-0006MV-84 <sender@example.com> *** frozen ***

    In this case we can see that there are 4 messages waiting to try to deliver to user@example.com, but they are all frozen. This means Exim has encountered an error while trying to deliver the message, and it has frozen it, until the next delivery retry time.

  3. Now you can take one of the Exim message IDs from the queue and further investigate it in the Exim mail log as to why the message can’t deliver with this command:exigrep -I -l 1TwJlQ-0006MV-84 /var/log/exim_mainlogThis will give you back the full transaction of that message ID exposing

    2013-01-18 16:46:16 1TwJlQ-0006MV-84 <= sender@example.com H=localhost [] T=”Update on employee contacts” for user@example.com
    2013-01-18 16:46:16 1TwJlQ-0006MV-84 ** user@example.com R=virtual_user_maildir_overquota: Mailbox quota exceeded
    2013-01-18 16:46:16 1TwJlQ-0006MV-84 Completed

  4. Now in this case we can see that this message is failing because the user@example.com server is giving back an error of Mailbox quota exceeded.If you’d like to attempt to go ahead and forcefully try to re-send the message you can run this command on the message ID:exim -M 1TwJlQ-0006MV-84If you wanted to remove the message from the mail queue.

    exim -Mrm 1TwJlQ-0006MV-84