Confused about Cpanel Catch-All Forwarder Destination

georg3otj

Registered
Sep 20, 2016
3
1
3
Indonesia
cPanel Access Level
Root Administrator
I've setup a mail gateway using postfix in-front of cpanel to filter spam/virus before delivery to exim.

In postfix i setup "reject_unverified_recipient" so that postfix could verify if the recipient actually exist in cpanel before delivery

below is the config from postfix regarding recipient verification :

/etc/postfix/main.cf

smtpd_recipient_restrictions = permit_sasl_authenticated,
reject_unknown_recipient_domain,
permit_mynetworks,
reject_unauth_pipelining,
reject_unauth_destination,
check_recipient_access hash:/etc/postfix/verifydomains,
reject_unverified_recipient,
check_client_access hash:/etc/postfix/rbl_override_whitelist, check_policy_service unix:private/policyd-spf
reject_invalid_hostname,
reject_non_fqdn_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_rbl_client zen.spamhaus.org,
reject_rbl_client b.barracudacentral.org,
permit

address_verify_map = btree:/var/lib/postfix/verify_cache

/etc/postfix/verifydomains

mydomain.net reject_unverified_recipient

then, in cpanel :

WHM -- Server Configuration -- Tweak Settings -- Mail -- Initial default/catch-all forwarder destination : Fail

Now,

from the postfix log :

Sep 23 08:06:37 smtp0 postfix/smtp[16889]: 886C213FB7D: to=<[email protected]>, relay=xx.xx.xx.xx[xx.xx.xx.xx]:25, delay=0.1, delays=0.02/0/0.07/0.01, dsn=2.0.0, status=deliverable (250 Accepted)
Sep 23 08:06:37 smtp0 postfix/qmgr[30841]: 886C213FB7D: removed

from the cpanel log :

2016-09-23 08:06:48 1bnEwt-001lT7-6q ** [email protected] <[email protected]> R=virtual_aliases: No such person here
2016-09-23 08:06:48 1bnEwt-001lT7-6q Frozen (delivery error message)


So, postfix verify cpanel if [email protected] exist, then cpanel reply "250 Accepted" then email delivered to cpanel, and cpanel now said No such person here

Any hints what may have gone wrong or any config i should re-checked to make sure this setup works between postfix and cpanel ?

Thanks
 

georg3otj

Registered
Sep 20, 2016
3
1
3
Indonesia
cPanel Access Level
Root Administrator
Come on anyone ?

My point is after we set :

WHM -- Server Configuration -- Tweak Settings -- Mail -- Initial default/catch-all forwarder destination : Fail

It is said that :

Forwarding destination for a new account’s catch-all/default address. (Users may modify this value via the Default Address interface in cPanel.) “Fail” rejects the message and notifies the remote SMTP server. This is usually the best choice if you are getting mail attacks. “Blackhole” accepts and processes the message but then silently discards it. This avoids notifying the remote SMTP server but violates SMTP RFC 5321 and generally should not be used.

in my situation, why it did not reject the message but notifies "250 Accepted" ?

Thanks
 

georg3otj

Registered
Sep 20, 2016
3
1
3
Indonesia
cPanel Access Level
Root Administrator
Problem solved !

Postfix log :

Sep 27 10:31:24 smtp0 postfix/smtp[8226]: 4D2F113FBBF: to=<[email protected]>, relay=xx.xx.xx.xx[xx.xx.xx.xx]:25, delay=10, delays=0.05/0/10/0.01, dsn=5.0.0, status=undeliverable (host xx.xx.xx.xx[xx.xx.xx.xx] said: 550 No such person here" (in reply to RCPT TO command))

Cpanel log :

2016-09-27 10:31:23 H=smtp0.mydomain.net [xx.xx.xx.xx]:54945 X=TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256 CV=no F=<[email protected]> rejected RCPT <[email protected]>: No such person here"
2016-09-27 10:31:23 SMTP connection from smtp0.mydomain.net [xx.xx.xx.xx]:54945 closed by QUIT

Solution :

Remove postfix ip address from :

WHM -- Service Configuration -- Exim Configuration Manager -- Basic Editor -- Access Lists

Sender verification bypass IP addresses
Trusted SMTP IP addresses

Credit to : Recipient Verification: Verify recipients: With callout not working as expected - Mail Protection: SMTP, POP3, Antispam and Antivirus - Sophos UTM 9 - Sophos Community

Thank you
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello,

I'm happy to see you were able to address the issue. Thank you for updating this thread with the outcome.