Francis Brosnan Bl?zquez:
> At this point, we are trying to discard based on the destination
> domain and/or the local-part@ (without considering the destination
> domain) by reporting a DISCARD code using delegation protocol (with
> valvula [1]).

As documented, the DISCARD action discards the message, not the
recipient.  To drop only the recipient, use transport_maps to send
the recipient to the discard(8) service.

/etc/postfix/main.cf:
    transport_maps = hash:/etc/postfix/transport

/etc/postfix/transport:
    u...@example.com    discard:

After changing the file, do "postmap hash:/etc/postfix/transport".

To discard a recipient based on localpart, use a pcre table instead;
this requires no postmap command.

/etc/postfix/main.cf:
    transport_maps = pcre:/etc/postfix/transport

/etc/postfix/transport:
    # The ^ at the beginning is required to avoid false matches.
    /^user@/    discard:

Of course this will have collateral damage; it discards mail for
recipients in unrelated domains.

        Wietse

Reply via email to