mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 07:04:17 +00:00
aerc-accounts: support for maildirpp (#4653)
* aerc-accounts: support for maildirpp aerc-accounts now is aware of the mbsync.subFolders setting * aerc: Adds test for maildirpp format --------- Co-authored-by: lgehr <lgehr@mailbox.org>
This commit is contained in:
parent
fb5ac0c870
commit
07c322a7cf
3 changed files with 29 additions and 4 deletions
|
@ -145,6 +145,11 @@ in {
|
||||||
"maildir://${config.accounts.email.maildirBasePath}/${cfg.maildir.path}";
|
"maildir://${config.accounts.email.maildirBasePath}/${cfg.maildir.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
maildirpp = cfg: {
|
||||||
|
source =
|
||||||
|
"maildirpp://${config.accounts.email.maildirBasePath}/${cfg.maildir.path}/Inbox";
|
||||||
|
};
|
||||||
|
|
||||||
imap = { userName, imap, passwordCommand, aerc, ... }@cfg:
|
imap = { userName, imap, passwordCommand, aerc, ... }@cfg:
|
||||||
let
|
let
|
||||||
loginMethod' =
|
loginMethod' =
|
||||||
|
@ -207,7 +212,10 @@ in {
|
||||||
// (optAttr "aliases" account.aliases);
|
// (optAttr "aliases" account.aliases);
|
||||||
|
|
||||||
sourceCfg = account:
|
sourceCfg = account:
|
||||||
if account.mbsync.enable || account.offlineimap.enable then
|
if account.mbsync.enable && account.mbsync.flatten == null
|
||||||
|
&& account.mbsync.subFolders == "Maildir++" then
|
||||||
|
mkConfig.maildirpp account
|
||||||
|
else if account.mbsync.enable || account.offlineimap.enable then
|
||||||
mkConfig.maildir account
|
mkConfig.maildir account
|
||||||
else if account.imap != null then
|
else if account.imap != null then
|
||||||
mkConfig.imap account
|
mkConfig.imap account
|
||||||
|
|
|
@ -54,9 +54,17 @@ from = Foo Bar <addr@mail.invalid>
|
||||||
outgoing = smtp+insecure+plain://foobar@smtp.host.invalid:42
|
outgoing = smtp+insecure+plain://foobar@smtp.host.invalid:42
|
||||||
outgoing-cred-cmd = echo PaSsWorD!
|
outgoing-cred-cmd = echo PaSsWorD!
|
||||||
|
|
||||||
[i_maildir-mbsync]
|
[i1_maildir-mbsync]
|
||||||
from = Foo Bar <addr@mail.invalid>
|
from = Foo Bar <addr@mail.invalid>
|
||||||
source = maildir:///home/hm-user/Maildir/i_maildir-mbsync
|
source = maildir:///home/hm-user/Maildir/i1_maildir-mbsync
|
||||||
|
|
||||||
|
[i2_maildirpp-mbsync]
|
||||||
|
from = Foo Bar <addr@mail.invalid>
|
||||||
|
source = maildirpp:///home/hm-user/Maildir/i2_maildirpp-mbsync/Inbox
|
||||||
|
|
||||||
|
[i3_maildir_flatten-mbsync]
|
||||||
|
from = Foo Bar <addr@mail.invalid>
|
||||||
|
source = maildir:///home/hm-user/Maildir/i3_maildir_flatten-mbsync
|
||||||
|
|
||||||
[j_maildir-offlineimap]
|
[j_maildir-offlineimap]
|
||||||
from = Foo Bar <addr@mail.invalid>
|
from = Foo Bar <addr@mail.invalid>
|
||||||
|
|
|
@ -202,7 +202,16 @@ with lib;
|
||||||
tls.useStartTls = true;
|
tls.useStartTls = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
i_maildir-mbsync = basics // { mbsync.enable = true; };
|
i1_maildir-mbsync = basics // { mbsync.enable = true; };
|
||||||
|
i2_maildirpp-mbsync = basics // {
|
||||||
|
mbsync.enable = true;
|
||||||
|
mbsync.subFolders = "Maildir++";
|
||||||
|
};
|
||||||
|
i3_maildir_flatten-mbsync = basics // {
|
||||||
|
mbsync.enable = true;
|
||||||
|
mbsync.subFolders = "Maildir++";
|
||||||
|
mbsync.flatten = ".";
|
||||||
|
};
|
||||||
j_maildir-offlineimap = basics // { offlineimap.enable = true; };
|
j_maildir-offlineimap = basics // { offlineimap.enable = true; };
|
||||||
k_notEnabled = basics // { aerc.enable = false; };
|
k_notEnabled = basics // { aerc.enable = false; };
|
||||||
l_smtp-auth-none = basics // {
|
l_smtp-auth-none = basics // {
|
||||||
|
|
Loading…
Reference in a new issue