From cb1c315c8d0d3add63d9c97405d2d75c8eb50b51 Mon Sep 17 00:00:00 2001 From: "kujiu (@ciredutemps)" Date: Sat, 8 Feb 2020 20:24:21 +0100 Subject: [PATCH] New mutt config --- common/.mutt/accounts-private.conf | 0 common/.mutt/accounts.conf | 21 ++++----------------- common/.mutt/accounts/example/conf | 20 ++++++++++++++++++++ common/.mutt/accounts/example/signature.txt | 2 ++ common/.mutt/display.conf | 4 +++- common/.mutt/keys.conf | 14 ++------------ common/.mutt/mail.conf | 20 ++++++++++---------- 7 files changed, 41 insertions(+), 40 deletions(-) delete mode 100644 common/.mutt/accounts-private.conf create mode 100644 common/.mutt/accounts/example/conf create mode 100644 common/.mutt/accounts/example/signature.txt diff --git a/common/.mutt/accounts-private.conf b/common/.mutt/accounts-private.conf deleted file mode 100644 index e69de29..0000000 diff --git a/common/.mutt/accounts.conf b/common/.mutt/accounts.conf index d0b032f..7b2f881 100644 --- a/common/.mutt/accounts.conf +++ b/common/.mutt/accounts.conf @@ -1,19 +1,6 @@ -set folder = /home/kujiu/Maildir/ -set sendmail="/usr/bin/msmtp" +folder-hook 'example' 'source ~/.mutt/accounts/example/conf' -set mbox_type = Maildir # mbox ou maildir -set mbox = ~/Maildir/ -set spoolfile = +Perso/INBOX/ # sur quelle boîte commencer -set postponed = +Drafts/ # brouillons -set record = +Perso/Sent/ # où ça +source ~/.mutt/accounts/example/conf -mailboxes `find ~/Maildir/ -type d -name cur -printf '"%h" '` - -# To put in accounts-private.conf: - -#alternates ^mail1@example\\.com$ ^mail2@example\\.com$ - -#send-hook . 'set sendmail="/usr/bin/msmtp -a perso"; set record = +Perso/Sent/ ; set signature = ~/.mutt/signature.perso' -#send-hook "~f ^mail@example.com$" 'set sendmail="/usr/bin/msmtp -a account_name"; set record = +Perso/Sent/ ; set signature = ~/.mutt/signature.default.org' -# -source ~/.mutt/accounts-private.conf +macro index,pager 'source +~/.mutt/accounts/example/conf!' diff --git a/common/.mutt/accounts/example/conf b/common/.mutt/accounts/example/conf new file mode 100644 index 0000000..bbad061 --- /dev/null +++ b/common/.mutt/accounts/example/conf @@ -0,0 +1,20 @@ +set my_account_home = '~/.mutt/accounts/example' +set from = "test@example.com" +set realname = "Mr Example" +set imap_pass = "MyBeautifulPassword" +set imap_user = "$from" +set smtp_url = "smtp://$imap_user@smtp.nerv-project.eu:587/" +set smtp_pass = "$imap_pass" +set folder = "imap://imap.nerv-project.eu" +set spoolfile = "=INBOX" +set postponed = "=Drafts" +set record = "=Sent" +set header_cache = $my_account_home/cache/headers +set message_cachedir = $my_account_home/cache/bodies +set signature = $my_account_home/signature.txt +set imap_check_subscribed +set ssl_starttls=yes +set ssl_force_tls=yes +unset imap_passive +set mail_check=60 +set timeout=60 diff --git a/common/.mutt/accounts/example/signature.txt b/common/.mutt/accounts/example/signature.txt new file mode 100644 index 0000000..fae6233 --- /dev/null +++ b/common/.mutt/accounts/example/signature.txt @@ -0,0 +1,2 @@ +Example Account +account@example.com diff --git a/common/.mutt/display.conf b/common/.mutt/display.conf index 3300ec1..5252b32 100644 --- a/common/.mutt/display.conf +++ b/common/.mutt/display.conf @@ -1,5 +1,7 @@ set nobeep # pas de beeps! -set strict_threads = yes # important, sinon tous les mails de sujet "Salut" seront groupés ensemble +set braille_friendly + +set strict_threads = yes # important, do not group all "Hey" messages set implicit_autoview auto_view text/html application/x-pgp-message diff --git a/common/.mutt/keys.conf b/common/.mutt/keys.conf index 3afe610..ee0d8e9 100644 --- a/common/.mutt/keys.conf +++ b/common/.mutt/keys.conf @@ -5,23 +5,13 @@ bind index,pager \\ sidebar-open bind index next-unread macro index,pager B 'toggle sidebar_visible' - -#set query_command = "abook --mutt-query '%s'" -#macro generic,index,pager a "abook" "lance abook" -#macro index,pager A "abook --add-email" "ajoute l'adresse de l'envoyeur à abook" - macro index,pager a "khard add-email" "add sender address to khard" set query_command= "khard email -p %s | awk -F\" +\" '{print $1 $3}'" bind editor complete-query bind editor ^T complete -# Lance fetchmail avec la touche G. -#macro index G "!fetchmail -m \"/usr/bin/procmail -d\"\r" -#macro pager G "!fetchmail -m \"/usr/bin/procmail -d\"\r" -macro index G "!offlineimap #-u blinkenlights\r" -macro pager G "!offlineimap #-u blinkenlights\r" -macro index c "?" "open a different folder" -macro pager c "?" "open a different folder" +macro index,pager G imap-fetch-mail +macro index,pager c "?" "open a different folder" set alias_file = ~/.aliases # où est le carnet d'adresses diff --git a/common/.mutt/mail.conf b/common/.mutt/mail.conf index 86c007b..22f8b1e 100644 --- a/common/.mutt/mail.conf +++ b/common/.mutt/mail.conf @@ -1,6 +1,6 @@ my_hdr X-Operating-System: `lsb_release -a | grep "^Description:" | sed "s/Description:[\t ]*//"` -# La touche h montre tous les headers +# h key show all headers hdr_order Date From X-Sender Old-Return-Path Reply-To Mail-Followup-To To Cc Bcc hdr_order Delivered-To Subject In-Reply-To X-Mailing-List Mailing-List hdr_order X-Operating-System X-Mailer User-Agent X-GPG- X-PGP- @@ -8,22 +8,22 @@ unignore Date From X-Sender Old-Return-Path Reply-To Mail-Followup-To To Cc Bcc unignore Delivered-To Subject In-Reply-To X-Mailing-List Mailing-List unignore X-Operating-System X-Mailer User-Agent X-GPG- X-PGP- -set sort = threads # tri par threads -set sort = reverse-threads # mails les plus récents en haut -set edit_headers = yes # édite les headers avec le mail -set askcc = yes # confirmation d'envoyer -set reply_to = ask-yes # demande à qui répondreset copy = yes # copie des mails envoyés -set include # inclus le texte original lors d'un Re: +set sort = reverse-date-received +set edit_headers = yes +set askcc = yes +set reply_to = ask-yes +set copy = yes +set include -set forward_format = "Fwd: %s" # forward format +set forward_format = "Fwd: %s" set editor = '/usr/bin/vim -c "set textwrap=72" -c "set wrap" -c "?^$"' # vi bien sûr alternative_order text/html text/enriched text/plain set beep_new = yes set include=yes -set abort_nosubject = ask-yes # les mails sans sujets ou non modifiés -set abort_unmodified = ask-yes # ne partent pas sans confirmation +set abort_nosubject = ask-yes +set abort_unmodified = ask-yes set header_cache =~/.mutt/cache/headers set message_cachedir =~/.mutt/cache/bodies