User: Password:
|
|
Subscribe / Log in / New account

Quotes of the week[s]

Quotes of the week[s]

Posted Jan 4, 2014 15:12 UTC (Sat) by anselm (subscriber, #2796)
In reply to: Quotes of the week[s] by jackb
Parent article: Quotes of the week[s]

So what I need Postfix (or some suitable alternate) to do is:
1. Don't attempt to deliver mail directly to the recipient's SMTP server. Instead act as a proxy for the SMTP servers provided by Gmail, etc.
2. Choose an upstream SMTP server to route outgoing messages through based on recipient-based rules.
3. Rewrite the From field based on the upstream SMTP server used.

No problem. #1 is pretty trivial to solve by telling Postfix about your credentials for those services (using the smtp_sasl_auth_enable and smtp_sasl_password_maps parameters, and possibly smtp_tls_security_level to enable encryption and authentication). #2 can be done using transport_maps, and #3 using smtp_generic_maps.


(Log in to post comments)

Quotes of the week[s]

Posted Jan 5, 2014 12:27 UTC (Sun) by jackb (guest, #41909) [Link]

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.

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 master.cf 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