Thank you again.
Great information.
______________________________________________________________________________________________

Daniel E. White
daniel.e.wh...@nasa.gov<mailto:daniel.e.wh...@nasa.gov>
NASCOM Linux Engineer
NASA Goddard Space Flight Center
Office: (301) 286-6919
Mobile: (240) 513-5290

From: <owner-postfix-us...@postfix.org> on behalf of Wietse Venema 
<wie...@porcupine.org>
Reply-To: Postfix users <postfix-users@postfix.org>
Date: Wednesday, October 26, 2022 at 15:38
To: Postfix users <postfix-users@postfix.org>
Subject: Re: [EXTERNAL] Re: MX records and relayhost: Am I going this correctly 
?

White, Daniel E. (GSFC-770.0)[AEGIS]:
Many thanks for the sanity check, Mr. Postfix

I am using the explicit domain name rather than $mydomain mainly on client 
machines because they are not guaranteed to have the same domain as the mail 
servers.

Is there any way to shorten/remove the delay I saw in the MX-failover ?

By reducing smtp_connect_timeout from the default 300s to a more
reasonable value, maybe 10-30s.

Note that Postfix will shuffle the order of equal-preference MX
hosts, so that a down server will delay only some of the traffic.

                Wietse

Again, many thanks for the quick response

From: <owner-postfix-us...@postfix.org<mailto:owner-postfix-us...@postfix.org>> 
on behalf of Wietse Venema <wie...@porcupine.org<mailto:wie...@porcupine.org>>
Reply-To: Postfix users 
<postfix-users@postfix.org<mailto:postfix-users@postfix.org>>
Date: Wednesday, October 26, 2022 at 14:09
To: Postfix users <postfix-users@postfix.org<mailto:postfix-users@postfix.org>>
Subject: [EXTERNAL] Re: MX records and relayhost: Am I going this correctly ?

White, Daniel E. (GSFC-770.0)[AEGIS]:
MX Records:

            mydomain.tld.   33           IN            MX         10 
relay-1.mydomain.tld.
            mydomain.tld.   33           IN            MX         20 
relay-2.mydomain.tld.

with relay-1 and relay-2 having appropriate A and PTR records.

Then in /etc/postfix/main.cf, I have

         relayhost = mydomain.tld

I have seen this work with relay-1 unavailable.

This is the obvious (to me) approach when the domain has multiple
MX hosts. It is also similar to the first relayhost  example in the
stock main.cf file:

     relayhost = $mydomain

The outgoing message sat in the queue for a brief time, then went
out through relay-2.

I found a Red Hat solution 
https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Faccess.redhat.com%2Fsolutions%2F4025391&amp;data=05%7C01%7Cdaniel.e.white%40nasa.gov%7C157b6b61ac174ded95ec08dab789b6c5%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638024099350096166%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=W%2BFFkuCrI0261JyqNAgyuuzngImMdHnVMl3HYmlRKQs%3D&amp;reserved=0
that suggests using

            relayhost = [relay-1.mydomain.tld]
            smtp_fallback_relay = [relay-2.mydomain.tld]

This also works, but it would be less obvious to me.

                 Wietse



Reply via email to