Can anyone guide me in the following Postfix configuration? mx.example.com has local users who receive mail, it is an MX for a particular domain AND it is a mail gateway for users of its network.
1. mx.example.com should deliver mail for local users in the usual manner. If local delivery is impossible (one case is when amavis, which is specified as the content_filter, is down) it should queue it. 2. mx.example.com should deliver mail to example.org to finaldest.example.org, and if finaldest.example.org fails, it should queue it (mx.example.com is a MX for example.org, and if finaldest.example.org is down for long periods of time, I'd like to be able to get at the mails in the queue). I'm currently achieving this via a transport_maps line: example.org smtp:[finaldest.example.org] 3. mx.example.com should deliver all other mail (from the internal network) to relay.example.com port 10025 (this bypasses a second amavis check on relay.example.com and this is good since relay.example.com is not overly endowed with resources). However, if relay.example.com it should deliver mail to isp-relay.example.com, port 25. Why do I want #3? Well, I don't want to deliver mail directly because mx.example.com is on a residential ADSL connection and could be blocked at some point by the blackhole lists. I don't want to *normally* use isp-relay.example.com because it's got an incredibly slow re-try time on failures (every time I mail someone through it who greylists me the mail doesn't get through for 24 hours), but I want to have mail go somewhere when relay.example.com is down. But #3 is a pain in the butt especially in combination with #2. Things I've thought of doing: - setting relayhost to both [relay.example.com]:10025 and [isp-relay.example.com]:25, but relayhost only takes one value - creating an MX record, say, dummymx.example.com that returns both relay.example.com and isp-relay.example.com as mail exchangers, and then set relayhost = dummymx.example.com but the different port numbers make this impossible and doesn't help with #2 - setting relayhost = [relay.example.com]:10025 and smtp_fallback_relay = [isp-relay.example.com]:25 but then if amavis is down condition #1 is violated[1] and LOCAL mail starts being sent out to isp-relay.example.com, and if finaldest.example.org is down, example.org mail also heads for isp-relay.example.com. smtp_fallback_relay is too strong -Mary [1] This may be a bug in Postfix on the interaction between content_filter and smtp_fallback_relay, because man 5 postconf says "To prevent mailer loops between MX hosts and fall-back hosts, Postfix version 2.3 and later will not use the smtp_fallback_relay feature for destinations that it is MX host for." -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
