1 { pkgs, lib, config, ... }:
3 xdg.configFile."mutt/mailcap".text = ''
4 application/pdf; evince %s; test=test -n "$DISPLAY";
5 image/vnd.djvu; djview4 %s; test=test -n "$DISPLAY";
6 image/*; geeqie %s; test=test -n "$DISPLAY";
7 text/html; firefox %s; test=test -n "$DISPLAY"; edit=firefox %s;
9 xdg.configFile."neomutt/neomuttrc".text = ''
11 set header_cache = "${config.xdg.cacheHome}/mutt/headers"
12 set mailcap_path = "${config.xdg.configHome}/mutt/mailcap"
13 set message_cachedir = "${config.xdg.cacheHome}/mutt/messages"
14 set news_cache_dir = '${config.xdg.cacheHome}/mutt/news'
15 set tmpdir = "${config.xdg.cacheHome}/mutt/tmp"
16 set newsrc = '${config.xdg.configHome}/mutt/newsrc.%s'
17 ${builtins.readFile mutt/muttrc}
18 macro index,pager H ":set auto_tag=yes\n:unset wait_key\n<pipe-entry>${pkgs.procmail}/bin/formail -ds | rspamc learn_ham\n:set wait_key\n" "Flag as HAM"
19 macro index,pager S "<pipe-entry>${pkgs.procmail}/bin/formail -ds | rspamc symbols\n<enter-command>set wait_key\n" "Tests if it is SPAM"
20 macro index,pager s ":set confirmappend=no delete=yes auto_tag=yes\n:unset wait_key\n<pipe-entry>${pkgs.procmail}/bin/formail -ds | rspamc learn_spam\n:set wait_key\n<save-message>=.Pourriel/\n<sync-mailbox>:set confirmappend=yes delete=ask-yes\n" "Flag as SPAM"
22 account-hook (autogeree.net) 'set certificate_file = ${mutt/autogeree.net/certificate_file.pem}'
23 account-hook (sourcephile.fr) 'set certificate_file = ${mutt/sourcephile.fr/certificate_file.pem}'
25 #source ${mutt/sourcephile.fr/julm.imap.conf}
26 #source ${mutt/autogeree.net/julm.imap.conf}
27 #set nm_default_uri = imaps://julm@sourcephile.fr@mail.sourcephile.fr:993/INBOX
28 #set spoolfile = imaps://julm@sourcephile.fr@mail.sourcephile.fr:993/
30 folder-hook (/autogeree.net/) 'source ${mutt/autogeree.net/julm.maildir.conf}'
31 source ${mutt/autogeree.net/julm.maildir.conf}
32 mailboxes `find -P ~/mail/autogeree.net/mail/ -type d -name new -printf "\"%h\" "`
34 folder-hook (/sourcephile.fr/) 'source ${mutt/sourcephile.fr/julm.maildir.conf}'
35 source ${mutt/sourcephile.fr/julm.maildir.conf}
36 mailboxes `find -P ~/mail/sourcephile.fr/mail/ -type d -name new -printf "\"%h\" "`
38 folder-hook (news.sourcephile.fr) 'source ${mutt/sourcephile.fr/julm.maildir.conf}; set record = =Envoyés'
39 source ${mutt/sourcephile.fr/mails.nntp.conf}
40 source ${mutt/sourcephile.fr/mails.imap.conf}