Move UKAEA email config back to mail expression

Add davmail sample config
Add mu4e maildir shortcuts
This commit is contained in:
Evie Litherland-Smith 2023-09-29 09:55:52 +01:00
parent 6f329aaf4d
commit bdd1becab1
5 changed files with 169 additions and 92 deletions

View file

@ -5,11 +5,84 @@
* Misc notes * Misc notes
** mu init command ** mu init command
#+BEGIN_SRC bash #+begin_src bash
mu init --maildir ~/.mail\ mu init --maildir ~/.mail\
--my-address=e.litherlandsmith@proton.me\ --my-address=e.litherlandsmith@proton.me\
--my-address=e.litherlandsmith@icloud.com --my-address=evie@xenia.me.uk\
#+END_SRC --my-address=evie@litherlandsmith.slmail.me\
--my-address=e.litherlandsmith@icloud.com\
--my-address=evie.litherland-smith@ukaea.uk\
--my-address=elitherl@jet.uk
#+end_src
** davmail config properties
#+begin_src conf
davmail.ssl.keystoreType=
davmail.ssl.keystorePass=
davmail.proxyPassword=
davmail.oauth.tenantId=
davmail.oauth.clientId=
davmail.smtpPort=1026
davmail.enableKerberos=false
davmail.folderSizeLimit=
davmail.forceActiveSyncUpdate=false
davmail.imapAutoExpunge=true
davmail.useSystemProxies=false
davmail.proxyUser=
davmail.caldavEditNotifications=false
davmail.ssl.nosecuresmtp=false
davmail.caldavPastDelay=0
davmail.ssl.keyPass=
log4j.logger.httpclient.wire=WARN
davmail.noProxyFor=
davmail.server=false
davmail.popMarkReadOnRetr=false
davmail.ssl.nosecureimap=false
davmail.disableTrayActivitySwitch=true
davmail.caldavAutoSchedule=true
davmail.enableProxy=false
davmail.proxyPort=
davmail.logFileSize=
davmail.mode=O365Interactive
davmail.smtpSaveInSent=true
davmail.bindAddress=
davmail.ssl.nosecurepop=false
davmail.ssl.pkcs11Library=
log4j.rootLogger=WARN
davmail.ssl.keystoreFile=
log4j.logger.davmail=DEBUG
davmail.ssl.clientKeystoreType=
davmail.clientSoTimeout=
davmail.ssl.pkcs11Config=
davmail.imapPort=1144
davmail.ssl.clientKeystorePass=
davmail.url=https://outlook.office365.com/EWS/Exchange.asmx
log4j.logger.org.apache.http.conn.ssl=WARN
davmail.sentKeepDelay=0
davmail.ssl.nosecureldap=false
davmail.imapAlwaysApproxMsgSize=true
davmail.ssl.nosecurecaldav=false
davmail.popPort=
davmail.defaultDomain=
davmail.showStartupBanner=false
log4j.logger.httpclient=WARN
davmail.proxyHost=
davmail.ldapPort=
davmail.server.certificate.hash=
log4j.logger.org.apache.http.wire=WARN
davmail.disableGuiNotifications=true
davmail.imapIdleDelay=
davmail.allowRemote=false
davmail.disableUpdateCheck=true
log4j.logger.org.apache.http=WARN
davmail.caldavPort=1080
davmail.enableKeepAlive=true
davmail.ssl.clientKeystoreFile=
davmail.logFilePath=/tmp/davmail.log
davmail.carddavReadPhoto=true
davmail.keepDelay=30
davmail.oauth.redirectUri=
davmail.caldavAlarmSound=
#+end_src
* Old README.md * Old README.md
#+BEGIN_SRC markdown #+BEGIN_SRC markdown

View file

@ -32,6 +32,26 @@
type = "discover"; type = "discover";
}; };
}; };
ukaea = {
local = {
type = "filesystem";
fileExt = ".ics";
};
remote = rec {
inherit (config.accounts.email.accounts.ukaea)
userName passwordCommand;
type = "caldav";
url = "http://localhost:1080/users/${userName}/calendar/";
};
vdirsyncer = {
enable = false; # TEMP until fixed
collections = [ "from a" ];
};
khal = {
enable = false; # TEMP until fixed
type = "discover";
};
};
}; };
}; };
} }

View file

@ -23,6 +23,22 @@
collections = [ "from a" ]; collections = [ "from a" ];
}; };
}; };
ukaea = {
local = {
type = "filesystem";
fileExt = ".vcf";
};
remote = rec {
inherit (config.accounts.email.accounts.ukaea)
userName passwordCommand;
type = "carddav";
url = "http://localhost:1080/users/${userName}/contacts/";
};
vdirsyncer = {
enable = false; # TEMP until fixed
collections = [ "from a" ];
};
};
}; };
}; };
xdg.configFile."khard/khard.conf".text = '' xdg.configFile."khard/khard.conf".text = ''
@ -34,6 +50,8 @@
[addressbooks] [addressbooks]
[[nextcloud]] [[nextcloud]]
path = ~/.contact/nextcloud/contacts-1/ path = ~/.contact/nextcloud/contacts-1/
# [[ukaea]]
# path = ~/.contact/ukaea/contacts/
[general] [general]
debug = no debug = no

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, hostName, ... }: { config, lib, pkgs, hostName, ... }:
{ {
home.packages = with pkgs; [ protonmail-bridge ]; home.packages = with pkgs; [ protonmail-bridge davmail ];
programs = { programs = {
mbsync = { mbsync = {
enable = true; enable = true;
@ -22,6 +22,7 @@
tls.enable = false; tls.enable = false;
in rec { in rec {
inherit realName; inherit realName;
primary = lib.mkDefault true;
maildir.path = "Proton"; maildir.path = "Proton";
imap = { imap = {
inherit host tls; inherit host tls;
@ -34,7 +35,6 @@
address = "e.litherlandsmith@proton.me"; address = "e.litherlandsmith@proton.me";
aliases = [ "evie@xenia.me.uk" "evie@litherlandsmith.slmail.me" ]; aliases = [ "evie@xenia.me.uk" "evie@litherlandsmith.slmail.me" ];
passwordCommand = "${pkgs.pass}/bin/pass show Mail/Proton/${hostName}"; passwordCommand = "${pkgs.pass}/bin/pass show Mail/Proton/${hostName}";
primary = true;
userName = address; userName = address;
imapnotify = { imapnotify = {
enable = true; enable = true;
@ -67,6 +67,7 @@
}; };
icloud = rec { icloud = rec {
inherit realName; inherit realName;
primary = lib.mkDefault false;
maildir.path = "iCloud"; maildir.path = "iCloud";
imap.host = "imap.mail.me.com"; imap.host = "imap.mail.me.com";
smtp.host = "smtp.mail.me.com"; smtp.host = "smtp.mail.me.com";
@ -91,6 +92,55 @@
msmtp.enable = true; msmtp.enable = true;
mu.enable = true; mu.enable = true;
}; };
ukaea = let
host = "127.0.0.1";
tls.enable = false;
in rec {
inherit realName;
primary = lib.mkDefault false;
maildir.path = "UKAEA";
imap = {
inherit host tls;
port = 1144;
};
smtp = {
inherit host tls;
port = 1026;
};
address = "evie.litherland-smith@ukaea.uk";
aliases = [ "elitherl@jet.uk" ];
passwordCommand = "${pkgs.pass}/bin/pass show Mail/Outlook/ukaea";
userName = address;
imapnotify = {
enable = true;
boxes = [ "INBOX" ];
onNotify = "${pkgs.isync}/bin/mbsync --pull ukaea:INBOX";
onNotifyPost =
"${pkgs.libnotify}/bin/notify-send 'UKAEA: New mail arrived'";
extraConfig = {
tls = false;
tlsOptions.rejectUnauthorized = false;
};
};
mbsync = {
enable = true;
create = "both";
expunge = "both";
remove = "both";
patterns =
[ "*" "!Junk" "!Snoozed" "!Sync Issues" "!Unsent Messages" ];
subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN";
};
msmtp = {
enable = true;
extraConfig = {
tls = "off";
auth = "login";
};
};
mu.enable = true;
};
}; };
}; };
} }

View file

@ -21,93 +21,9 @@
"https://nucleus.ukaea.uk"; "https://nucleus.ukaea.uk";
}; };
programs.mbsync.groups.inboxes.ukaea = [ "INBOX" ]; programs.mbsync.groups.inboxes.ukaea = [ "INBOX" ];
accounts = { accounts.email.accounts = {
email.accounts = { ukaea.primary = true;
proton.primary = lib.mkForce false; proton.primary = false;
ukaea = let
host = "127.0.0.1";
tls.enable = false;
in rec {
inherit (config.accounts.email.accounts.proton) realName;
maildir.path = "UKAEA";
imap = {
inherit host tls;
port = 1144;
};
smtp = {
inherit host tls;
port = 1026;
};
address = "evie.litherland-smith@ukaea.uk";
aliases = [ "elitherl@jet.uk" ];
passwordCommand = "${pkgs.pass}/bin/pass show Mail/Outlook/ukaea";
primary = true;
userName = address;
imapnotify = {
enable = true;
boxes = [ "INBOX" ];
onNotify = "${pkgs.isync}/bin/mbsync --pull ukaea:INBOX";
onNotifyPost =
"${pkgs.libnotify}/bin/notify-send 'UKAEA: New mail arrived'";
extraConfig = {
tls = false;
tlsOptions.rejectUnauthorized = false;
};
};
mbsync = {
enable = true;
create = "both";
expunge = "both";
remove = "both";
patterns =
[ "*" "!Junk" "!Snoozed" "!Sync Issues" "!Unsent Messages" ];
subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN";
};
msmtp = {
enable = true;
extraConfig = {
tls = "off";
auth = "login";
};
};
mu.enable = true;
};
};
calendar.accounts.ukaea = {
local = {
type = "filesystem";
fileExt = ".ics";
};
remote = rec {
inherit (config.accounts.email.accounts.ukaea) userName passwordCommand;
type = "caldav";
url = "http://localhost:1080/users/${userName}/calendar/";
};
vdirsyncer = {
enable = true;
collections = [ "from a" ];
};
khal = {
enable = true;
type = "discover";
};
};
contact.accounts.ukaea = {
local = {
type = "filesystem";
fileExt = ".vcf";
};
remote = rec {
inherit (config.accounts.email.accounts.ukaea) userName passwordCommand;
type = "carddav";
url = "http://localhost:1080/users/${userName}/contacts/";
};
vdirsyncer = {
enable = true;
collections = [ "from a" ];
};
};
}; };
services.vdirsyncer.enable = lib.mkForce false; # TEMP until fixed services.vdirsyncer.enable = lib.mkForce false; # TEMP until fixed
services.kanshi.profiles = { services.kanshi.profiles = {