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
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