I would like to sanity-check a configuration change.

My current config has the MTA relaying to multiple mailbox servers using transport_maps with entries like:

example.com foo:[a.example.com]
example.net foo:[a.example.com]
example.org bar:[b.example.com]

It works fine. I get per-domain delivery routing and can use defer_transports to pause delivery on a per-server basis. But it's annoying and a bit error prone having the nexthop specified repeatedly in transport_maps.

I'd rather specify it once for each transport. Those are delivery smtp clients, so it's too late to use relayhost. But I did find the best_mx_transport option:

In master.cf:

testrelay unix - - n - - smtp
  -o best_mx_transport=testrelay:[chombo.houseloki.net]:587
  -o smtp_fallback_relay=
  -o syslog_name=postfix/$service_name

And in the transport_maps db:

test.evilphi.com testrelay:

Which does work:

postfix/testrelay/smtp[41199]: C3F34112532: passing <[email protected]> to transport=testrelay postfix/testrelay/smtp[41201]: Untrusted TLS connection established to chombo.houseloki.net[65.100.43.2]:587: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 postfix/testrelay/smtp[41201]: C3F34112532: to=<[email protected]>, relay=chombo.houseloki.net[65.100.43.2]:587, delay=0.77, delays=0.03/0.03/0.56/0.16, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 6B4199CE)

But that feels like a hack. I'm not specifying nexthop at the "correct" time, but instead exploiting the handling of a failure scenario.

Is there a better way to do this that isn't what I already have?
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to