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,73 +1,82 @@
{ pkgs, hostName, ... }:
{
accounts.email.maildirBasePath = ".mail";
accounts.email.accounts = let realName = "Evelyn Litherland-Smith";
in {
proton = let
host = "127.0.0.1";
tls.enable = false;
in rec {
inherit realName;
maildir.path = "Proton";
imap = {
inherit host tls;
port = 1143;
};
smtp = {
inherit host tls;
port = 1025;
};
address = "e.litherlandsmith@proton.me";
aliases = [ "evie@xenia.me.uk" "evie@litherlandsmith.slmail.me" ];
passwordCommand = "${pkgs.pass}/bin/pass show Mail/Proton/${hostName}";
primary = true;
userName = address;
mbsync = {
enable = true;
create = "both";
expunge = "both";
patterns =
[ "INBOX" "Archive" "Drafts" "Sent" "Spam" "Starred" "Trash" ];
subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN";
};
msmtp = {
enable = true;
extraConfig = {
tls = "off";
auth = "login";
};
};
mu.enable = true;
};
icloud = rec {
inherit realName;
maildir.path = "iCloud";
imap.host = "imap.mail.me.com";
smtp.host = "smtp.mail.me.com";
address = "e.litherlandsmith@icloud.com";
passwordCommand = "${pkgs.pass}/bin/pass show Mail/iCloud/mbsync";
userName = address;
mbsync = {
enable = true;
create = "both";
expunge = "both";
subFolders = "Verbatim";
};
msmtp.enable = true;
mu.enable = true;
};
};
home.packages = with pkgs; [ protonmail-bridge ];
programs = {
mbsync.enable = true;
mbsync = {
enable = true;
groups.inboxes = {
proton = [ "INBOX" ];
icloud = [ "INBOX" ];
};
};
msmtp.enable = true;
# vdirsyncer = { enable = true; };
mu.enable = true;
};
services.mbsync = {
enable = true;
frequency = "*-*-* *:0/15:00";
enable = false;
frequency = "*-*-* *:0/30:00";
};
accounts.email = {
maildirBasePath = ".mail";
accounts = let realName = "Evie Litherland-Smith";
in {
proton = let
host = "127.0.0.1";
tls.enable = false;
in rec {
inherit realName;
maildir.path = "Proton";
imap = {
inherit host tls;
port = 1143;
};
smtp = {
inherit host tls;
port = 1025;
};
address = "e.litherlandsmith@proton.me";
aliases = [ "evie@xenia.me.uk" "evie@litherlandsmith.slmail.me" ];
passwordCommand = "${pkgs.pass}/bin/pass show Mail/Proton/${hostName}";
primary = true;
userName = address;
mbsync = {
enable = true;
create = "both";
expunge = "both";
remove = "both";
patterns = [ "*" "!All Mail" "!Spam" "!Labels" "!Starred" ];
subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN";
};
msmtp = {
enable = true;
extraConfig = {
tls = "off";
auth = "login";
};
};
mu.enable = true;
};
icloud = rec {
inherit realName;
maildir.path = "iCloud";
imap.host = "imap.mail.me.com";
smtp.host = "smtp.mail.me.com";
address = "e.litherlandsmith@icloud.com";
passwordCommand = "${pkgs.pass}/bin/pass show Mail/iCloud/mbsync";
userName = address;
mbsync = {
enable = true;
create = "both";
expunge = "both";
remove = "both";
patterns = [ "*" "!Junk" ];
subFolders = "Verbatim";
};
msmtp.enable = true;
mu.enable = true;
};
};
};
}

View file

@ -10,7 +10,7 @@
(set-keyboard-coding-system 'utf-8)
(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"
doom-font (font-spec :family "FiraCode Nerd Font" :size 16 :weight 'regular)
doom-theme 'catppuccin
@ -40,8 +40,8 @@
;; mail settings
(after! mu4e
(setq mu4e-get-mail-command "true"
mu4e-update-interval 60
(setq mu4e-get-mail-command "mbsync --pull-renew inboxes"
mu4e-update-interval 300
mu4e-sent-messages-behavior 'delete
mu4e-attachment-dir "~/Downloads"
mu4e-change-filenames-when-moving t
@ -61,7 +61,7 @@
t)
(set-email-account! "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-trash-folder . "/iCloud/Trash")
(mu4e-refile-folder . "/iCloud/Archive"))
@ -82,9 +82,9 @@
:contents-sources
(list
(cfw:org-create-source "Green") ; org-agenda source
(cfw:ical-create-source "Personal" "~/.calendars/nextcloud/personal.ics" "Red")
(cfw:ical-create-source "Birthdays" "~/.calendars/nextcloud/contact_birthdays.ics" "Grey")
;; (cfw:ical-create-source "UKAEA" "~/.calendars/ukaea/calendar.ics" "Blue")
(cfw:ical-create-source "Personal" "~/.calendar/nextcloud/personal.ics" "Red")
(cfw:ical-create-source "Birthdays" "~/.calendar/nextcloud/contact_birthdays.ics" "Grey")
;; (cfw:ical-create-source "UKAEA" "~/.calendar/ukaea/calendar.ics" "Blue")
)))
;; Org-mode settings

View file

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