Skip to content

smtp: add LOGIN SASL auth directive#839

Merged
foxcpp merged 1 commit intofoxcpp:masterfrom
osnabrugge:feat/smtp-login-auth
Apr 17, 2026
Merged

smtp: add LOGIN SASL auth directive#839
foxcpp merged 1 commit intofoxcpp:masterfrom
osnabrugge:feat/smtp-login-auth

Conversation

@osnabrugge
Copy link
Copy Markdown
Contributor

Summary

Add support for a login SASL authentication directive in the SMTP target.

Changes

  • Extend the SMTP SASL directive parser to accept login alongside plain
  • Use sasl.NewLoginClient(...) when login is selected
  • Add a focused unit test covering the LOGIN directive and mechanism name

Why

Some SMTP relays only support the LOGIN authentication mechanism and reject PLAIN. This makes Maddy usable with those upstream relays without requiring downstream patching or custom images.

Validation

  • Patch applies cleanly on current upstream
  • go test ./internal/target/smtp -run TestSASL_Login_Directive -count=1 -timeout 90s

Notes

This is a narrow change limited to the SMTP target SASL directive path and preserves existing plain behavior.

@foxcpp foxcpp merged commit 08a80ba into foxcpp:master Apr 17, 2026
3 checks passed
@foxcpp
Copy link
Copy Markdown
Owner

foxcpp commented Apr 17, 2026

Thanks!

@osnabrugge
Copy link
Copy Markdown
Contributor Author

You're more than welcome! This was needed so that Maddy could authenticate to Azure Communication Services

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants