Hidden copies of incoming and outgoing emails

Status
Not open for further replies.

indezoo

Registered
Dec 8, 2011
2
0
51
cPanel Access Level
Website Owner
i am looking for the exact functionality for one of my clients but i am not sure...Is there anything that can be done through the settings in cpanel for the same..coz the client will not be editing the code...is there any alternative other than cpanel which provides the same functionality but with the user interface..any help appreciated
 

globcom

Well-Known Member
May 24, 2008
55
3
58
Hello,

I did everything as it was indicate and it doesn't work.


This is my code for etc/cpanel_exim_system_filter2 :

Code:
if ("$h_to:, $h_cc:, $h_bcc" contains "mydomain.com")
then
  unseen deliver "[email protected]"
endif

if $sender_address: contains "mydomain.com"
then
unseen deliver "[email protected]"
endif
I don't understand what's wrong ?

Eric
 

globcom

Well-Known Member
May 24, 2008
55
3
58
Hi Vinayak,

thank you for your assistance.

In WHM check
Home » Service Configuration » Exim Configuration Manager

What "System Filter File" is selected there?

/etc/cpanel_exim_system_filter2

And have you restarted exim after modification?
Yes.

Very strange.
 

Vinayak

Well-Known Member
Jun 27, 2003
280
2
168
Bharat
cPanel Access Level
Root Administrator
Try this

Code:
### START OF OUTGOING + INCOMING MAIL FORWARDING ###

if first_delivery
   and ("$h_to:, $h_cc:" contains "domain.com")
   or ("$h_from:" contains "domain.com")
then
   unseen deliver "[email protected]"
endif

### END OF OUTGOING + INCOMING MAIL FORWARDING ###
 

globcom

Well-Known Member
May 24, 2008
55
3
58
Great,

this seems work perfectely.

I will test this configuration in production a few days.

Thank you :) !!

Eric
 

maavia777

Registered
Feb 8, 2013
1
0
1
cPanel Access Level
Website Owner
Dear All i just read the post all i want is that , that i can recieve a bcc for all send and recieve email addresses ,
well i just have a cpanel access where i am not having its server.
could you please kindly guide me for the same.
 

fidividi

Well-Known Member
Feb 15, 2013
46
0
6
cPanel Access Level
Root Administrator
Just to understand everything clearer. Isn't it just better to use "contains" in all cases (domain or specific email account) since "is" is picky(er)?
 

mpkapadia

Active Member
Apr 10, 2002
41
0
306
Hello Michael,

I have been using this configuration unseen deliver and it has worked wonderfully so far. Here is what I have

-----------------------------------------------------------------
if ("$h_to:, $h_cc:, $h_bcc" contains "domainname.com")
then
unseen deliver "[email protected]"
endif

if $sender_address: contains "domainname.com"
then
unseen deliver "[email protected]"
endif
-------------------------------------------------------

This sends a copy externally for all [email protected] .

Now I want to exclude the ceos email id @ domainname.com from this external sending . Can you let me know if something like this is possible and give the syntax .

Something like

if ("$h_to:, $h_cc:, $h_bcc" contains "domainname.com" and does not contain "[email protected]" , "[email protected] )

then
unseen deliver "[email protected]"
endif

This is with intention to exclude say user1 and user2 from the external sending process.

With Regards,
Manish Kapadia.
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,903
2,226
363
cPanel Access Level
DataCenter Provider
Twitter

LoadFactor

Well-Known Member
Jul 12, 2013
46
6
83
cPanel Access Level
Root Administrator
Michael, My understanding of Email Archiving is that it allows a user to store his or her own mail. The functionality being discussed here is the immediate routing of all outbound mail to a paranoid and/or control freak company owner's inbox, often without the sender's knowledge. If Email Archiving can achieve that, I'd appreciate documentation on how that gets set up.
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,903
2,226
363
cPanel Access Level
DataCenter Provider
Twitter
There is no native support for that type of functionality, but you are welcome to try implementing the custom rule you suggested to see if it works as intended. The "does not contain" entry itself is valid for email filters so I don't see why it would not work as expected.

Thank you.
 

lazy

Registered
Dec 9, 2005
1
0
151
Sorry for possible dumb question but, I've setup outgoing mails copying with this manual, it's working. But all mails send to cc address are showing marked as read. I didn't get something reasonable in config for this kind of behavour so I'm asking it here, maybe, its just somebody from clients have very quick mail client marking read or I miss something and messages should be in "read" state? Thanks in advance.
 

pranoy

Registered
Jan 30, 2015
1
0
1
cPanel Access Level
Website Owner
I'm not entirely certain I understand what you want here. Are you wanting to blind CC all incoming and outgoing emails from any domain to [email protected] account? If that is the case, then I can tell you how to do it on a per domain basis:

1. To create a blind carbon copy, go to /etc/ and create a new file:

Code:
cp cpanel_exim_system_filter cpanel_exim_system_filter2
2. Add the following at the bottom of the new file (/etc/cpanel_exim_system_filter2):

Code:
if ("$h_to:, $h_cc:, $h_bcc" contains "domain.com")
then
  unseen deliver "[email protected]"
endif

if $sender_address: contains "domain.com"
then
unseen deliver "[email protected]"
endif
Now, go to WHM > Exim Configuration Editor and change the system filter to the new path (/etc/cpanel_exim_system_filter2).

Above, please replace domain.com with the domain name you want to have all emails incoming and outgoing sent to the blind carbon copied address. Please ensure the receiving address for the incoming and outgoing emails is not on the same domain as those you are using for the forwarding, since you might end up creating some type of loop otherwise.
Hello,

Is this also applicable for Reseller - Shared Server in Linux..? Pls can you help me... Thanks
 

jeffyjoe

Member
Dec 10, 2004
12
0
151
Hello,

Is this also applicable for Reseller - Shared Server in Linux..? Pls can you help me... Thanks
NO,, because reseller accounts do not have root access, (there is no Service Configuration option)

however there are now other ways,, follow links above for Email Archiving
 

chanklish

Well-Known Member
May 22, 2015
63
0
6
kinshasa
cPanel Access Level
Root Administrator
hello
i am a newbie .. how can i edit the system filter and how can i add several domains ? i mean i want several domains send a hidden copy of their in and out mail to me
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,903
2,226
363
cPanel Access Level
DataCenter Provider
Twitter
i am a newbie .. how can i edit the system filter and how can i add several domains ? i mean i want several domains send a hidden copy of their in and out mail to me
To clarify, is the email archiving feature not suitable for this?

Thank you.
 

chanklish

Well-Known Member
May 22, 2015
63
0
6
kinshasa
cPanel Access Level
Root Administrator
To clarify, is the email archiving feature not suitable for this?

Thank you.
in email archiving i can only view the emails in imap or download them in maildir .. i need them in pop so i can archive them in my data center ..

would something like this work :
Code:
### START OF OUTGOING + INCOMING MAIL FORWARDING ###

if first_delivery

and (“$h_from:, $h_to:, $h_cc:, $h_bcc:” contains “@1.net”)

or (“$h_from:, $h_to:, $h_cc:, $h_bcc:” contains “@2.net”)

or (“$h_from:, $h_to:, $h_cc:, $h_bcc:” contains “@3.net”)

or (“$h_from:, $h_to:, $h_cc:, $h_bcc:” contains “@4.net”)

or (“$h_from:, $h_to:, $h_cc:, $h_bcc:” contains “@5.org”)

or (“$h_from:, $h_to:, $h_cc:, $h_bcc:” contains “@6.org”)

then

unseen deliver [email protected]

endif

### END OF OUTGOING + INCOMING MAIL FORWARDING ###
 
Last edited by a moderator:
Status
Not open for further replies.