I tried swaks and got this:
=== Trying smtp.mailgun.org:587...
=== Connected to smtp.mailgun.org.
*** Remote host closed connection unexpectedly.
That inspired me to check from my other server, where swaks had “Great success” - the message is quite adorable!
<~ 250 Great success
~> QUIT
<~ 221 See you later. Yours truly, Mailgun
=== Connection closed with remote host.
So the issue is either with mailgun blocking my server, or my server somehow being misconfigured. I’ll check with mailgun and then if that’s not it then I’ll destroy and rebuild my server.