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 redirect specified address to external domain

Discussion in 'E-mail Discussions' started by cwheeler33, Mar 1, 2016.

  1. cwheeler33

    cwheeler33 Registered

    Joined:
    Mar 1, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Montreal
    cPanel Access Level:
    Root Administrator
    How can I configure Exim to do the following?

    there are a couple of users who want to redirect email, and I do not need/want to keep a copy once it has been redirected. For this reason i do not want to use the forwarding option inside cPanel.

    From what I researched it can be done, but I'm unable to confirm the details...

    something about creating a file with the local address and external address:
    /etc/exim/redirect-users
    user1@mydomain.com: personal_users@gmail.com

    and then to add a driver to exim.
    driver = redirect
    it is unclear where to place the driver in the exim conf, and also how to properly "read" the above for redirection.
     
  2. cwheeler33

    cwheeler33 Registered

    Joined:
    Mar 1, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Montreal
    cPanel Access Level:
    Root Administrator
    Rexplained, and with a test I did...

    How can I configure Exim to do the following?
    I have some users that need to be redirected to an external email account.
    They do have an existing mailbox that I cannot delete yet.
    I do not want to use the "Forwarding" panel because it will create a duplicate email in both the local and external account.

    From what I researched it can be done, but I'm unable to confirm the details...

    something about creating a file with the local address and external address:
    /etc/exim/redirect-users
    user1@domain01.com: personal_user@gmail.com

    and then to add a driver to exim.
    sender_redirect:
    driver = redirect
    data = ${lookup{$sender_address}lsearch{/etc/exim/sender_redirects}}

    I did not fully test this, but it will forward to the external account. But if I send an email to a group, that users will get the email, but no one else in the group will. In fact, it's possible that while I had this going no one for the domain was getting email... I reverted the moment the second test failed.

    Any ideas on how to resolve this?
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. cwheeler33

    cwheeler33 Registered

    Joined:
    Mar 1, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Montreal
    cPanel Access Level:
    Root Administrator
    The documentation says it does not support BCC, but a quick test shows otherwise. (it would have been a deal breaker for me)
    I setup a simple global rule, Rules To contains email Action Redirect altemail

    this works as intended except if the user is a part of a group created in Forwarders. At which point the email does not get treated by the rule.

    so I tried a User filter
    Rules From contains * Action Redirect altemail

    I get the same results as the Global rule. It does not handle emails that were sent to the Forwarders group.
     
  5. cwheeler33

    cwheeler33 Registered

    Joined:
    Mar 1, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Montreal
    cPanel Access Level:
    Root Administrator
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page