Add support for AUTH LOGIN submission

`go-sasl` upstream added support [1] for the obsolete [2] AUTH LOGIN
method which enables aerc to send email via servers which remain common
in the wild.

Fixes ~sircmpwn/aerc2#263

[1] 61afe53d
[2] https://datatracker.ietf.org/doc/draft-murchison-sasl-login/
This commit is contained in:
Luke Drummond 2019-10-29 17:11:38 +00:00 committed by Drew DeVault
parent 6dc537fbe3
commit 331b915139
4 changed files with 10 additions and 1 deletions
commands/compose

View file

@ -92,6 +92,9 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error {
fallthrough
case "none":
saslClient = nil
case "login":
password, _ := uri.User.Password()
saslClient = sasl.NewLoginClient(uri.User.Username(), password)
case "plain":
password, _ := uri.User.Password()
saslClient = sasl.NewPlainClient("", uri.User.Username(), password)