Skip to content

fix: connection check also covers the outgoing (SMTP) server - #60

Merged
mahype merged 1 commit into
mainfrom
bug/smtp-connection-check
Nov 2, 2026
Merged

mahype merged 1 commit into
mainfrom
bug/smtp-connection-check

Conversation

@mahype

@mahype mahype commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Problem

`--check-account` (Test Connection, startup sweep, 15-minute monitor) only logged into IMAP. A wrong SMTP host/port/password showed no error until the first send.

Änderung

  • `check_account_inner` now also connects and authenticates against SMTP (TLS/STARTTLS, EHLO, AUTH; nothing is sent) when `smtp` is configured. Same credential path as a send, token renewal included.
  • Failures use the existing `classify` (rejected / untrusted / unreachable) and are prefixed `outgoing server:`. Since the health log is fed by the same check, the status dot follows the same rules as for IMAP.
  • Accounts without SMTP are unchanged. IMAP failures keep their verdict (SMTP is only checked after IMAP succeeded).
  • Refactor: `list_account_mailboxes_inner` split into `cli_account` + `mailboxes_of`.

Tests

  • Unit tests: no SMTP → nothing to prove; dead SMTP port → failure with `outgoing server:`.
  • `cargo test --workspace` green.

🤖 Generated with Claude Code

Test Connection, the startup sweep and the background monitor only proved
IMAP, so a wrong outgoing host, port or password stayed green until the
first send. The check now also connects and authenticates against SMTP
(no mail is sent) when the account has one; failures classify like the
mailbox's and are prefixed 'outgoing server:'.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mahype
mahype merged commit a086ba7 into main Nov 2, 2026
4 checks passed
This was referenced Nov 2, 2026
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.

1 participant