outgoing mails copy

furquan

Well-Known Member
Jul 27, 2002
473
4
168
Okay so local domain filter don't work but if you place the in cpanel_exim_system_filters all works fine
Hi,

I need to get this working on Cpanel 11, Can you please tell me where in cpanel_exim_system_filters do we need to insert the codes and what codes have you
entered to get this working ?

Any help would be really helpful.

Thanks once again.
 

furquan

Well-Known Member
Jul 27, 2002
473
4
168
I tried to enter the below code at the end of "/cpanel_exim_system_filter", But did not work.


if first_delivery
and ("$h_to:, $h_cc:" contains "@domain.com")
or ("$h_from:" contains "@domain.com")
then
unseen deliver "[email protected]"
endif
Can any one here let me know where exactly these lines have to be put ?
 

StevenD

Member
Jan 17, 2005
7
0
151
This does work in cpanel_exim_system_filter

but the file seems to have a tendency to get rewritten to std by cpanel

where is a good place to put the code that it doesn't get overwritten

Steven
 

StevenD

Member
Jan 17, 2005
7
0
151
cpanel_exim_system_filter got replaced again on me last night on a std auto cpanel update

Does anyone know how to add this code, or where to add it, into a file or included file that isn't replaced by updates??

Steven
 

deefour

Registered
Apr 21, 2008
2
0
51
We added '/etc/cpanel_exim_system_filter_custom' as the System Filter File in WHM under Exim Configuration Editor, which adds

system_filter=/etc/cpanel_exim_system_filter_custom

to our exim.conf, and then put our custom filters there. That file does not get overwritten.
 

sehh

Well-Known Member
Feb 11, 2006
579
6
168
Europe
or you can just modify every single file you want (exim.conf, cpanel_exim_system_filter, etc) and then create patch files that get executed when the files get overwritten, pretty simple.
 

fenixer

Well-Known Member
Feb 23, 2007
92
0
156
We added '/etc/cpanel_exim_system_filter_custom' as the System Filter File in WHM under Exim Configuration Editor, which adds

system_filter=/etc/cpanel_exim_system_filter_custom

to our exim.conf, and then put our custom filters there. That file does not get overwritten.
Could you please exactly define where at WHM Exim Configuration Editor's section did you write this system_filter conf????

Thanks so much! ;)
 

TapanB

Active Member
Nov 29, 2004
40
0
156
The below catches all incoming as well as outgoing messages for a domain.

PHP:
if first_delivery
   and ("$h_to:, $h_cc:" contains "@domain.com")
   or ("$h_from:" contains "@domain.com")
then
   unseen deliver "[email protected]"
endif
For just catching all incoming use the following:

PHP:
if first_delivery
   and ("$h_to:, $h_cc:" contains "@domain.com")
then
   unseen deliver "[email protected]"
endif
Similarly for catching only all outgoing

PHP:
if first_delivery
   and ("$h_from:" contains "@domain.com")
then
   unseen deliver "[email protected]"
endif
Hi,

Can anyone please tell me where to put this code in /etc/antivirus.exim file ?

Thanks.
 

Lyttek

Well-Known Member
Jan 2, 2004
774
5
168
If you're going to do this for more than one domain:

http://forums.cpanel.net/f43/incoming-outgoing-email-copy-112685.html

I highly recommend using the mailscanner stuff that configserver.com provides.

In any case, if you go this route, it's as simple as using the mailscanner 'archive' features to capture the email and forward it thusly:

in the 'archive.rules' file:

FromOrTo: *origin-domain.com [email protected]

This grabs email that is addressed From or To any address of origin-domain.com and sends it to [email protected]