We basically want to avoid sending several emails to destination email addresses that have already been bounced.
I have a list in a database (currently sqlite, and also a flat file) of banned email address, namely addresses that have been previously bounced.
I would like to configure postfix to reject target that are present in that list. namely, I would like postfix to REJECT the email during 'RCPT TO' so that when smtp client tries to send to those destinations, they receive error directly. said diffently, I basically want the SMTP client to receive an error when he tries to target those email adresses.
I tried that solution here with usage of usage de smtpd_recipient_restrictions:
Block outgoing mail to specific address using Postfix - Server Fault Block outgoing mail to specific address using Postfix
But it seems to still contact the destination MX server. And the result is that Postifx still accept bad recipients (tried with PHPmailer).
Googling around, there also this post which could be relevant: postfix check_recipient_access syntax https://www.experts-exchange.com/questions/26889940/postfix-check-recipient-access-syntax.html
version : Postix 2.9.6-2