mirror of
https://github.com/stoatchat/rust-authifier.git
synced 2026-07-19 17:53:31 -04:00
[PR #68] feat: Allow anonymous SMTP relays #68
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/stoatchat/rust-authifier/pull/68
Author: @Assisting
Created: 2/15/2026
Status: 🔄 Open
Base:
master← Head:conditional-lettre-credentials📝 Commits (2)
8112470Add check for presence of real username and password before SMTP auth mechanism. Test account creation emails send with anonymous relay.cadeda9Remove unused iso8601 usings (didn't do a refactor in the end)📊 Changes
2 files changed (+51 additions, -4 deletions)
View changed files
📝
crates/authifier/src/config/email_verification.rs(+7 -4)📝
crates/rocket_authifier/src/routes/account/create_account.rs(+44 -0)📄 Description
Fixes stoatchat/stoatchat#586
Local SMTP relays may not be set up to require authentication. This PR fixes a crash where an attempt to not supply a username/password in order to avoid authentication resulted in failures with Lettre; if either the username or password is absent, the call to
.credentialsis avoided, which should leave us with the default behaviour to use no authentication.Rather than refactoring the SMTP settings to use
Options, I tried to keep things tightly scoped and instead this code will check if a username and password are both present before falling back to trying an anonymous connection; this should result in meaningful error messages from the relay if it were to happen by accident.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.