Archive incoming and outgoing emails on per-domain basis

conchur

Member
Apr 9, 2007
6
0
151
How do I configure Exim to append all incoming and outgoing emails for a selected domain to a single account for archival? One of my customers has requested that all email (200+ users, 3 domains) sent or received by our server is archived for compliance.

I've tried the suggestions at:
http://www.devco.net/archives/2006/03/24/saving_copies_of_all_email_using_exim.php
to capture mail, but although the Exim config file passes the checks any test messages I've sent (using Squirrelmail on the same server) haven't been delivered to the archive.

System spec:
Exim 4
cPanel 11.24.4-C34331 - WHM 11.24.2 - X 3.9
CENTOS 4.4 x86_64 on standard
 

conchur

Member
Apr 9, 2007
6
0
151
For outgoing mail sent through local SMTP server, simply adding:

if $sender_address_domain is {domain}.{tld}
then
unseen deliver archive@{domain}.{tld}
endif

To the bottom of the /etc/cpanel_exim_system_filter file silently copies all sent mail from users in the specified domain to a specified mail user for archival, and then continues to deliver the mail as normal.

Anyone have a better solution?