Apparently DigitalOcean blocks outbound SMTP on IPv6.
I can confirm this with telnet
as follows:
⟫ telnet smtp.gmail.com 465
Trying 2607:f8b0:400d:c07::6c...
> Waits for about 2 minutes before it continues <
Trying 173.194.204.108...
Connected to smtp.gmail.com.
Escape character is '^]'.
So it seems it falls back to IPv4 after a while.
Using telnet -4
works instantaneously:
⟫ telnet -4 smtp.gmail.com 465
Trying 173.194.204.108...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
I found that ssmtp
has a -4
option too:
-4
Forces ssmtp to use IPv4 addresses only.
For some reason however, I get the same result with and without -4
. ssmt
times out (or sometimes succeeds in sending the email after ~2 minutes).
My question: Why doesn't -4
work, even though telnet -4
can connect?
Alternatively: How do I best debug this? Is there some netcat
command or something that I can use to confirm that ssmtp
is really trying to connect over IPv4?
0 Answers