~sircmpwn/aerc

331b915139e23073aa42bf28d67901383dd859ca — Luke Drummond 6 months ago 6dc537f
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] https://github.com/emersion/go-sasl/commit/61afe53d
[2] https://datatracker.ietf.org/doc/draft-murchison-sasl-login/
4 files changed, 10 insertions(+), 1 deletions(-)

M commands/compose/send.go
M doc/aerc-smtp.5.scd
M go.mod
M go.sum
M commands/compose/send.go => commands/compose/send.go +3 -0
@@ 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)

M doc/aerc-smtp.5.scd => doc/aerc-smtp.5.scd +4 -0
@@ 39,6 39,10 @@ available:
		Authenticate with a username and password using AUTH PLAIN. This is the
		default behavior.

	*+login*:
		Authenticate with a username and password using AUTH LOGIN. This is an obsolete
		protocol, but is required for some common webmail providers.

*outgoing-cred-cmd*
	Specifies the command to run to get the password for the SMTP
	account. This command will be run using `sh -c [command]`. If a

M go.mod => go.mod +1 -1
@@ 11,7 11,7 @@ require (
	github.com/emersion/go-imap-idle v0.0.0-20190519112320-2704abd7050e
	github.com/emersion/go-maildir v0.0.0-20190727102040-941194b0ac70
	github.com/emersion/go-message v0.10.7
	github.com/emersion/go-sasl v0.0.0-20190704090222-36b50694675c
	github.com/emersion/go-sasl v0.0.0-20190817083125-240c8404624e
	github.com/emersion/go-smtp v0.11.2
	github.com/fsnotify/fsnotify v1.4.7
	github.com/gdamore/tcell v1.1.5-0.20190724020331-84b54971b46c

M go.sum => go.sum +2 -0
@@ 28,6 28,8 @@ github.com/emersion/go-sasl v0.0.0-20190520160400-47d427600317 h1:tYZxAY8nu3JJQK
github.com/emersion/go-sasl v0.0.0-20190520160400-47d427600317/go.mod h1:G/dpzLu16WtQpBfQ/z3LYiYJn3ZhKSGWn83fyoyQe/k=
github.com/emersion/go-sasl v0.0.0-20190704090222-36b50694675c h1:Spm8jy+jWYG/Dn6ygbq/LBW/6M27kg59GK+FkKjexuw=
github.com/emersion/go-sasl v0.0.0-20190704090222-36b50694675c/go.mod h1:G/dpzLu16WtQpBfQ/z3LYiYJn3ZhKSGWn83fyoyQe/k=
github.com/emersion/go-sasl v0.0.0-20190817083125-240c8404624e h1:ba7YsgX5OV8FjGi5ZWml8Jng6oBrJAb3ahqWMJ5Ce8Q=
github.com/emersion/go-sasl v0.0.0-20190817083125-240c8404624e/go.mod h1:G/dpzLu16WtQpBfQ/z3LYiYJn3ZhKSGWn83fyoyQe/k=
github.com/emersion/go-smtp v0.11.2 h1:5PO2Kwsx+HXuytntCfMvcworC/iq45TPGkwjnaBZFSg=
github.com/emersion/go-smtp v0.11.2/go.mod h1:byi9Y32SuKwjTJt9DO2tTWYjtF3lEh154tE1AcaJQSY=
github.com/emersion/go-textwrapper v0.0.0-20160606182133-d0e65e56babe h1:40SWqY0zE3qCi6ZrtTf5OUdNm5lDnGnjRSq9GgmeTrg=