MBSync, Notmuch and emacs-notmuch
This commit is contained in:
parent
94b40d62d2
commit
f205170f72
3 changed files with 72 additions and 6 deletions
|
@ -3,6 +3,8 @@
|
||||||
delete-old-versions 6
|
delete-old-versions 6
|
||||||
kept-old-versions 2
|
kept-old-versions 2
|
||||||
version-control t
|
version-control t
|
||||||
create-lockfiles nil)
|
create-lockfiles nil
|
||||||
|
native-comp-async-report-warnings-errors nil
|
||||||
|
)
|
||||||
|
|
||||||
(provide 'config-emacs)
|
(provide 'config-emacs)
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
(use-package notmuch
|
(use-package notmuch
|
||||||
:custom
|
:custom
|
||||||
(notmuch-archive-tags '("-unread"))
|
(notmuch-archive-tags '("-unread"))
|
||||||
(notmuch-show-indent-content nil)
|
;;(notmuch-show-indent-content nil)
|
||||||
|
(notmuch-search-older-first nil)
|
||||||
|
(message-kill-buffer-on-exit t)
|
||||||
(notmuch-hello-sections
|
(notmuch-hello-sections
|
||||||
'(notmuch-hello-insert-header
|
'(notmuch-hello-insert-header
|
||||||
notmuch-hello-insert-saved-searches
|
notmuch-hello-insert-saved-searches
|
||||||
|
@ -20,4 +22,25 @@
|
||||||
("d" ("+deleted" "-inbox") "Delete")))
|
("d" ("+deleted" "-inbox") "Delete")))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(use-package message
|
||||||
|
:config
|
||||||
|
(setq message-send-mail-function 'message-send-mail-with-sendmail
|
||||||
|
message-sendmail-f-is-evil t
|
||||||
|
message-sendmail-envelope-from nil ; 'header
|
||||||
|
message-sendmail-extra-arguments '("--read-envelope-from"))
|
||||||
|
|
||||||
|
(setq mml-secure-smime-sign-with-sender t)
|
||||||
|
(setq mml-secure-openpgp-sign-with-sender t)
|
||||||
|
|
||||||
|
;; Add signature by default
|
||||||
|
(add-hook 'message-setup-hook 'mml-secure-message-sign-pgpmime)
|
||||||
|
;; Verify other's signatures
|
||||||
|
(setq mm-verify-option 'always))
|
||||||
|
|
||||||
|
(use-package sendmail
|
||||||
|
:config
|
||||||
|
(setq mail-specify-envelope-from nil
|
||||||
|
send-mail-function 'message-send-mail-with-sendmail
|
||||||
|
sendmail-program "msmtp"))
|
||||||
|
|
||||||
(provide 'config-emails)
|
(provide 'config-emails)
|
||||||
|
|
|
@ -16,30 +16,71 @@ in
|
||||||
|
|
||||||
accounts.email.accounts = {
|
accounts.email.accounts = {
|
||||||
personal = {
|
personal = {
|
||||||
|
realName = "Andrea Ciceri";
|
||||||
address = "andrea.ciceri@autistici.org";
|
address = "andrea.ciceri@autistici.org";
|
||||||
|
primary = true;
|
||||||
|
flavor = "plain";
|
||||||
|
passwordCommand = "pass show autistici/password";
|
||||||
#gpg = {
|
#gpg = {
|
||||||
# key = "";
|
# key = "";
|
||||||
# signByDefault = true;
|
# signByDefault = true;
|
||||||
#};
|
#};
|
||||||
imap.host = "mail.autistici.org";
|
imap =
|
||||||
|
{
|
||||||
|
host = "mail.autistici.org";
|
||||||
|
port = 993;
|
||||||
|
tls.enable = true;
|
||||||
|
};
|
||||||
mbsync = {
|
mbsync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
create = "maildir";
|
create = "maildir";
|
||||||
};
|
};
|
||||||
msmtp.enable = true;
|
msmtp.enable = true;
|
||||||
notmuch.enable = true;
|
notmuch.enable = true;
|
||||||
primary = true;
|
|
||||||
realName = "Andrea Ciceri";
|
|
||||||
#signature = {
|
#signature = {
|
||||||
# text = ''
|
# text = ''
|
||||||
# '';
|
# '';
|
||||||
# showSignature = "append";
|
# showSignature = "append";
|
||||||
#};
|
#};
|
||||||
passwordCommand = "pass show autistici/password";
|
|
||||||
smtp = {
|
smtp = {
|
||||||
host = "smtp.autistici.org";
|
host = "smtp.autistici.org";
|
||||||
|
port = 465;
|
||||||
|
tls.enable = true;
|
||||||
};
|
};
|
||||||
userName = "andrea.ciceri@autistici.org";
|
userName = "andrea.ciceri@autistici.org";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.user =
|
||||||
|
let
|
||||||
|
description = "Download mailboxes with mbsync and update notmuch db";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.mbsync-and-notmuch =
|
||||||
|
{
|
||||||
|
Unit = {
|
||||||
|
After = [ "network.target" ];
|
||||||
|
Description = description;
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = ''${pkgs.isync}/bin/mbsync -Va && ${pkgs.notmuch}/bin/notmuch new'';
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
timers.mbsync-and-notmuch = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Timer to \"${description}\"";
|
||||||
|
};
|
||||||
|
Timer = {
|
||||||
|
OnBootSec = "2m";
|
||||||
|
OnUnitInactiveSec = "5m";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue