On Fri, Mar 16, 2012 at 12:37:21PM +0100, Pim Zandbergen wrote:

> I am routing all mail for a domain to another SMTP server using the
> transport map rule
> 
> adomain.com    relay:other.server

Good.

> But I would like to exclude mailing lists, and have them processed locally,
> using header_checks entries like this:
> 
> /^X-Mailing-List:/    FILTER local:

An MTA MUST NEVER route mail based on header content, headers only
imply recipients in the MUA in which the message is composed, or
in MUAs that delegate header parsing to the local submission
"sendmail -t" command.

Once a message has entered the mail stream, its recipients are
determined solely from the message envelope. This is CRITICAL,
otherwise messages to this list (for example) would loop, as the
headers would indicate the the message is addressed to the list,
rather than the envelope recipient, ...

> /^X-Mailing-List:/    REDIRECT some@address

DO NOT do this. If a particular recipient wants his list traffic left
a local mailbox, and the rest forwarded, that's up the to user's
LDA, say procmail(1), or similar. This must not be done at the
message level by the MTA which processes mail for multiple
recipients.

--
        Viktor.

Reply via email to