-1

I want to do the recipient address verification for some domains, but many domains I want to exclude from verification. These are subdomains of domains that are being verified and MySQL lookups matches these domains: Keys are the domains and values are the string reject_unverified_recipient.

I need to do MySQL exact domain verification. Can anyone help me? Thanks in advance.

Axel Beckert
  • 398
  • 2
  • 17

1 Answers1

2

You should be able to achieve it with Postfix restriction classes

#/etc/postfix/main.cf

relay_domains = domain1.tld, sub.domain1.tld
relay_recipient_maps = 
smtpd_restriction_classes = restrictive, permissive

restrictive = reject_unverified_recipient
permissive = permit

smtpd_recipient_restrictions = 
  permit_mynetworks,
  reject_unauth_destination,
  check_recipient_access hash:/etc/postfix/verify_domains


#/etc/postfix/verify_domains
domain1.tld     restrictive
sub.domain1.tld permissive

Hash lookup table is used here. You can achieve the same using mysql lookup table also.

clement
  • 875
  • 5
  • 9