PGNet Dev
2020-Oct-15 20:04 UTC
how to set smtp-client -> submission_relay_host for IPv4 only?
In dovecot conf, for submission relay, I've config'd submission_relay_host = lan.example.com submission_relay_port = 465 hostname -- not IP -- must be used, to inform relay for cert verification match. Here, host lan.example.com lan.example.com has address 10.0.1.47 lan.example.com has IPv6 address fd80:25:01::47 The receiving smtp relay listens only on IPv4 -- no IPv6 service, telnet 10.0.1.47 465 Trying 10.0.1.47... Connected to 10.0.1.47. Escape character is '^]'. telnet -6 fd80:25:01::47 465 Trying fd80:25:01::47... telnet: connect to address fd80:25:01::47: Connection refused On the lan, all boxes are set, in "/etc/gai.conf", for IPv6 to take precedence over IPv4. On submission to dovecot submission port, after login/auth, dovecot smtp-client subsequently connects to the relay lan.example.com:465 IPv6 1st, & fails 2020-10-15 12:51:45 submission(mua at example.com)<8OJP+rqxuvho7Z95>: Error: smtp-client: conn lan.example.com:465 ([fd80:25:01::47]:465) [1]: connect(lan.example.com:465) failed: Connection refused then falls back to IPv4, and continues OK 2020-10-15 12:51:45 submission(mua at example.com)<8OJP+rqxuvho7Z95>: Info: Successfully relayed message: from=<test at remote.example.com>, size=84, id=LMe...Aw, nrcpt=1, reply=`247 2.0.0 Ok: queued as 4CC0KY1wXNzWf93' not fatal, but wasted effort, and noise in the logs. how/where do I configure (just) the dovecot smtp-client -> submission_relay_host to only connect IPv4?
jeremy ardley
2020-Oct-15 21:02 UTC
how to set smtp-client -> submission_relay_host for IPv4 only?
On 16/10/2020 4:04 am, PGNet Dev wrote:> 2020-10-15 12:51:45 submission(mua at example.com)<8OJP+rqxuvho7Z95>: Info: Successfully relayed message: from=<test at remote.example.com>, size=84, id=LMe...Aw, nrcpt=1, reply=`247 2.0.0 Ok: queued as 4CC0KY1wXNzWf93' > > not fatal, but wasted effort, and noise in the logs. > > how/where do I configure (just) the dovecot smtp-client -> submission_relay_host to only connect IPv4?It appears your host has A and AAAA records in your DNS. The clients will try IPV6 first if they see an AAAA record. If you don't need IPV6 for your host remove the AAAA record. All connections will then only use IPV4. If you need IPV6 for some other reason then create an alias DNS A record and point your clients to that instead e.g. myhost? A 192.0.2.1 AAAA 2001:db8::1 myhostv4 A 192.0.2.1 you will have to change your certificate to include the alias myhost4 -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20201016/fa4b6047/attachment.html>
PGNet Dev
2020-Oct-15 21:52 UTC
how to set smtp-client -> submission_relay_host for IPv4 only?
On 10/15/20 2:02 PM, jeremy ardley wrote:>> how/where do I configure (just) the dovecot smtp-client -> submission_relay_host to only connect IPv4? > > It appears your host has A and AAAA records in your DNS. The clients will try IPV6 first if they see an AAAA record. > > If you don't need IPV6 for your host remove the AAAA record. All connections will then only use IPV4. > > If you need IPV6 for some other reason then create an alias DNS A record and point your clients to that insteadThat's not the issue. All my machines are dual stack. All my hosts' DNS records exist for both A & AAAA records. Some services listen on only IPv4, some only on IPv6, some both. For Dovecot _listeners_ it's trivial to set IPv4/6-only, or both, addresses. It's also trivial to set OTHER clients, connecting TO Dovecot, to use IPv4-only. I'm asking how/where to 'tell', via config, Dovecot's smtp-CLIENT, that's making to connection to the submission_relay_host, to use _only_ IPv4.
Seemingly Similar Threads
- how to set smtp-client -> submission_relay_host for IPv4 only?
- how to set smtp-client -> submission_relay_host for IPv4 only?
- how to set smtp-client -> submission_relay_host for IPv4 only?
- how to set smtp-client -> submission_relay_host for IPv4 only?
- IPv6 subnet routing