Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

Discussion in 'E-mail Discussion' 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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    285
    Likes Received:
    20
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice