How do I configure Exim for better logging?

What will these instructions do?

What this addition does is it adds valuable logging information to your exim_mainlog file so that you can determine where messages are coming from, whos sending the message and from what directory on your server the user NOBODY is originating from, if your seeing mail leaving as nobody. In addition, it adds very useful information to exim_mainlog to help you decipher email coming and going.

Here is an example

The message above tells me where the message came from, who sent it from my server, the user and the path it was called from. It also tells me how it was called and what it was renamed to before leaving my server.

The message below, tells me an incoming message arrived with the subject line = “Naked Newsreaders? OH YEAH!”. Very helpful in determining spam. You will see many other messages in exim_mainlog that you didn’t see before. Great for debugging your message logs and catching spammers!

cPanel Servers

If your server is running cPanel, the instructions are very simple.

  1. Login WHM and go to Service Configuration / Exim Configuration Editor
  2. Click the “Switch to Advanced Mode” button
  3. Now you’ll see the WHM Exim configuration editor. This is essentially like editing exim.conf but throught he online interface and it will remember your changes where as if you edit the file directly through shell it will not.
  4. In the first window which is empty you’ll need to insert the following: log_selector=+all
  5. Go to the bottom and Save the changes, they will be applied and Exim will restart.
  6. Success! You have added additioinal logging to your Exim mail server for better tracking.

Non-cPanel Servers running Exim

  1. Open /etc/exim.conf
  2. Find this
  3. After “hostlist auth_relay_hosts = *” add the following:
  4. The final result should look like this:
  5. Save and restart Exim

Then you’re done!

Tagged:

Rate This Article

(6 out of 24 people found this article helpful)

About The Author