User: Password:
Subscribe / Log in / New account

Quotes of the week[s]

Quotes of the week[s]

Posted Jan 5, 2014 12:27 UTC (Sun) by jackb (guest, #41909)
In reply to: Quotes of the week[s] by anselm
Parent article: Quotes of the week[s]

Can smtp_generic_maps really do that? Every example I've ever seen is a stating mapping between a local address and a single globally valid address, not a set of mappings that can transform a local address into one of several different global addresses based on some parameter.

(Log in to post comments)

Quotes of the week[s]

Posted Jan 5, 2014 13:23 UTC (Sun) by anselm (subscriber, #2796) [Link]

My approach would probably be to use transport_maps to select the appropriate transport out of a set of SMTP transports (one per upstream mail provider) based on the destination address, and to use one generic map per SMTP transport, defined via a command-line option on that transport's definition in to fix up the »From« as required for that provider. I haven't tested it but it should do what is needed. At least it moves the configuration from the MUA to the MTA so it needs to be set up in one place only rather than once per device.

You need smtp_generic_maps (which is handled by Postfix's SMTP client) and not something like sender_canonical_maps (which is handled by the incoming-mail part of Postfix) because you're dealing with outgoing mail depending on where it is going.

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds