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.

Email Forwarder to Remote Mail Server Not Working

Discussion in 'E-mail Discussions' started by jodamo5, Dec 9, 2015.

  1. jodamo5

    jodamo5 Registered

    Joined:
    Jan 18, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have a problem where fowarders are not correctly forwarding emails to a remote mail server. They are instead being delivered to the local server.

    Here are the details:
    I have two domains in my cPanel account.
    • localmail.com
    • externalmail.com
    Both domains have websites on the server.

    externalmail.com is using a remote mail exchanger. (It is set correctly in the MX Records section of cPanel to use "remote mail exchanger".)

    localmail.com is using the local mail exchanger. But only to forward the emails to the other domain - externalmail.com

    So info@localmail.com forwards to info@externalmail.com

    The problem is that the forwarder is trying to deliver info@externalmail.com to a local mailbox on the server.

    Firstly, when I had these two domains in the one account, and didn't set up a local mail box for info@externalmail.com then I received an error when setting up the forwarder.
    But if I DO set up a local mailbox on the server for info@externalmail.com then the mail gets delivered to that local inbox - which isn't checked by the domain owner, because that's not where their emails are received.

    Finally I removed the localmail.com domain from that cPanel account, and added it to a different cPanel account, but on the same server. It then let me add the forwarder to info@externalmail.com without any problems.

    However emails sent to info@localmail.com gets a "failed delivery" bounce notification because the mailbox doesn't exist. So it still seems to be trying to deliver it locally, instead of honoring the "remote mail exchanger" setting on the externalmail.com domain.

    How can we solve this please?

    How can I set up an email forwarder to forward info@localmail.com to info@externalmail.com and have it actually forward to the external mail server?

    Thanks
    Josh
     
  2. jodamo5

    jodamo5 Registered

    Joined:
    Jan 18, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I found the solution, and it seems to be a small bug in cPanel.

    For the externalmail.com domain I had set the MX setting to "remote mail exchanger". However there was a single MX record in the table - with priority 0.

    This record shouldn't do anything, because the email routing is set to "remote mail exchanger". But this record is doing something. Because when the record was there, the problem behaviour specified above occurred. But once I deleted this MX record, the email forwarding starting working correctly - forwarding to the external mail server.

    Proposed fix: If email routing is set to "Remote Mail Exchanger" cPanel should ignore all MX records and always treat the email routing as remote.
     
  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
    Hello :)

    Were you able to manually review the /etc/localdomains and /etc/remotedomains files when this happened to determine which file the domain name existed in?

    Thank you.
     
  4. jodamo5

    jodamo5 Registered

    Joined:
    Jan 18, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Yes, I checked and the domain was in the /etc/remotedomains file.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    To clarify, does it function correctly when the domain name is handled locally through it's addition to the /etc/localdomains file? Thus, the issue is not with the domain name's placement in these files but rather with the configured MX record?

    Thank you.
     
Loading...

Share This Page