158 lines
3.6 KiB
Nix
158 lines
3.6 KiB
Nix
{ pkgs, hostName, ... }:
|
|
|
|
{
|
|
# accounts.emails.accounts = {}; # TODO
|
|
home.packages = with pkgs; [ protonmail-bridge davmail ];
|
|
programs = {
|
|
mu.enable = true;
|
|
mbsync = {
|
|
enable = true;
|
|
extraConfig = ''
|
|
IMAPAccount protonmail
|
|
Host 127.0.0.1
|
|
Port 1143
|
|
User e.litherlandsmith@proton.me
|
|
PassCmd +"${pkgs.pass}/bin/pass show Mail/Proton/${hostName}"
|
|
SSLType NONE
|
|
AuthMechs LOGIN
|
|
|
|
IMAPAccount icloud
|
|
Host imap.mail.me.com
|
|
Port 993
|
|
User edwardjls@me.com
|
|
PassCmd +"${pkgs.pass}/bin/pass show Mail/iCloud/mbsync"
|
|
SSLType IMAPS
|
|
|
|
IMAPAccount ukaea
|
|
Host 127.0.0.1
|
|
Port 1144
|
|
User evie.litherland-smith@ukaea.uk
|
|
PassCmd +"${pkgs.pass}/bin/pass show Mail/Outlook/ukaea"
|
|
SSLType None
|
|
AuthMechs LOGIN
|
|
|
|
IMAPStore ProtonRemote
|
|
Account protonmail
|
|
|
|
IMAPStore iCloudRemote
|
|
Account icloud
|
|
|
|
IMAPStore UKAEARemote
|
|
Account ukaea
|
|
|
|
MaildirStore ProtonLocal
|
|
Path ~/.mail/Proton/
|
|
Inbox ~/.mail/Proton/Inbox/
|
|
SubFolders Verbatim
|
|
|
|
MaildirStore iCloudLocal
|
|
Path ~/.mail/iCloud/
|
|
Inbox ~/.mail/iCloud/Inbox/
|
|
SubFolders Verbatim
|
|
|
|
MaildirStore UKAEALocal
|
|
Path ~/.mail/UKAEA/
|
|
Inbox ~/.mail/UKAEA/Inbox/
|
|
SubFolders Verbatim
|
|
|
|
Channel ProtonInbox
|
|
Far :ProtonRemote:"INBOX"
|
|
Near :ProtonLocal:"Inbox"
|
|
Create Near
|
|
Expunge Both
|
|
SyncState *
|
|
|
|
Channel ProtonFolders
|
|
Far :ProtonRemote:
|
|
Near :ProtonLocal:
|
|
Patterns * !"All Mail" !"INBOX" !"Inbox"
|
|
Create Both
|
|
Expunge Both
|
|
SyncState *
|
|
|
|
Channel iCloudInbox
|
|
Far :iCloudRemote:"INBOX"
|
|
Near :iCloudLocal:"Inbox"
|
|
Create Near
|
|
Expunge Both
|
|
SyncState *
|
|
|
|
Channel iCloudFolders
|
|
Far :iCloudRemote:
|
|
Near :iCloudLocal:
|
|
Patterns * !"All Mail" !"INBOX" !"Inbox"
|
|
Create Both
|
|
Expunge Both
|
|
SyncState *
|
|
|
|
Channel UKAEAInbox
|
|
Far :UKAEARemote:"INBOX"
|
|
Near :UKAEALocal:"Inbox"
|
|
Create Near
|
|
Expunge Both
|
|
SyncState *
|
|
|
|
Channel UKAEAFolders
|
|
Far :UKAEARemote:
|
|
Near :UKAEALocal:
|
|
Patterns * !"INBOX" !"Inbox"
|
|
Create Near
|
|
Expunge Both
|
|
SyncState *
|
|
|
|
Group icloud
|
|
Channel iCloudInbox
|
|
Channel iCloudFolders
|
|
|
|
Group protonmail
|
|
Channel ProtonInbox
|
|
Channel ProtonFolders
|
|
|
|
Group ukaea
|
|
Channel UKAEAInbox
|
|
Channel UKAEAFolders
|
|
|
|
Group inbox
|
|
Channel iCloudInbox
|
|
Channel ProtonInbox
|
|
Channel UKAEAInbox
|
|
'';
|
|
};
|
|
msmtp = {
|
|
enable = true;
|
|
extraConfig = ''
|
|
defaults
|
|
port 587
|
|
|
|
account protonmail
|
|
host 127.0.0.1
|
|
from e.litherlandsmith@proton.me
|
|
auth login
|
|
user e.litherlandsmith@proton.me
|
|
passwordeval "${pkgs.pass}/bin/pass show Mail/Proton/${hostName}"
|
|
port 1025
|
|
tls off
|
|
|
|
account icloud
|
|
host smtp.mail.me.com
|
|
from e.litherlandsmith@icloud.com
|
|
auth on
|
|
user e.litherlandsmith@icloud.com
|
|
passwordeval "${pkgs.pass}/bin/pass show Mail/iCloud/mbsync"
|
|
port 587
|
|
tls on
|
|
|
|
account ukaea
|
|
host 127.0.0.1
|
|
from evie.litherland-smith@ukaea.uk
|
|
auth login
|
|
user evie.litherland-smith@ukaea.uk
|
|
passwordeval "${pkgs.pass}/bin/pass show Mail/Outlook/ukaea"
|
|
port 1026
|
|
tls off
|
|
'';
|
|
};
|
|
};
|
|
services.mbsync.enable = true;
|
|
}
|