Hello!

My goal is to prevent our system from sending email to addresses that
for sure does not work, and attempt to send only email that has a
chance of being delivered.

I have this in my Postfix configuration:

smtpd_recipient_restrictions =
  reject_non_fqdn_recipient,
  reject_unknown_recipient_domain,
  check_recipient_access hash:/etc/postfix/recipient_access

And recipient_access contents:
@example.com    reject


If somebody sends email to j...@example.com the email is rejected as
expected. Also, as expected, if somebody sends email with
"john@example" the email is not delivered since "example" is not a
fully qualified domain.

However if the email has multiple recipients and all other addresses
are valid but one, the whole mail is rejected by Postfix.

Example:

$ example-sendmail-wrapper "To: j...@real-address.com, john@example"
sendmail: recipient address john@example not accepted by the server
sendmail: server message: 450 4.1.2 <john@example>: Recipient address
rejected: Domain not found

Rejecting john@example is correct here. However, when this happens,
j...@real-address.com will not get her message, which is a problem.

How can I configure Postfix so that _only_ malformed addresses are not
delivered to the next SMTP host, while the rest of the recipients in
the same email/To/CC/BCC are delivered as usual?


- Otto

Reply via email to