Email forwarders not working while sending to a 3rd party

Arun Seby

Member
Apr 7, 2019
11
1
3
kerala
cPanel Access Level
Root Administrator
Hi,

I have this strange issue that email forwarders not working for a certain domain. I will explain it using some scenarios.

Basically I have two domains abc.com and xyz.com. abc.com uses Google as MX while xyz.com uses an MX record which is pointing to the WHM server itself.

At first I have setup forwarders for abc.com to a 3rd party email and it was not working earlier and was giving "Email delivery failed error" but then I changed the Email routing to Local (even though it uses remote MX) and it started working. (I use a third party DNS provider so the DNS records are not stored in the WHM server so changing the Email routing to Local or Remote will not affect the domain but only when it's routed through WHM).


The issue I face right now is when I set a forwarder for my domain xyz.com to abc.com it will not work. When I checked the trace in Email forwarders it shows error "Untraceable route to local delivery". While trying to troubleshoot I found that if I change the Email routing of abc.com to Remote the forwarder I setup from xyz.com to abc.com will work but the forwarder of abc.com to 3rd party fails.

For a better understanding

If abc.com Email routing is Local
abc.com --> 3rd party forwarder works
xyz.com to abc.com forwarder fails

If abc.com Email routing is Remote
abc.com -- 3rd party forwarder fails
xyz.com to abc.com forwarder works

I know it's confusing but still I can explain if you have any doubts. Any help on this is much appreciated.

Regards,
 

Arun Seby

Member
Apr 7, 2019
11
1
3
kerala
cPanel Access Level
Root Administrator
Hi @Arun Seby

What is noted in the exim main log for the mail transaction of the forwarder? You can find the log at
Code:
/var/log/exim_mainlog

Hi @cPanelLauren ,

Thanks for the response.

While checking from the logs it shows me the email delivery has been completed.

As you requested here's the log for one of the test email.

[[email protected] ~]# exigrep 1hHsXZ-00014p-Ux /var/log/exim_mainlog
2019-04-20 16:08:33 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1hHsXZ-00014p-Ux

2019-04-20 16:08:33 1hHsXZ-00014p-Ux H=mail-vs1-f51.google.com [some IP]:42097 I=[some IP]:25 Warning: Message has been scanned: no virus or other harmful content was found
2019-04-20 16:08:33 1hHsXZ-00014p-Ux <= my email address H=mail-vs1-f51.google.com [some IP]:42097 I=[some IP]:25 P=esmtps X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no S=2569 [email protected]l.com T="Testing Eamil flow" from <my email address> for [email protected] domain
2019-04-20 16:08:34 1hHsXZ-00014p-Ux => username ([email protected] domain, [email protected] domain) <[email protected] domain> F=<my email address> SRS=<[email protected] domain> R=localuser T=dovecot_delivery S=2780 C="250 2.0.0 <[email protected]> uCt+AAJEu1w1EAAAEI2//A Saved"
2019-04-20 16:08:34 1hHsXZ-00014p-Ux => test1 <[email protected] domain> F=<my email address> R=virtual_user T=dovecot_virtual_delivery S=2743 C="250 2.0.0 <[email protected] domain> yDB3CAJEu1w1EAAAEI2//A Saved"
2019-04-20 16:08:34 1hHsXZ-00014p-Ux Completed

Regards,
 

Arun Seby

Member
Apr 7, 2019
11
1
3
kerala
cPanel Access Level
Root Administrator
Hi @cPanelLauren ,

Yes, from the logs it says the emails completed delivery. But it's not recieving at the 3rd party inbox. i.e forwarder not working. it'll deliver to the mailbox in the WHM server itself.

For a better understanding let the to domains be abc.com and xyz.com, abc.com uses Google as MX while xyz.com uses an MX record which is pointing to the WHM server itself.

If abc.com Email routing is Local
abc.com --> 3rd party forwarder works
xyz.com to abc.com forwarder fails

If abc.com Email routing is Remote
abc.com -- 3rd party forwarder fails
xyz.com to abc.com forwarder works

Regards,
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
8,911
747
263
Houston
cPanel Access Level
DataCenter Provider
Yes, from the logs it says the emails completed delivery. But it's not recieving at the 3rd party inbox. i.e forwarder not working
This actually doesn't mean the forwarder isn't working. We can clearly see in the logs that it is working, the system recognizes the forwarder and initiates delivery. If it's not being received in the 3rd party inbox it's due to a circumstance that is occurring in transit. If there's no bounce message for the delivery you may need to check the spam box of the 3rd party or check with them to inquire as to why mail is not being shown in the inbox.
 

Arun Seby

Member
Apr 7, 2019
11
1
3
kerala
cPanel Access Level
Root Administrator
This actually doesn't mean the forwarder isn't working. We can clearly see in the logs that it is working, the system recognizes the forwarder and initiates delivery. If it's not being received in the 3rd party inbox it's due to a circumstance that is occurring in transit. If there's no bounce message for the delivery you may need to check the spam box of the 3rd party or check with them to inquire as to why mail is not being shown in the inbox.
Hi @cPanelLauren ,

Thanks for that explanation. But as I have mentioned earlier the email delivery works perfectly when I change the Email routing options. If it was some issue with the reciever it should not be working when the change the email routing right ? Also, when I check trace delivery for the forwarder it shows "Untraceable route to local delivery" which means the forwarder is not working properly, ritght ? correct me if I'm wrong.


Basically I have two domains abc.com and xyz.com, abc.com uses Google as MX while xyz.com uses an MX record which is pointing to the WHM server itself.

At first I have setup forwarders for abc.com to a 3rd party email and it was not working earlier and was giving "Email delivery failed error" but then I changed the Email routing to Local (even though it uses remote MX) and it started working. (I use a third party DNS provider so the DNS records are not stored in the WHM server so changing the Email routing to Local or Remote will not affect the domain but only when it's routed through WHM).

The issue I face right now is when I set a forwarder for my domain xyz.com to abc.com it will not work. When I checked the trace in Email forwarders it shows error "Untraceable route to local delivery". While trying to troubleshoot I found that if I change the Email routing of abc.com to Remote the forwarder I setup from xyz.com to abc.com will work but the forwarder of abc.com to 3rd party fails.

Regards,