@lbutlr:
> Useful, but not helpful in this case because there is no way to have =
> postfix check two headers

Who says that one has to implement this with headers?

Do it with envelopes instead:

http://www.postfix.org/RESTRICTION_CLASS_README.html

Admittedly, this is somewhat difficult to set up, but it handles
combinations of arbitrary check_mumble_access restrictions.

UNTESTED example:

/etc/postfix/main.cf:
    smtpd_restriction_classes = from_amazon_only

    from_amazon_only = 
        # Alternative: check_client_access, but that depends on DNS.
        check_sender_access inline:{ { amazon.com = ok } } 
        check_sender_access static:{ 550 5.7.1 You are not amazon.com }

    smtpd_recipient_restrictions =
        ...
        check_recipient_access inline:{ { user+amazon@ = from_amazon_only } }
        ...

        Wietse

Reply via email to