Fix integration tests: allow plain-text auth in Stalwart dev config
Stalwart 0.14 disables PLAIN/LOGIN on non-TLS ports by default: - [imap.auth] allow-plain-text = true → unblocks IMAP LOGIN - [session.auth] mechanisms + allow-plain-text → advertises PLAIN/LOGIN on SMTP Also fix test: SMTP authenticates as "alice" not "alice@localhost" (Stalwart SMTP auth accepts username without domain, unlike IMAP login) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
818f66c738
commit
0e2021f343
@@ -61,3 +61,12 @@ email = ["bob@localhost"]
|
||||
[authentication.fallback-admin]
|
||||
user = "admin"
|
||||
secret = "admin"
|
||||
|
||||
# Allow LOGIN/PLAIN on the clear-text dev ports (no TLS in local test env).
|
||||
# By default Stalwart only advertises PLAIN/LOGIN when is_tls — override that.
|
||||
[imap.auth]
|
||||
allow-plain-text = true
|
||||
|
||||
[session.auth]
|
||||
mechanisms = "[plain, login, oauthbearer, xoauth2]"
|
||||
allow-plain-text = true
|
||||
|
||||
@@ -63,7 +63,7 @@ void main() {
|
||||
final smtpClient = SmtpClient('test');
|
||||
await smtpClient.connectToServer(imapHost, smtpPort, isSecure: false);
|
||||
await smtpClient.ehlo();
|
||||
await smtpClient.authenticate('$userA@localhost', passA);
|
||||
await smtpClient.authenticate(userA, passA);
|
||||
|
||||
final builder = MessageBuilder()
|
||||
..from = [MailAddress('Alice', '$userA@localhost')]
|
||||
|
||||
Reference in New Issue
Block a user