Re: [EXTERNAL] Re: MX records and relayhost: Am I going this correctly ?
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: on behalf of Wietse Venema Reply-To: Postfix users Date: Wednesday, October 26, 2022 at 15:38 To: Postfix users 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: mailto:owner-postfix-us...@postfix.org>> on behalf of Wietse Venema mailto:wie...@porcupine.org>> Reply-To: Postfix users mailto:postfix-users@postfix.org>> Date: Wednesday, October 26, 2022 at 14:09 To: Postfix users 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 INMX 10 relay-1.mydomain.tld. mydomain.tld. 33 INMX 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%2F4025391data=05%7C01%7Cdaniel.e.white%40nasa.gov%7C157b6b61ac174ded95ec08dab789b6c5%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638024099350096166%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=W%2BFFkuCrI0261JyqNAgyuuzngImMdHnVMl3HYmlRKQs%3Dreserved=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
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: on behalf of Wietse Venema > > Reply-To: Postfix users > Date: Wednesday, October 26, 2022 at 14:09 > To: Postfix users > Subject: [EXTERNAL] Re: MX records and relayhost: Am I going this correctly ? > > White, Daniel E. (GSFC-770.0)[AEGIS]: > MX Records: > >mydomain.tld. 33 INMX 10 > relay-1.mydomain.tld. >mydomain.tld. 33 INMX 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%2F4025391data=05%7C01%7Cdaniel.e.white%40nasa.gov%7Cec472cf769824ce55a8e08dab77d47f4%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638024045956278652%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=WFi3rKroF5DsLvomCS5NcG9%2ByCKQOlC3ITI1KFW4oyU%3Dreserved=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 > >
Re: [EXTERNAL] Re: MX records and relayhost: Am I going this correctly ?
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 ? Again, many thanks for the quick response From: on behalf of Wietse Venema Reply-To: Postfix users Date: Wednesday, October 26, 2022 at 14:09 To: Postfix users Subject: [EXTERNAL] Re: MX records and relayhost: Am I going this correctly ? White, Daniel E. (GSFC-770.0)[AEGIS]: MX Records: mydomain.tld. 33 INMX 10 relay-1.mydomain.tld. mydomain.tld. 33 INMX 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%2F4025391data=05%7C01%7Cdaniel.e.white%40nasa.gov%7Cec472cf769824ce55a8e08dab77d47f4%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638024045956278652%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=WFi3rKroF5DsLvomCS5NcG9%2ByCKQOlC3ITI1KFW4oyU%3Dreserved=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
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://access.redhat.com/solutions/4025391 > 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