Skip to content

feat: make SMTP AUTH mechanism selectable per channel - #347

Merged
stefan-ernst merged 1 commit into
Windshiftapp:mainfrom
m0nt0:feat/smtp-auth-method
Oct 16, 2026
Merged

stefan-ernst merged 1 commit into
Windshiftapp:mainfrom
m0nt0:feat/smtp-auth-method

Conversation

@m0nt0

@m0nt0 m0nt0 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

The outbound SMTP channel always authenticated with AUTH PLAIN, so servers that only offer LOGIN (Office 365/Exchange, many hosting providers) or CRAM-MD5 could not be used.

Add an smtp_auth_method channel setting:

  • auto (default, also used for existing channels): pick the first of PLAIN, LOGIN, CRAM-MD5 advertised by the server in EHLO, falling back to PLAIN when nothing is advertised (previous behavior)
  • plain / login / cram-md5: force a mechanism, with a clear error when the server does not advertise it
  • none: never authenticate, even if credentials are stored

AUTH LOGIN is implemented locally since net/smtp does not provide it. All mechanisms refuse to send credentials over an unencrypted connection, and unknown values are rejected by ValidateTransport.

The channel config UI gets an "Authentication method" selector, with translations for the required locales.

The outbound SMTP channel always authenticated with AUTH PLAIN, so servers
that only offer LOGIN (Office 365/Exchange, many hosting providers) or
CRAM-MD5 could not be used.

Add an `smtp_auth_method` channel setting:
- auto (default, also used for existing channels): pick the first of
  PLAIN, LOGIN, CRAM-MD5 advertised by the server in EHLO, falling back
  to PLAIN when nothing is advertised (previous behavior)
- plain / login / cram-md5: force a mechanism, with a clear error when
  the server does not advertise it
- none: never authenticate, even if credentials are stored

AUTH LOGIN is implemented locally since net/smtp does not provide it. All
mechanisms refuse to send credentials over an unencrypted connection, and
unknown values are rejected by ValidateTransport.

The channel config UI gets an "Authentication method" selector, with
translations for the required locales.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@m0nt0

m0nt0 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Oct 15, 2026
@m0nt0

m0nt0 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

needed to auth mail on office365 so i've used claude to make this. seems pretty straight forward as a patch. Deployed on my instance at work (i'm setting up windshift to be used).

@stefan-ernst
stefan-ernst self-requested a review October 16, 2026 15:00
@stefan-ernst
stefan-ernst merged commit 38ab76f into Windshiftapp:main Oct 16, 2026
1 of 2 checks passed
@stefan-ernst

Copy link
Copy Markdown
Contributor

Looks good, merging this in for the next release as it features a lot new email features that will be usable right away with o365

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