Email forwarders not working with smarthost configured

Operating System & Version
ubuntu 20
cPanel & WHM Version
11.106.0.13

RGBS IT

Member
Jan 15, 2023
7
0
1
Mumbai
cPanel Access Level
Root Administrator
Hi All,

Giving background before coming to the problem direct.

I migrated away from a typical webserver to Azure. I find port 25 blocked globally on Microsoft. Initially there was zero communication to and from exim. I read online and found workaround to configure Smarthost. My smarthost is google workspace and it seems its relaying emails originating from websites and emails coming from other domains to my cpanel mailboxes perfectly.

Until i recently discovered that email forwarders are not receiving any emails!

I see in exim logs the message id gets completed for each forwarder email

=========================================================

Paste from log:

2023-01-16 04:32:46 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1pHHAq-0003xK-Bi

2023-01-16 04:32:46 1pHHAq-0003xK-Bi SMTP connection identification D=domain.com O=[email protected] E=[email protected] M=1pHHAq-0003xK-Bi U=cpanelacc ID=1029 B=redirect_resolver
2023-01-16 04:32:46 1pHHAq-0003xK-Bi Sender identification U=cpanelacc D=domain.com S=[email protected]
2023-01-16 04:32:46 1pHHAq-0003xK-Bi SMTP connection outbound 1673843566 1pHHAq-0003xK-Bi domain.com [email protected]

2023-01-16 04:32:46 1pHHAq-0003xK-Bi SMTP connection identification D=domain.com O=[email protected] E=[email protected] M=1pHHAq-0003xK-Bi U=cpanelacc ID=1029 B=redirect_resolver
2023-01-16 04:32:46 1pHHAq-0003xK-Bi Sender identification U=cpanelacc D=domain.com S=[email protected]
2023-01-16 04:32:46 1pHHAq-0003xK-Bi SMTP connection outbound 1673843566 1pHHAq-0003xK-Bi domain.com [email protected]

2023-01-16 04:32:46 1pHHAq-0003xK-Bi SMTP connection identification D=domain.com O=[email protected] E=[email protected] M=1pHHAq-0003xK-Bi U=cpanelacc ID=1029 B=redirect_resolver
2023-01-16 04:32:46 1pHHAq-0003xK-Bi Sender identification U=cpanelacc D=domain.com S=[email protected]
2023-01-16 04:32:46 1pHHAq-0003xK-Bi SMTP connection outbound 1673843566 1pHHAq-0003xK-Bi domain.com [email protected]

2023-01-16 04:32:47 1pHHAq-0003xK-Bi => it <[email protected]> R=virtual_user T=dovecot_virtual_delivery C="250 2.0.0 <[email protected]> 8Df5AW/TxGOUOwAARBevbQ Saved"

2023-01-16 04:32:49 1pHHAq-0003xK-Bi => [email protected] ([email protected]) <[email protected]> R=lookuphost T=remote_smtp H=smtp-relay.gmail.com [64.233.188.28] TFO X=TLS1.3:TLS_AES_256_GCM_SHA384:256 CV=yes C="250 2.0.0 OK 1673843569 i5-20020a170902e48500b00192c4055e4asm1643242ple.90 - gsmtp"
2023-01-16 04:32:49 1pHHAq-0003xK-Bi => [email protected] ([email protected]) <[email protected]> R=lookuphost T=remote_smtp H=smtp-relay.gmail.com [64.233.187.28] TFO X=TLS1.3:TLS_AES_256_GCM_SHA384:256 CV=yes C="250 2.0.0 OK 1673843569 cl8-20020a0566383d0800b003a150b13a18sm296566jab.65 - gsmtp"
2023-01-16 04:32:49 1pHHAq-0003xK-Bi => [email protected] ([email protected]) <[email protected]> R=lookuphost T=remote_smtp H=smtp-relay.gmail.com [108.177.125.28] TFO X=TLS1.3:TLS_AES_256_GCM_SHA384:256 CV=yes C="250 2.0.0 OK 1673843569 y2-20020a4aea22000000b004f51dfdf754sm87791ood.17 - gsmtp"

2023-01-16 04:32:49 1pHHAq-0003xK-Bi Completed

=========================================================

My forwarders recepients are gmail, yahoo and few other common emails.

So coming to problem:
Emails from outside land to the main cpanel mailbox but not on forwarder mailboxes.

PS: I moved sites from old host to new host using Transfer Tool.
the domain is listed in
/etc/localdomain

Thanks,
 
Last edited by a moderator:

RGBS IT

Member
Jan 15, 2023
7
0
1
Mumbai
cPanel Access Level
Root Administrator
I noticed i did receive emails for sometime while i performed following commands in some sequence.
/usr/local/cpanel/scripts/suspendacct cpanelacc --force
/usr/local/cpanel/scripts/unsuspendacct cpanelacc --force

then

whmapi1 unset_manual_mx_redirects domain=domain.com
whmapi1 unset_all_service_proxy_backends username=cpanelacc

I dont recall in which sequence i performed these commands but infact forwarders started working after that for that particular domain and doing them again in all domains stopped for all domains.

Thanks,
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,241
2,217
363
cPanel Access Level
Root Administrator
Hey there! The details in the specific log entries you provided don't tell me much, as it seems to indicate things are working well.

Can you search your /var/log/exim_mainlog file for the following string and let me know if you see it?

Code:
local_parts check lookup or other defer
If so, you could be experiencing the following issue: https://support.cpanel.net/hc/en-us...Generated-Return-Path-Can-Fail-Intermittently
 

RGBS IT

Member
Jan 15, 2023
7
0
1
Mumbai
cPanel Access Level
Root Administrator
grepping for the string did not result anything, no occurrence in logs.

I am keep testing various combinations to narrow down exact situation. Here is one observation i made:

I have:
[email protected] with forwarder set to [email protected], [email protected], [email protected]
while i send an email from any outside email like [email protected] to [email protected], everything trigger fine in logs but none of the 3 gmails receive any email, only [email protected] receives it.

While i send from [email protected] (webmail) to [email protected], everything again triggers in logs same lines but all the 3 gmails receive it along with [email protected]!

this is super confusing to me.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,241
2,217
363
cPanel Access Level
Root Administrator
I've run out ideas, although I'm suspecting this is related to SRS changes, such as the issue mentioned here:


Could you submit a ticket to our team so we can check this out?
 

RGBS IT

Member
Jan 15, 2023
7
0
1
Mumbai
cPanel Access Level
Root Administrator
Out of curiosity, I wanted to know how do emails normally work on Azure or any other cloud platform like AWS that offer cPanel image. They all have port 25 outgoing blocked but they do allow port 25 incoming. I have read across major relay players like AWS SES, SMTP2Go, they all assure mailbox delivery in and out of server mailbox but none of them are welcoming on email forwarding.

I got SMTP2Go to test out if that can resolve. I faced the same issue with it, emails delivery till mailboxes went fine but not to its forwarders.

SMTP2Go support said this,
"It sounds like the plugin is working exactly as expected and that the cPanel forwarders are not functioning correctly. We have no influence on the forwarders, that is entirely a cPanel/WHM issue."

Forwarders are primary requirement for our websites.
 

RGBS IT

Member
Jan 15, 2023
7
0
1
Mumbai
cPanel Access Level
Root Administrator
I moved out all sites out of my cpanel server. I have kept a domain or two that doesn't have much email traffic on it. Email issues we couldn't afford.

I don't have any logs to confirm but I have a gut feeling that says gmail perhaps rate limits messages without error but again I get baffled as why emails originating from webmail always delivered out but forwarders recipients never delivered. Or gmail sees forwarder messages differently and rate-limits them?

I have more questions than answers so moving sites back to typical webserver where port 25 is open seemed practical.

I will keep searching for this and will see if something gives me any direction.

Also SRS angle hasnt been looked at still.