Rant: Email is straight from hell

Abstract
A short but not-so-fun email debugging session.

Today, I used git send-email for the first time. I tried adding this this to my gitconfig

[sendemail]
    smtpencryption = tls
    smtpserver = mail.gmx.net
    smtpserverport = 465
    smtpuser = volker.weissmann@gmx.de

If you think that the email-ecosystem is not a complete clusterfuck, you might assume that this will work. But nope, we get this unhelpful error message:

$ git send-email --to=libc-alpha@sourceware.org 0001-Fix-FORTIFY_SOURCE-false-positive.patch
...
Unable to initialize SMTP properly. Check config and use --smtp-debug. VALUES: server=mail.gmx.net encryption=tls hello=censored port=465 at /usr/lib/git-core/git-send-email line 1707.

But hey, at least it tells me to add the --smtp-debug flag. So lets try that:

$ git send-email --to=libc-alpha@sourceware.org 0001-Fix-FORTIFY_SOURCE-false-positive.patch --smtp-debug
...
Unable to initialize SMTP properly. Check config and use --smtp-debug. VALUES: server=mail.gmx.net encryption=tls hello=censored port=465 at /usr/lib/git-core/git-send-email line 1707.

Turns out that --smtp-debug is not the correct flag, --smtp-debug=1 is, so let’s try that:

$ git send-email --to=libc-alpha@sourceware.org 0001-Fix-FORTIFY_SOURCE-false-positive.patch --smtp-debug=1
Net::SMTP>>> Net::SMTP(3.15)
Net::SMTP>>>   Net::Cmd(3.15)
Net::SMTP>>>     Exporter(5.77)
Net::SMTP>>>   IO::Socket::IP(0.4101)
Net::SMTP>>>     IO::Socket(1.52)
Net::SMTP>>>       IO::Handle(1.52)
Net::SMTP: Net::Cmd::getline(): unexpected EOF on command channel:  at /usr/lib/git-core/git-send-email line 1680.
Unable to initialize SMTP properly. Check config and use --smtp-debug. VALUES: server=mail.gmx.net encryption=tls hello=censored port=465 at /usr/lib/git-core/git-send-email line 1707.

Ok, we get nothing fucking useful. Now take a guess why this did not work. I give you a hint: It is the most bullshit reason possible. Did you make a guess? Then here is the solution: smtpencryption = ssl works, but smtpencryption = tls dow not. Seriously. I kid you not. This amount of bullshit actually exists in the email-ecosystem.

Those are the moments when I ask myself if I should have stayed in Physics.