Email setting updates

Add more tagging rules to afew

Change syncing setup to run mbsync less frequently (every 30 mins) but
sync inboxes in notmuch pre hook.
Imapnotify can now just call notmuch

Update conditions to refresh notmuch-indicator (emacs)
This commit is contained in:
Evie Litherland-Smith 2023-10-26 13:09:11 +01:00
parent 658237fd69
commit 9f19f3a626
3 changed files with 29 additions and 17 deletions

View file

@ -9,7 +9,7 @@ sent_tag = sent
[FolderNameFilter]
folder_explicit_list = Proton/Archive Proton/Sent Proton/Trash iCloud/Archive 'iCloud/Deleted Messages' 'iCloud/Sent Messages' Outlook/Archive Outlook/Trash Outlook/Sent
folder_transforms = Drafts:draft Sent:sent 'Sent Messages':sent Trash:deleted 'Deleted Messages':deleted
folder_transforms = Archive:archive Drafts:draft Sent:sent 'Sent Messages':sent Trash:deleted 'Deleted Messages':deleted
folder_lowercases = true
maildir_separator = /
@ -23,6 +23,16 @@ message = Untagged inbox from archive
query = tag:archive AND tag:inbox
tags = -inbox
[Filter.3]
message = Tag ReqCo emails
query = from:reqco@jet.uk
tags = +reqco
[Filter.4]
message = Tag operations update emails
query = from:no-reply@jet.uk
tags = +operations
[MailMover]
folders = Proton/Inbox iCloud/Inbox Outlook/Inbox
rename = True

View file

@ -16,13 +16,16 @@
enable = true;
maildir.synchronizeFlags = true;
new.tags = [ "new" ];
hooks.postNew = ''
if [ $(${pkgs.notmuch}/bin/notmuch count is:new) -gt 0 ]; then
${pkgs.libnotify}/bin/notify-send "Notmuch Email" "Unread emails in inbox"
fi
${pkgs.afew}/bin/afew --new --tag
${pkgs.afew}/bin/afew --move-mail
'';
hooks = {
preNew = "${pkgs.isync}/bin/mbsync inboxes";
postNew = ''
if [ $(${pkgs.notmuch}/bin/notmuch count is:new) -gt 0 ]; then
${pkgs.libnotify}/bin/notify-send "Notmuch Email" "Unread emails in inbox"
fi
${pkgs.afew}/bin/afew --new --tag
${pkgs.afew}/bin/afew --move-mail
'';
};
};
afew = {
enable = true;
@ -32,7 +35,7 @@
services = {
mbsync = {
enable = true;
frequency = "*:0/15";
frequency = "*:0/30";
postExec = "${pkgs.notmuch}/bin/notmuch new";
};
imapnotify.enable = true;
@ -65,8 +68,7 @@
imapnotify = {
enable = lib.mkDefault accountEnabled;
boxes = [ "INBOX" ];
onNotify = "${pkgs.isync}/bin/mbsync proton";
onNotifyPost = "${pkgs.notmuch}/bin/notmuch new";
onNotify = "${pkgs.notmuch}/bin/notmuch new";
extraConfig = {
wait = 300;
tls = false;
@ -105,8 +107,7 @@
imapnotify = {
enable = lib.mkDefault accountEnabled;
boxes = [ "INBOX" ];
onNotify = "${pkgs.isync}/bin/mbsync icloud";
onNotifyPost = "${pkgs.notmuch}/bin/notmuch new";
onNotify = "${pkgs.notmuch}/bin/notmuch new";
extraConfig.wait = 300;
};
mbsync = {
@ -144,8 +145,7 @@
imapnotify = {
enable = lib.mkDefault accountEnabled;
boxes = [ "INBOX" ];
onNotify = "${pkgs.isync}/bin/mbsync outlook";
onNotifyPost = "${pkgs.notmuch}/bin/notmuch new";
onNotify = "${pkgs.notmuch}/bin/notmuch new";
extraConfig = {
wait = 300;
tls = false;

View file

@ -9,8 +9,10 @@
(".*@icloud.com" . "iCloud/Sent")
(".*@ukaea.uk" . "Outlook/Sent")
(".*@jet.uk" . "Outlook/Sent"))
notmuch-indicator-refresh-count 60
notmuch-indicator-args '((:terms "tag:unread and tag:inbox" :label "󰮒 ")))
notmuch-indicator-args '((:terms "tag:unread and tag:inbox" :label "󰮒 "))
notmuch-indicator-force-refresh-commands '(notmuch-refresh-this-buffer
notmuch-refresh-all-buffers
notmuch-poll-and-refresh-this-buffer))
(require 'notmuch)
(require 'notmuch-indicator)
(notmuch-indicator-mode +1)