Copy all incoming and outgoing emails of a domain to a Gmail account
I need to copy all incoming and outgoing mails of a domain to a GMAIL account for archival purposes.
What is the best way to do this? We also need to cater for SPF issues for copies of incoming emails.
Please help.
-
Hey there! cPanel offers the Archive option, which stores a local copy of all message on the server. That would be the easiest thing to configure, and you can read about that here:
https://docs.cpanel.net/cpanel/email/archive/
If you want to send a hidden copy of a message to a remote address, that will take some customization to Exim to get that working. I found the following code online, but you'll want to test this before placing it into production:
if ("$h_to:, $h_cc:, $h_bcc" is "emailuser@com.pl")
then
unseen deliver "gmailaddress@gmail.com"
endif
if $sender_address is "emailuser@com.pl"
then
unseen deliver "gmailaddress@gmail.com"
endifI'm not able to provide custom Exim filters here, but that should be enough to get you started.
0
Please sign in to leave a comment.
Comments
1 comment