~rjarry/aerc-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 3

[PATCH aerc] Implement CRAM-MD5 SMTP Auth protocol

Details
Message ID
<172933303490.13134.12569944636701698585-0@git.sr.ht>
DKIM signature
missing
Download raw message
Patch: +19 -0
From: Tamás Gulácsi <tamas@gulacsi.eu>

Fixes ~rjarry/aerc#282
---
 lib/send/sasl.go | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/lib/send/sasl.go b/lib/send/sasl.go
index 01e006e3..13451ce3 100644
--- a/lib/send/sasl.go
+++ b/lib/send/sasl.go
@@ -2,6 +2,7 @@ package send

import (
	"fmt"
	"net/smtp"
	"net/url"

	"github.com/emersion/go-sasl"
@@ -23,6 +24,10 @@ func newSaslClient(auth string, uri *url.URL) (sasl.Client, error) {
	case "plain":
		password, _ := uri.User.Password()
		saslClient = sasl.NewPlainClient("", uri.User.Username(), password)
	case "cram-md5":
		password, _ := uri.User.Password()
		saslClient = stdSaslClient{smtp.CRAMMD5Auth(uri.User.Username(), password)}

	case "oauthbearer":
		q := uri.Query()
		oauth2 := &oauth2.Config{}
@@ -70,8 +75,22 @@ func newSaslClient(auth string, uri *url.URL) (sasl.Client, error) {
			password = token.AccessToken
		}
		saslClient = lib.NewXoauth2Client(uri.User.Username(), password)

	default:
		return nil, fmt.Errorf("Unsupported auth mechanism %s", auth)
	}
	return saslClient, nil
}

type stdSaslClient struct {
	smtp.Auth
}

var _ sasl.Client = stdSaslClient{}

func (c stdSaslClient) Start() (mech string, ir []byte, err error) {
	return c.Auth.Start(nil)
}
func (c stdSaslClient) Next(challenge []byte) (response []byte, err error) {
	return c.Auth.Next(challenge, len(challenge) != 0)
}
-- 
2.45.2

[aerc/patches] build failed

builds.sr.ht <builds@sr.ht>
Details
Message ID
<D4ZPF9F8EKT4.1TNSLR3HMIOEX@fra02>
In-Reply-To
<172933303490.13134.12569944636701698585-0@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
aerc/patches: FAILED in 1m10s

[Implement CRAM-MD5 SMTP Auth protocol][0] from [~tgulacsi][1]

[0]: https://lists.sr.ht/~rjarry/aerc-devel/patches/55543
[1]: tamas@gulacsi.eu

✗ #1353612 FAILED  aerc/patches/alpine-edge.yml https://builds.sr.ht/~rjarry/job/1353612
✓ #1353613 SUCCESS aerc/patches/openbsd.yml     https://builds.sr.ht/~rjarry/job/1353613
Details
Message ID
<D4ZRYC8ABYAT.36LET8XDQUWDU@ferdinandy.com>
In-Reply-To
<172933303490.13134.12569944636701698585-0@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
Hi Tamás,

On Sat Oct 19, 2024 at 12:09, ~tgulacsi <tgulacsi@git.sr.ht> wrote:
> From: Tamás Gulácsi <tamas@gulacsi.eu>
>
> Fixes ~rjarry/aerc#282
> ---

thanks for the patch! You probably want to run `gmake gitconfig` and `make
lint` before sending (although the former will only help with git-send-email).

Fixes works like this on sourcehut:

Fixes: https://todo.sr.ht/~rjarry/aerc/16

Also your commit title is missing a prefix, a body explaining the change and
I guess a Changelog-added: trailer and needs to be signed off.

Contributing.md should have the details.

Thanks,
Bence


-- 
bence.ferdinandy.com
Details
Message ID
<D53A8DWXF2SB.2J85MJ9GD257W@timculverhouse.com>
In-Reply-To
<172933303490.13134.12569944636701698585-0@git.sr.ht> (view parent)
DKIM signature
pass
Download raw message
On Sat Oct 19, 2024 at 5:17 AM CDT, ~tgulacsi wrote:
> From: Tamás Gulácsi <tamas@gulacsi.eu>
>
> Fixes ~rjarry/aerc#282
> ---

Hey Tamás -

In addition to Bence's comments, we need to add this to the docs:
  doc/aerc-smtp.5.scd

Thanks!

-- 
Tim
Reply to thread Export thread (mbox)