juan smitt:
> Hi,
>
>
> We have some rules to drop emails sent to certain recipients.
>
> main.cf:
> smtpd_recipient_restrictions = check_recipient_access
> regexp:/etc/postfix/custom_recipient_blacklist_regex
>
> custom_recipient_blacklist_regex:
> /^[email protected]$/ discard
>
> The problem is when an email has more recipients and any of those
> matches this rule the whole email is discarded.
>
> Is there a better way to let the other recipients get the emails and
> only drop the blacklisted one?
1) Reject the recipient.
/^dummy@whatever\.fqdn$/ reject
2) Accept the message, and deliver to the discard delivery agent.
/etc/postfix/main.cf:
transport_maps = regexp:/etc/postfix/transport_re
/etc/postfix/transport_re
/^dummy@whatever\.fqdn$/ discard:
3) Receive only one recipient at a time (Postfix replies with 4XX
for the excess recipients).
/etc/postfix/main.cf:
smtpd_recipient_limit = 1
This is a terrible solution can that result in large delays.
4) Make Postfix smarter so that it can predict the future.
This is not yet implemented.
Wietse