Skip to main content

how to redirect specified address to external domain

Comments

5 comments

  • cwheeler33
    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 [EMAIL='user1@mydomain.com">user1@domain01.com[/EMAIL]: [EMAIL='personal_users@gmail.com">personal_user@gmail.com[/EMAIL] 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?
    0
  • cPanelMichael
    Hello :) Have you considered using a filter rule instead? You can configure a rule that redirects an email, and then discards the message so it's not delivered to the local account: Global Filters - Documentation - cPanel Documentation How to Configure Mail Filters - cPanel Knowledge Base - cPanel Documentation Thank you.
    0
  • cwheeler33
    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.
    0
  • cwheeler33
    OK, I opened a support ticket with cPanel. my solution which will work for me... setup the server side per this link https://forums.cpanel.net/threads/howto-redirect-a-copy-of-your-emails-to-another-server-while-saving-it-locally.226251/ then set up each user in Forwarders to forward to the alternate email address. I can then rename or delete the old imap account. I have not yet decided on this last part. case closed.
    0
  • cPanelMichael
    I am happy to see you were able to find a helpful solution. Thank you for updating us with the outcome.
    0

Please sign in to leave a comment.