-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
accounts/email: add protocol-specific userName options #8302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
could you share an example where it would be useful ? if we introduce complexity, we need to justify it |
|
Sure! I'm personally facing this problem with an account provided by my university. The issue is that I can't manage a single account outside of Home-Manager, because every switch reverts my manual changes. |
Signed-off-by: tsrk. <[email protected]>
Add optional userName fields to IMAP and SMTP submodules, allowing different usernames for IMAP and SMTP servers. When not specified, the account-level userName is used as a fallback. This change updates all email programs (mbsync, msmtp, offlineimap, getmail, neomutt, aerc, thunderbird, git) to use the protocol-specific username when available.
0cb638e to
55173fd
Compare
| default = null; | ||
| description = '' | ||
| The server username for SMTP. If `null`, | ||
| the account-level `userName` will be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be simpler to inherit the top level userName and use defaultText = ${topLevelUsrName}.
I am not sure how feasible that is though. Shall one pass the name to the submodule for instance ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that was initially my idea as well, but I struggled with getting the parent username. It might be a cleaner solution, as as it doesn't require the checking logic, as the username should always be defined.
But I don't now how to get the parent userName...
teto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the description of toplevel username should be updated to explain it can be overriden
Currently:
The server username of this account. This will be used as
the SMTP, IMAP, and JMAP user name.
The description for accounts.email.userName is updated to make it clear that this value is a default and can be overridden by the protocol-specific 'userName' options.
|
@teto Thanks, I missed that. I just updated the description, |
Add optional userName fields to IMAP and SMTP submodules, allowing
different usernames for IMAP and SMTP servers. When not specified,
the account-level userName is used as a fallback.
This change updates all email programs (mbsync, msmtp, offlineimap,
getmail, neomutt, aerc, thunderbird, git) to use the protocol-specific
username when available.
Description
Checklist
Change is backwards compatible.
Code formatted with
nix fmtornix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt.Code tested through
nix run .#tests -- test-allornix-shell --pure tests -A run.all.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
If this PR adds an exciting new feature or contains a breaking change.