Email account updates

Move base mail path definition

Update patterns to exclude duplicate folders and hopefully speed up
mbsync a bit

Add an "inboxes" group for emacs to use when updating mu4e, pulls all
inboxes only

Temp disable mbsync systemd job
This commit is contained in:
Evie Litherland-Smith 2023-09-25 17:59:40 +01:00
parent 5fccc01dac
commit 25740f7288
3 changed files with 81 additions and 69 deletions

View file

@ -1,8 +1,25 @@
{ pkgs, hostName, ... }: { pkgs, hostName, ... }:
{ {
accounts.email.maildirBasePath = ".mail"; home.packages = with pkgs; [ protonmail-bridge ];
accounts.email.accounts = let realName = "Evelyn Litherland-Smith"; programs = {
mbsync = {
enable = true;
groups.inboxes = {
proton = [ "INBOX" ];
icloud = [ "INBOX" ];
};
};
msmtp.enable = true;
mu.enable = true;
};
services.mbsync = {
enable = false;
frequency = "*-*-* *:0/30:00";
};
accounts.email = {
maildirBasePath = ".mail";
accounts = let realName = "Evie Litherland-Smith";
in { in {
proton = let proton = let
host = "127.0.0.1"; host = "127.0.0.1";
@ -27,8 +44,8 @@
enable = true; enable = true;
create = "both"; create = "both";
expunge = "both"; expunge = "both";
patterns = remove = "both";
[ "INBOX" "Archive" "Drafts" "Sent" "Spam" "Starred" "Trash" ]; patterns = [ "*" "!All Mail" "!Spam" "!Labels" "!Starred" ];
subFolders = "Verbatim"; subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN"; extraConfig.account.AuthMechs = "LOGIN";
}; };
@ -53,21 +70,13 @@
enable = true; enable = true;
create = "both"; create = "both";
expunge = "both"; expunge = "both";
remove = "both";
patterns = [ "*" "!Junk" ];
subFolders = "Verbatim"; subFolders = "Verbatim";
}; };
msmtp.enable = true; msmtp.enable = true;
mu.enable = true; mu.enable = true;
}; };
}; };
home.packages = with pkgs; [ protonmail-bridge ];
programs = {
mbsync.enable = true;
msmtp.enable = true;
# vdirsyncer = { enable = true; };
mu.enable = true;
};
services.mbsync = {
enable = true;
frequency = "*-*-* *:0/15:00";
}; };
} }

View file

@ -10,7 +10,7 @@
(set-keyboard-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8)
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)) (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
(setq user-full-name "Evelyn Litherland-Smith" (setq user-full-name "Evie Litherland-Smith"
user-mail-address "e.litherlandsmith@proton.me" user-mail-address "e.litherlandsmith@proton.me"
doom-font (font-spec :family "FiraCode Nerd Font" :size 16 :weight 'regular) doom-font (font-spec :family "FiraCode Nerd Font" :size 16 :weight 'regular)
doom-theme 'catppuccin doom-theme 'catppuccin
@ -40,8 +40,8 @@
;; mail settings ;; mail settings
(after! mu4e (after! mu4e
(setq mu4e-get-mail-command "true" (setq mu4e-get-mail-command "mbsync --pull-renew inboxes"
mu4e-update-interval 60 mu4e-update-interval 300
mu4e-sent-messages-behavior 'delete mu4e-sent-messages-behavior 'delete
mu4e-attachment-dir "~/Downloads" mu4e-attachment-dir "~/Downloads"
mu4e-change-filenames-when-moving t mu4e-change-filenames-when-moving t
@ -61,7 +61,7 @@
t) t)
(set-email-account! "icloud.com" (set-email-account! "icloud.com"
'((user-mail-address . "e.litherlandsmith@icloud.com") '((user-mail-address . "e.litherlandsmith@icloud.com")
(mu4e-sent-folder . "/iCloud/Sent Messages") (mu4e-sent-folder . "/iCloud/Sent")
(mu4e-drafts-folder . "/iCloud/Drafts") (mu4e-drafts-folder . "/iCloud/Drafts")
(mu4e-trash-folder . "/iCloud/Trash") (mu4e-trash-folder . "/iCloud/Trash")
(mu4e-refile-folder . "/iCloud/Archive")) (mu4e-refile-folder . "/iCloud/Archive"))
@ -82,9 +82,9 @@
:contents-sources :contents-sources
(list (list
(cfw:org-create-source "Green") ; org-agenda source (cfw:org-create-source "Green") ; org-agenda source
(cfw:ical-create-source "Personal" "~/.calendars/nextcloud/personal.ics" "Red") (cfw:ical-create-source "Personal" "~/.calendar/nextcloud/personal.ics" "Red")
(cfw:ical-create-source "Birthdays" "~/.calendars/nextcloud/contact_birthdays.ics" "Grey") (cfw:ical-create-source "Birthdays" "~/.calendar/nextcloud/contact_birthdays.ics" "Grey")
;; (cfw:ical-create-source "UKAEA" "~/.calendars/ukaea/calendar.ics" "Blue") ;; (cfw:ical-create-source "UKAEA" "~/.calendar/ukaea/calendar.ics" "Blue")
))) )))
;; Org-mode settings ;; Org-mode settings

View file

@ -25,6 +25,7 @@
firefox.profiles.default.settings."browser.startup.homepage" = firefox.profiles.default.settings."browser.startup.homepage" =
"https://nucleus.ukaea.uk"; "https://nucleus.ukaea.uk";
}; };
programs.mbsync.groups.inboxes.ukaea = [ "INBOX" ];
accounts.email.accounts = { accounts.email.accounts = {
proton.primary = lib.mkForce false; proton.primary = lib.mkForce false;
ukaea = let ukaea = let
@ -49,6 +50,8 @@
enable = true; enable = true;
create = "both"; create = "both";
expunge = "both"; expunge = "both";
remove = "both";
patterns = [ "*" "!Junk" "!Snoozed" "!Sync Issues" "!Unsent Messages" ];
subFolders = "Verbatim"; subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN"; extraConfig.account.AuthMechs = "LOGIN";
}; };