The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to forward incoming/outgoing mails to two other accounts?

Discussion in 'E-mail Discussions' started by mentaliser, Jul 6, 2017.

Tags:
  1. mentaliser

    mentaliser Registered

    Joined:
    Dec 26, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Gujarat India
    cPanel Access Level:
    Reseller Owner
    I want every email sent and received from a@example.com to be forwarded to b@example.com and c@example.com.

    I created this file - cpanel_exim_system_filter2 in the etc folder and I tried some codes but it didn't work. One of my client wants to do this.

    Do I have to create two files and only one? I don't really understand coding so copy paste would be awesome :)

    Thank you.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. mentaliser

    mentaliser Registered

    Joined:
    Dec 26, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Gujarat India
    cPanel Access Level:
    Reseller Owner
    Hello,

    I tried Global filters but from what I understood, the option will allow me to filter emails with specific criteria. I want to send a copy of each and every mail that is received and sent in mail id A to mail id B and C.

    Which options do I select in global filters?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    You can actually use the "Forwarders" option in cPanel to forward incoming email from one email account to multiple other email accounts. Keep in mind outgoing email is handled separately, and the only supported method of making copies of outgoing email is through the Archive option in cPanel:

    Archive - Documentation - cPanel Documentation

    Thank you.
     
  5. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    269
    Likes Received:
    14
    Trophy Points:
    18
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    Make sure your "cpanel_exim_system_filter2" file is selected in the Exim Configuration Manager 's System Filter File.

    Add the following to the end of your file:

    Code:
    
    #Incoming To, CC, BCC
    if ("$h_to:, $h_cc:, $h_bcc" contains "a@example.com")
    then
      unseen deliver "b@example.com"
      unseen deliver "c@example.com"
    endif
    
    #Outgoing From
    if first_delivery
    and $sender_address is "a@example.com"
    then
      unseen deliver "b@example.com"
      unseen deliver "c@example.com"
    endif
    
    
    Then restart Exim.
     
Loading...

Share This Page