This article will show you how to copy all outgoing email (transparently) of a specific user to another email account with Exim/cPanel.
There is no built-in feature to do so, but we will use the Exim highly flexible filter scripting capability that can be achieve from the command line.
1. Log into your cPanel server using SSH.
NOTE : In this example, we will assume that the source address is “email@example.com” and the recipient address where we want to silently send a copy of all outgoing emails will be “firstname.lastname@example.org”.
2. Create and edit the following file using your favourite text editor :
3. Copy and edit the following matching the sender and recipient addresses :
and ("$h_from:" contains "email@example.com")
and not ("$h_X-Spam-Checker-Version:" begins "SpamAssassin")
unseen deliver "firstname.lastname@example.org"
4. In WHM, look at Exim Configuration Manager > Basic Editor > Filters
Look at the bottom, you should see a “Custom filter” matching “copy.outgoing_user_domain.tld”.
5. Ensure it is set to “On” and click “Save”.