> On Dec 21, 2017, at 7:54 PM, li...@mypenguin.net.au wrote:
> 
> I've a very unique need to configure Postfix to deliver email based on
> source IP and destination email address. 
> 
> Example:
> -----------------------------------
> If:
>    Received: by mx0.example2.com AND Delivered-To:
> li...@mypenguin.net.au
> 
>    Action: Deliver
> else: 
>    Discard or Redirect (depending on user)
> fi
> -----------------------------------
> 
> Can postfix header_checks do this?

No.  Nor can any other MTA, because mail routing MUST be based
the message envelope recipients not header recipients.

> Looks like it'll only accept regex based on a line by line query?

Correct, but headers would be the wrong criterion anyway.

Policy services can return DISCARD verdicts for the message as
a whole, based on the envelope and message original.  Milters
or content filters should be able to delete specific recipients.

-- 
        Viktor.

Reply via email to