{ pkgs, lib, config, ... }:
{
home.packages = [ pkgs.neomutt ];
+home.activation.createMuttDirectories =
+ let mkdir = dir: ''$DRY_RUN_CMD mkdir -p $VERBOSE_ARG "${dir}"''; in
+ lib.hm.dag.entryAfter [ "writeBoundary" ]
+ (lib.concatMapStringsSep "\n" mkdir [
+ "${config.xdg.cacheHome}/mutt/messages"
+ "${config.xdg.cacheHome}/mutt/news"
+ "${config.xdg.cacheHome}/mutt/tmp"
+ ]);
+xdg.configFile."mutt/mailcap".text = ''
+'';
xdg.configFile."neomutt/neomuttrc".text = ''
unmailboxes *
+ set header_cache = "${config.xdg.cacheHome}/mutt/headers"
+ set mailcap_path = "${config.xdg.configHome}/mutt/mailcap"
+ set message_cachedir = "${config.xdg.cacheHome}/mutt/messages"
+ set news_cache_dir = '${config.xdg.cacheHome}/mutt/news'
+ set tmpdir = "${config.xdg.cacheHome}/mutt/tmp"
+ set newsrc = '${config.xdg.configHome}/mutt/newsrc.%s'
${builtins.readFile mutt/muttrc}
macro index,pager H ":set auto_tag=yes\n:unset wait_key\n<pipe-entry>${pkgs.procmail}/bin/formail -ds | ${pkgs.rspamd}/bin/rspamc learn_ham\n:set wait_key\n" "Flag as HAM"
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"
#source ${mutt/sourcephile.fr/julm.imap.conf}
#source ${mutt/autogeree.net/julm.imap.conf}
- source ${mutt/sourcephile.fr/mails.imap.conf}
#set nm_default_uri = imaps://julm@sourcephile.fr@mail.sourcephile.fr:993/INBOX
#set spoolfile = imaps://julm@sourcephile.fr@mail.sourcephile.fr:993/
mailboxes `find -P ~/mail/autogeree.net/mail/ -type d -name new -printf "\"%h\" "`
folder-hook (news.sourcephile.fr) 'source ${mutt/sourcephile.fr/julm.maildir.conf}; set record = =Envoyés'
- source ${mutt/sourcephile.fr/julm.nntp.conf}
+ source ${mutt/sourcephile.fr/mails.nntp.conf}
+ folder-hook (mails.sourcephile.fr) 'source ${mutt/sourcephile.fr/julm.maildir.conf}; set record = =Envoyés'
+ source ${mutt/sourcephile.fr/mails.imap.conf}
folder-hook (/sourcephile.fr/) 'source ${mutt/sourcephile.fr/julm.maildir.conf}'
source ${mutt/sourcephile.fr/julm.maildir.conf}
set followup_to_poster = ask-yes
set group_index_format = '%4C %M%N %5s %-45.45f %d'
set hdrs
-set header_cache = "~/.cache/mutt/headers"
set honor_followup_to
set hostname = "localhost"
set imap_check_subscribed
set inews = ''
set mail_check = 60
set mail_check_stats
-set mailcap_path = "~/.mutt/mailcap"
-set message_cachedir = "~/.cache/mutt/bodies"
set metoo = no
set mime_forward = no
set mime_forward_rest
set mime_subject = yes
set net_inc = 5
-set news_cache_dir = '~/.cache/mutt/news'
set newsgroups_charset = utf-8
-set newsrc = '~/.var/mutt/newsrc.%s'
set nntp_authenticators = ''
set nntp_context = 1000
set nntp_listgroup = yes
set ssl_starttls = no
set strict_threads # Use In-Reply-To: header to build threads
set timeout = 30
-set tmpdir = "~/.cache/mutt"
set to_chars = " +TCFL"
set uncollapse_jump = yes
set uncollapse_new = yes
account-hook imaps://julm@sourcephile.fr@mail.sourcephile.fr:993/ ' \
set imap_user = julm@sourcephile.fr; \
set imap_pass = $my_pass_sourcephile_julm; \
- set certificate_file = /home/julm/.config/nixpkgs/home/mutt/sourcephile.fr/certificate_file.pem; \
unset certificate_file; \
set imap_check_subscribed = no; \
set imap_list_subscribed = no; \
+++ /dev/null
-set my_pass_sourcephile_julm = "`pass sourcephile/mail/julm`"
-## Only connection related stuffs in account-hook
-folder-hook snews://news.sourcephile.fr/ ' \
- set smtp_authenticators = plain; \
- set smtp_pass = $my_pass_sourcephile_julm; \
- set smtp_url = smtps://julm@sourcephile.fr@mail.sourcephile.fr:465; \
- unignore Message-ID \
-'
-mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.bar
-mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.ecole
-mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.environnement
-mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.labo
-mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.machines
-mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.pont
-mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.test
-mailboxes snews://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
-# vim: ft=muttrc
set my_pass_sourcephile_julm = "`pass sourcephile/mail/julm`"
## Only connection related stuffs in account-hook
account-hook imaps://mails.sourcephile.fr:1993/ ' \
- unset imap_user; \
- unset imap_pass; \
+ set imap_user = anonymous; \
+ set imap_pass = anonymous; \
set imap_authenticators = ANONYMOUS; \
unset certificate_file; \
set imap_check_subscribed = no; \
set spoolfile = =0; \
unset preconnect \
'
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.bar.0
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.ecole.0
mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.environnement.0
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.labo.0
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.machines.0
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.pont.0
mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.test.0
+
+# git repositories
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.comptalang.0
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.doclang.0
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.majurity.0
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.symantic.0
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.symantic-atom.0
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.symantic-base.0
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.symantic-cli.0
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.symantic-http.0
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.symantic-parser.0
+mailboxes imaps://mails.sourcephile.fr:1993/inbox.comp.sourcephile.symantic-xml.0
+
# vim: ft=muttrc
mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.machines
mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.pont
mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.test
+
+# git repositories
+mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.comptalang
+mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.doclang
+mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.majurity
+mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.symantic
+mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.symantic-atom
+mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.symantic-base
+mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.symantic-cli
+mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.symantic-http
+mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.symantic-parser
+mailboxes snews://news.sourcephile.fr/inbox.comp.sourcephile.symantic-xml
+
mailboxes snews://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
# vim: ft=muttrc