sfqsf qsfsfq: > Hello, > > I would like to configure Postfix to reject mail whose destination > match a few addresses IF the mail was not sent from our internal > network. > > Basically i would like to do a header_checks on 2 lines (Received: and > To:) but the documentation says that it's not possible.
Instead of headers, use the envelope recipient address and the client IP address. You can't RELIABLY determine the recipient from the message header. > What is the easiest way to do it ? (Using a spam filter is not possible) Use a policy daemon to examine the envelope recipient and the client IP address. The perl-based demo script that is included with Postfix source code should be sufficient. Wietse > Thanks in advance, > > Anonymous Coward > >