On Mon, Aug 14, 2023 at 04:13:54PM -0300, SysAdmin EM via Postfix-users wrote:

> Hi, Is it possible to discard an email based on the Subject and the
> destination email address?

> I try this and not work:
> 
> /^Subject:.*Test email subject .*To:.*m...@me.com/ DISCARD

Note that "the destination email address" is NOT what you see in the
"To:" or "Cc:" headers, for example, you're reading this list without
the message headers mentioning your address.  The recipient information
is in the message "envelope", so not available to header checks as a
matter of principle.

In a milter you can squirrel away the envelope address(es), and then
take it(them) into consideration while examining the message headers.

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to