2020-07-02 06:35:55 +00:00
|
|
|
{ pkgs, ... }:
|
2018-09-19 00:52:58 +00:00
|
|
|
{
|
|
|
|
home-manager.users.makefu = {
|
2020-07-02 06:35:55 +00:00
|
|
|
home.packages= with pkgs;[ (pkgs.writers.writeDashBin "mailsync"''
|
|
|
|
${imapfilter}/bin/imapfilter -t /etc/ssl/certs/ca-bundle.crt \
|
|
|
|
&& ${isync}/bin/mbsync -a \
|
|
|
|
&& ${libnotify}/bin/notify-send -t 1000000 -u critical 'Mail sync finished'
|
|
|
|
|
|
|
|
''
|
|
|
|
)];
|
2020-03-13 09:42:08 +00:00
|
|
|
programs.mbsync.enable = true;
|
2018-10-21 21:28:52 +00:00
|
|
|
accounts.email.maildirBasePath = "/home/makefu/Mail";
|
2020-03-13 09:42:08 +00:00
|
|
|
accounts.email.certificatesFile = "/etc/ssl/certs/ca-certificates.crt";
|
2018-09-19 00:52:58 +00:00
|
|
|
accounts.email.accounts.syntaxfehler = {
|
|
|
|
address = "felix.richter@syntax-fehler.de";
|
|
|
|
userName = "Felix.Richter@syntax-fehler.de";
|
|
|
|
imap = {
|
|
|
|
host = "syntax-fehler.de";
|
|
|
|
tls = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
};
|
2020-03-13 09:42:08 +00:00
|
|
|
mbsync = {
|
|
|
|
enable = true;
|
|
|
|
create = "both";
|
|
|
|
remove = "both";
|
|
|
|
expunge = "both";
|
|
|
|
patterns = [ "*" "!INBOX.Sent*"];
|
|
|
|
};
|
2018-09-19 00:52:58 +00:00
|
|
|
smtp = {
|
|
|
|
host = "syntax-fehler.de";
|
|
|
|
tls = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
};
|
2020-03-13 09:42:08 +00:00
|
|
|
folders = {
|
|
|
|
sent = "Sent";
|
|
|
|
trash = "Trash";
|
|
|
|
inbox = "INBOX";
|
|
|
|
drafts = "Drafts";
|
|
|
|
};
|
2018-09-19 00:52:58 +00:00
|
|
|
msmtp.enable = true;
|
|
|
|
notmuch.enable = true;
|
|
|
|
offlineimap = {
|
|
|
|
enable = true;
|
|
|
|
postSyncHookCommand = "notmuch new";
|
|
|
|
extraConfig.remote = {
|
2020-03-13 09:42:08 +00:00
|
|
|
auth_mechanisms = "LOGIN";
|
|
|
|
tls_level = "tls_secure";
|
|
|
|
ssl_version = "tls1_2";
|
2018-09-19 00:52:58 +00:00
|
|
|
holdconnectionopen = true;
|
|
|
|
idlefolders = "['INBOX']";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
primary = true;
|
|
|
|
realName = "Felix Richter";
|
2018-10-21 21:28:52 +00:00
|
|
|
passwordCommand = "gpg --use-agent --quiet --batch -d /home/makefu/.gnupg/mail/syntax-fehler.gpg";
|
2018-09-19 00:52:58 +00:00
|
|
|
};
|
|
|
|
programs.offlineimap.enable = true;
|
|
|
|
programs.offlineimap.extraConfig = {
|
|
|
|
mbnames = {
|
|
|
|
filename = "~/.mutt/muttrc.mailboxes";
|
|
|
|
header = "'mailboxes '";
|
|
|
|
peritem = "'+%(accountname)s/%(foldername)s'";
|
|
|
|
sep = "' '";
|
|
|
|
footer = "'\\n'";
|
|
|
|
};
|
|
|
|
general = {
|
|
|
|
ui = "TTY.TTYUI";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|