Revert to mu/mu4e, remove notmuch
Use imapnotify to check for new mail and trigger mbsync pull + notification for new mail Add mailbox shortcuts to mu4e
This commit is contained in:
parent
dab30daae3
commit
2ade6e92de
|
@ -5,11 +5,9 @@
|
||||||
services = {
|
services = {
|
||||||
mbsync = {
|
mbsync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
postExec = ''
|
frequency = "*:0/15";
|
||||||
${pkgs.notmuch}/bin/notmuch new
|
|
||||||
${pkgs.notifymuch}/bin/notifymuch
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
imapnotify.enable = true;
|
||||||
vdirsyncer.enable = true;
|
vdirsyncer.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, hostName, ... }:
|
{ config, lib, pkgs, hostName, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [ notifymuch protonmail-bridge ];
|
home.packages = with pkgs; [ notifymuch protonmail-bridge ];
|
||||||
|
@ -10,7 +10,6 @@
|
||||||
icloud = [ "INBOX" ];
|
icloud = [ "INBOX" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
notmuch.enable = true;
|
|
||||||
msmtp.enable = true;
|
msmtp.enable = true;
|
||||||
mu.enable = true;
|
mu.enable = true;
|
||||||
};
|
};
|
||||||
|
@ -37,6 +36,17 @@
|
||||||
passwordCommand = "${pkgs.pass}/bin/pass show Mail/Proton/${hostName}";
|
passwordCommand = "${pkgs.pass}/bin/pass show Mail/Proton/${hostName}";
|
||||||
primary = true;
|
primary = true;
|
||||||
userName = address;
|
userName = address;
|
||||||
|
imapnotify = {
|
||||||
|
enable = true;
|
||||||
|
boxes = [ "INBOX" ];
|
||||||
|
onNotify = "${pkgs.isync}/bin/mbsync --pull proton:INBOX";
|
||||||
|
onNotifyPost =
|
||||||
|
"${pkgs.libnotify}/bin/notify-send 'Proton: New mail arrived'";
|
||||||
|
extraConfig = {
|
||||||
|
tls = false;
|
||||||
|
tlsOptions.rejectUnauthorized = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
mbsync = {
|
mbsync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
create = "both";
|
create = "both";
|
||||||
|
@ -54,7 +64,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
mu.enable = true;
|
mu.enable = true;
|
||||||
notmuch.enable = true;
|
|
||||||
};
|
};
|
||||||
icloud = rec {
|
icloud = rec {
|
||||||
inherit realName;
|
inherit realName;
|
||||||
|
@ -64,6 +73,13 @@
|
||||||
address = "e.litherlandsmith@icloud.com";
|
address = "e.litherlandsmith@icloud.com";
|
||||||
passwordCommand = "${pkgs.pass}/bin/pass show Mail/iCloud/mbsync";
|
passwordCommand = "${pkgs.pass}/bin/pass show Mail/iCloud/mbsync";
|
||||||
userName = address;
|
userName = address;
|
||||||
|
imapnotify = {
|
||||||
|
enable = true;
|
||||||
|
boxes = [ "INBOX" ];
|
||||||
|
onNotify = "${pkgs.isync}/bin/mbsync --pull icloud:INBOX";
|
||||||
|
onNotifyPost =
|
||||||
|
"${pkgs.libnotify}/bin/notify-send 'iCloud: New mail arrived'";
|
||||||
|
};
|
||||||
mbsync = {
|
mbsync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
create = "both";
|
create = "both";
|
||||||
|
@ -74,7 +90,6 @@
|
||||||
};
|
};
|
||||||
msmtp.enable = true;
|
msmtp.enable = true;
|
||||||
mu.enable = true;
|
mu.enable = true;
|
||||||
notmuch.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -39,10 +39,6 @@
|
||||||
(add-hook 'magit-mode-hook (lambda () (magit-delta-mode +1))))
|
(add-hook 'magit-mode-hook (lambda () (magit-delta-mode +1))))
|
||||||
|
|
||||||
;; mail settings
|
;; mail settings
|
||||||
(after! notmuch
|
|
||||||
(setq +notmuch-sync-backend 'mbsync)
|
|
||||||
(set-popup-rule! "^\\*notmuch-hello" :ignore t))
|
|
||||||
|
|
||||||
(after! mu4e
|
(after! mu4e
|
||||||
(setq mu4e-get-mail-command "true"
|
(setq mu4e-get-mail-command "true"
|
||||||
mu4e-update-interval 60
|
mu4e-update-interval 60
|
||||||
|
@ -53,7 +49,10 @@
|
||||||
send-mail-function #'smtpmail-send-it
|
send-mail-function #'smtpmail-send-it
|
||||||
message-sendmail-f-is-evil t
|
message-sendmail-f-is-evil t
|
||||||
message-sendmail-extra-arguments '("--read-envelope-from")
|
message-sendmail-extra-arguments '("--read-envelope-from")
|
||||||
message-send-mail-function #'message-send-mail-with-sendmail)
|
message-send-mail-function #'message-send-mail-with-sendmail
|
||||||
|
mu4e-maildir-shortcuts '((:maildir "/Proton/Inbox/" :key ?p)
|
||||||
|
(:maildir "/iCloud/Inbox/" :key ?i)
|
||||||
|
(:maildir "/UKAEA/Inbox/" :key ?u)))
|
||||||
|
|
||||||
;; Add accounts with contexts
|
;; Add accounts with contexts
|
||||||
(set-email-account! "proton.me"
|
(set-email-account! "proton.me"
|
||||||
|
|
|
@ -177,8 +177,8 @@
|
||||||
|
|
||||||
:email
|
:email
|
||||||
(mu4e +org +gmail)
|
(mu4e +org +gmail)
|
||||||
(notmuch +afew +org)
|
;; (notmuch +afew +org)
|
||||||
(wanderlust +gmail)
|
;; (wanderlust +gmail)
|
||||||
|
|
||||||
:app
|
:app
|
||||||
calendar
|
calendar
|
||||||
|
|
|
@ -39,9 +39,21 @@
|
||||||
port = 1026;
|
port = 1026;
|
||||||
};
|
};
|
||||||
address = "evie.litherland-smith@ukaea.uk";
|
address = "evie.litherland-smith@ukaea.uk";
|
||||||
|
aliases = [ "elitherl@jet.uk" ];
|
||||||
passwordCommand = "${pkgs.pass}/bin/pass show Mail/Outlook/ukaea";
|
passwordCommand = "${pkgs.pass}/bin/pass show Mail/Outlook/ukaea";
|
||||||
primary = true;
|
primary = true;
|
||||||
userName = address;
|
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 = {
|
mbsync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
create = "both";
|
create = "both";
|
||||||
|
@ -60,7 +72,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
mu.enable = true;
|
mu.enable = true;
|
||||||
notmuch.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
calendar.accounts.ukaea = {
|
calendar.accounts.ukaea = {
|
||||||
|
|
Loading…
Reference in a new issue