Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 21
  1. #1
    Member
    Join Date
    Dec 2010
    Posts
    8

    Question Hidden copies of incoming and outgoing emails

    Hello

    Search on the forum but I have not, so I have a question.

    How and where to set:

    1. incoming Email on any mail account (aa@com.pl, bb@com.pl, cc@com.pl etc..) was also sent as a copy at one account: dd@com.pl.
    2. Email sent from all accounts was also sent as blind carbon copy to account: dd@com.pl

    All mail accounts are the same user account.

    The issue is that You control what emails send and receive its employees.

    Best Regards: A. K.

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Hidden copies of incoming and outgoing emails

    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 dd@com.pl 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 "dd@com.pl"
    endif
    
    if $sender_address: contains "domain.com"
    then
    unseen deliver "dd@com.pl"
    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.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  3. #3
    Member
    Join Date
    Dec 2010
    Posts
    8

    Default Re: Hidden copies of incoming and outgoing emails

    Thanks for your quick response ,

    I mean just a lot of email addresses in the same web account and the same domain that everything will be sent to these email accounts, and every of them will be sent - had hidden copies to dd@com.pl (owner of the domain and the entire company).

    The company's president asked for such a setting to control what employees send out his e-mail accounts and every pick.

    So if I understand correctly - is that enough?


    ///EDIT

    Indeed, there I took this into account.

    In this case, how to send a hidden copy of incoming messages to the email addressdd@com.pl and outgoing ee@com.pl address?

    The rest remains as I described.


    Code:
    if ("$h_to:, $h_cc:, $h_bcc" contains "domain.com")
    then
      unseen deliver "dd@com.pl"
    endif
    
    if $sender_address: contains "domain.com"
    then
    unseen deliver "ee@com.pl"
    endif
    yes ?
    Last edited by phenixak; 04-05-2011 at 03:35 PM.

  4. #4
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Hidden copies of incoming and outgoing emails

    If you want to send a copy of incoming emails to a set email address to another set email address, you'd use this instead:

    Code:
    if ("$h_to:, $h_cc:, $h_bcc" is "emailuser@com.pl")
    then
      unseen deliver "dd@com.pl"
    endif
    
    if $sender_address is "emailuser@com.pl"
    then
    unseen deliver "ee@com.pl"
    endif
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  5. #5
    Member
    Join Date
    Dec 2010
    Posts
    8

    Default Re: Hidden copies of incoming and outgoing emails

    and reproduce this IF statement for each e-mail account in the domain, if necessary? and everything in this file:/etc/cpanel_exim_system_filter2?

  6. #6
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Hidden copies of incoming and outgoing emails

    You'd reproduce the if statement for each email account you want this to happen for if you don't simply want all emails on the domain (if you do, then you'd use the previously provided one where it is for all of the domain emails). You'd put each statement you want to add at the bottom of the created cpanel_exim_system_filter2 file.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  7. #7
    Member
    Join Date
    Dec 2010
    Posts
    8

    Default Re: Hidden copies of incoming and outgoing emails

    Ok, I'm very grateful for the quick and concrete help. Thank You.

    -However, money for Cpanel are easily issued

    Best Regards: Adam K.

  8. #8
    Member
    Join Date
    Dec 2010
    Posts
    8

    Default Re: Hidden copies of incoming and outgoing emails

    Hello Again,

    I'm sorry for the hassle but unfortunately it doesn't work.

    I did everything as it was written:

    -I have a file with the following formula:


    Code:
    cp cpanel_exim_system_filter cpanel_exim_system_filter2
    - At its end there is an entry:

    Code:
    if ("$h_to:, $h_cc:, $h_bcc" is "domena.pl")
    then
      unseen deliver "income@domena.pl"
    endif
    
    if $sender_address is "domena.pl"
    then
    unseen deliver "backup@domena.pl"
    endif
    - Then I run the command:

    WHM > Exim Configuration Editor and change the system filter to the new path (/etc/cpanel_exim_system_filter2).
    ..... and in spite of sending emails to addresses in that domain, not the future, no hidden their copy on the defined account for the hidden copies of e-mails.

    - Whether something is wrong and understood?


    Best Regards: Adam K

  9. #9
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Hidden copies of incoming and outgoing emails

    Hello Adam,

    You cannot have is when it is not a full email address as the sender or recipient does not only match "domena.pl" instead it has to be contains for the entries, so you would change these:

    Code:
    if ("$h_to:, $h_cc:, $h_bcc" is "domena.pl")
    then
      unseen deliver "income@domena.pl"
    endif
    
    if $sender_address is "domena.pl"
    then
    unseen deliver "backup@domena.pl"
    endif
    To these:

    Code:
    if ("$h_to:, $h_cc:, $h_bcc" contains "domena.pl")
    then
      unseen deliver "income@domena.pl"
    endif
    
    if $sender_address: contains "domena.pl"
    then
    unseen deliver "backup@domena.pl"
    endif
    Additionally, please note that I already warned that having the domain have all emails delivering to another email account on the domain might create a loop situation, so I highly suggest picking two email accounts not on the domain for the delivery.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  10. #10
    Member
    Join Date
    Dec 2010
    Posts
    8

    Default Re: Hidden copies of incoming and outgoing emails

    Hi,

    It works perfectly. E-mail messages started to arrive.. Thank you for help and clarification.

    Best Regards: Adam K.

  11. #11
    Registered User
    Join Date
    Feb 2005
    Posts
    1

    Default Re: Hidden copies of incoming and outgoing emails

    hi,

    I have almost the same situation, this post is very helpful but I was wondering why create the new filter file and put the rule in there. My current exim filter file has a lot of rules in it and wouldn't those be lost if you started with a blank one?

    If you wanted to preserve your existing rules would it be better to just add the new rule to the bottom of the filter file and restart exim?

    Regards: Mark P.

  12. #12
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Hidden copies of incoming and outgoing emails

    The cPanel filter file will be overwritten on updates. If you add entries to it, then those entries will be lost. Of note, I didn't state to start with a blank filter file. I provided this command initially:

    Code:
    cp cpanel_exim_system_filter cpanel_exim_system_filter2
    This copies the existing filter file to a new filter file. It is not a blank file you would be starting with but the cPanel filter file that you rename by copying it, then putting entries to the bottom of it. If you do not use a filter file copied from the old one, you are going to risk losing your filters. It's up to you.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  13. #13
    Member
    Join Date
    Apr 2002
    Posts
    21

    Default Re: Hidden copies of incoming and outgoing emails

    Hello

    This post was extremely helpful in configuring a hidden blind copy for one of our account.
    However i have got a request as under

    I need a blind copy of every External email ( not of domain.com) that is coming in and going out

    That is when sender domain = domain.com and recipient domain NOT = domain.com send blind copy to ABCD@xyz.com

    Also when ("$h_to:, $h_cc:, $h_bcc" contains "domain.com") and when sender NOT = domain.com send blind copy to ABC@XYZ.com

    Is something like the above doable . IF so what filter to set for the same.

    Thanks in advance

  14. #14
    Member
    Join Date
    Jan 2008
    Location
    Buenos Aires, Argentina
    Posts
    942
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Hidden copies of incoming and outgoing emails

    Hi there Tristan, this was a very interesting post. But I have one question: After doing these changes, the next update will upgrade the cpanel_exim_system_filter only and the second copy will remain untouched? or cpanel will update the filter2 file as this is selected in the Exim Configuration?
    In the other hand, when was the last time this file was updated?

    Thank you

  15. #15
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Hidden copies of incoming and outgoing emails

    cPanel rarely changes the cpanel_exim_system_filter file, but the new filter file will not be updated upon cPanel updates, since only the cPanel one is going to get updates. Unless the exim version is being changed, it is unlikely the filter file will change in any way. In 11.34, exim will be updated to a newer version, so you may wish to recopy the filter file at that point.

    I cannot state the exact time it was last updated. Again, it isn't likely to be changed in any way unless exim were updated, which hasn't happened other than patching for some time.

    As for mpkapadia's post, I have no idea how to configure what is being asked. I suggest posting at exim.org for this type of request on their mailing list there.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads & Tags
Similar threads

  1. Replies: 3
    Last Post: 09-09-2010, 04:49 AM
  2. Monitoring incoming and outgoing bandwidth
    By Slacker_au in forum New User Questions
    Replies: 3
    Last Post: 04-21-2009, 01:23 PM
  3. Archive incoming and outgoing emails on per-domain basis
    By conchur in forum E-mail Discussions
    Replies: 1
    Last Post: 03-18-2009, 06:55 AM
  4. Logging Incoming/Outgoing Mail
    By lilg in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-08-2006, 06:05 AM
  5. Having trouble with an Exim Filter copying incoming/outgoing emails.
    By inshosting in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-28-2004, 01:33 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube