mail: tag everything once a day

This commit is contained in:
Ingolf Wagner 2020-01-23 23:07:28 +13:00
parent 78e2929daf
commit a5aad14aec
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -270,6 +270,28 @@
# configure mbsync
home-manager.users.mailUser.programs.mbsync.enable = true;
# re-tag everything once a day
systemd.services.retagmail = {
enable = true;
serviceConfig = { User = config.users.users.mailUser.name; };
environment.NOTMUCH_CONFIG =
"${config.users.users.mailUser.home}/.config/notmuch/notmuchrc";
script = ''
echo "run afew"
${pkgs.afew}/bin/afew --all --tag -v
'';
};
systemd.timers.retagmail = {
enable = true;
timerConfig = {
OnCalendar = "daily";
Persistent = "true";
};
wantedBy = [ "multi-user.target" ];
};
# fetch mails every 10 minutes
systemd.services.fetchmail = {
enable = true;
serviceConfig = { User = config.users.users.mailUser.name; };
@ -515,7 +537,7 @@
tags = [ "-inbox" "-unread" ];
}
{
query = "tag:lists AND from:nixos1@discoursemail.com";
query = "from:nixos1@discoursemail.com";
tags = [ "+nixos" "+discourse" ];
}
{