Skip to content

Feature/keyring#13

Merged
sspaeti merged 2 commits intomainfrom
feature/keyring
May 6, 2026
Merged

Feature/keyring#13
sspaeti merged 2 commits intomainfrom
feature/keyring

Conversation

@sspaeti
Copy link
Copy Markdown
Member

@sspaeti sspaeti commented May 6, 2026

Based on great insights from #5 I pulled relevant changes into the latest main branch, and left out the migration cmd as people can just update the config.toml.

I tested it and updated mine, seems to work fine. Thanks so much @notthatjesus. Let's see after that merge, if we need anything more, but I think, if you agree, we can close #5 afterward. Lets see, would be great if you can test yours again main too and latest version with this.

sspaeti and others added 2 commits May 6, 2026 10:07
Re-implementation of PR #5 onto current main. Differences vs the original PR:
- Resolves the "keyring" sentinel inside config.Load() rather than at IMAP
  construction time. This fixes the [[senders]] gap: SMTP send paths and
  sender aliases that reference an account now see the resolved password
  automatically without needing their own keyring lookup.
- OAuth2 token storage uses keyring with file fallback for headless/SSH.
  TokenSource keeps its existing func() (string, error) signature; no
  caller-side API changes.

Foundations only — :set-password / :migrate-to-keyring cmdline commands and
the password_prompt UI integration are intentionally deferred. Users on this
branch must seed the keyring externally (e.g. secret-tool, kwallet, or a
one-off Go helper) before launching neomd.

Co-Authored-By: Jesus Rodriguez <jesus.rodriguez.estevez@gmail.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sspaeti sspaeti merged commit 54d6ae4 into main May 6, 2026
4 checks passed
Comment thread internal/oauth2/oauth2.go
if err != nil {
return err
}
defer f.Close()
@sspaeti sspaeti deleted the feature/keyring branch May 6, 2026 10:28
@notthatjesus
Copy link
Copy Markdown
Contributor

Thanks for picking this up @sspaeti !! Apologies I couldn't get back to this, glad that the previous PR helped. I'll run some testing on Mac and Omarchy later today.

@sspaeti
Copy link
Copy Markdown
Member Author

sspaeti commented May 6, 2026

@notthatjesus No thank you! This is an amazing feature, and I could use most of it directly! I replaced my envs directly :)

Please test with v.0.8.0 with these additions included. Docs at https://neomd.ssp.sh/docs/configuration/#storing-passwords-in-the-os-keyring-linux

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