#740·himalaya

v2: stale v1 config keys are silently dropped — misleading 'No backend matching `auto`' error

Author: axialhashCreated Aug 26, 2026Updated Aug 26, 2026

Question

No question here — filing as a bug/UX report instead. Sorry for the noise if misplaced.

Describe your issue

Upgrading a working v1.x Gmail config to v2.1.0 by keeping the old key layout produces a misleading error, with zero warnings even at RUST_LOG=trace.

A v1-style account block:

toml
[accounts.ali]
email = "[email protected]"
default = true
backend.type = "imap"
backend.host = "imap.gmail.com"
backend.port = 993
backend.login = "[email protected]"
message.send.backend.type = "smtp"
message.send.backend.host = "smtp.gmail.com"

fails on every command with:

Error: No backend matching `auto` is configured for this account
Suggestions:
 - Run with --log-level to enable more verbose logs

The verbose logs don't mention anything either (checked at trace). The actual problem is that all of these keys were removed/renamed in v2 (imap.server, smtp.server, imap.sasl.plain.*, global [mailbox.alias], …), so the deserializer drops them as unknown keys and the account ends up with no backend at all.

Expected: either unknown keys under [accounts.*] produce a warning ("unknown configuration key backend.type, did you mean …?"), or the no-backend error hints that removed v1 keys may be the cause and links to MIGRATION.md.

Reproducing config for v2 (for anyone hitting this via search):

toml
mailbox.alias.inbox = "INBOX"
mailbox.alias.sent = "[Gmail]/Sent Mail"

[accounts.ali]
email = "[email protected]"
default = true

imap.server = "imaps://imap.gmail.com:993"
imap.sasl.plain.username = "[email protected]"
imap.sasl.plain.password.command = "cat ~/.config/himalaya/.pw"

smtp.server = "smtp://smtp.gmail.com:587"
smtp.starttls = true
smtp.sasl.plain.username = "[email protected]"
smtp.sasl.plain.password.command = "cat ~/.config/himalaya/.pw"

Additional context

  • MIGRATION.md documents the new layout well; the failure mode just gives no hint that's where to look.
  • Minor doc inconsistency spotted while fixing this: MIGRATION.md shows SASL PLAIN as authcid/passwd.*, master's config.sample.toml uses username/password.*. Both work on v2.1.0 (aliases), but aligning docs would help.

Version

himalaya v2.1.0 +pimdir +imap +rustls-ring +msgraph +jmap +m2dir +gmail +smtp +maildir build: linux musl x86_64