I want to log all outbound emails leaving my server

Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"

Top Level » Email » Exim

I want to log all outbound emails leaving my serverLast Modified: Sep 20, 2011, 12:46 am
This guide will help you log all emails leaving your server, which have sender domains which are in the /etc/virtual/domains file.
Note that this assumes the "From" address is correct in the message, which isn't always the case.  There may be a better variable to use and check, but this is my best guess at the moment.

1) Edit the file


2) Find the code:

if not first_delivery

3) Right after the code from #2, add this code

if "${lookup{$sender_address_domain}lsearch{/etc/virtual/domains}{true}{false}}" is "true"
            unseen deliver "email@notification.com"

Where you'd replace email@notification.com with the email value you want all outbound emails to be saved to.

4) Save/exit and restart exim:

/etc/init.d/exim restart

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST