ajout des config de mutt

This commit is contained in:
masterzu 2023-06-23 17:24:33 +02:00
parent e95925313a
commit 3ebb83ad3c
6 changed files with 638 additions and 0 deletions

48
muttrc-accounts-leger Normal file
View File

@ -0,0 +1,48 @@
# mutt config - private datas
set realname = 'Patrick Cao Huu Thien'
set from = 'patrick.cao_huu_thien@sorbonne-universite.fr'
alternates '^patrick.cao_huu_thien@'
alternates '^master.h2zu@gmail.com$'
alternates '^pcao@dalembert.upmc.fr$'
send-hook . 'set realname="Patrick Cao Huu Thien"'
send-hook "~f ^master.h2zu@gmail.com$" 'set realname="Master ZU"'
# my host
set hostname = 'dalembert.upmc.fr'
set use_domain
# SMTP
#
# heywood dont handle TLS -- too old version
set smtp_url=smtp://heywood.dalembert.upmc.fr
unset ssl_force_tls
unset ssl_starttls
# set smtp_url=smtp://mail.lam.jussieu.fr
#
# accounts
#
source $HOME/.mutt/accounts/archive
macro generic \Cx0 "\Cx| ~/.mutt/accounts/archive\"\n\Cx&1\"<enter><change-folder>!<enter>"
macro generic \Cx1 "\Cx| ~/.mutt/accounts/dalembert\"\n\Cx&2\"<enter><change-folder>!<enter>"
macro generic \Cx2 "\Cx| ~/.mutt/accounts/gmail\"\n\Cx&0\"<enter><change-folder>!<enter>"
#
# switch account with <tab>
macro index <tab> "\Cx1"
macro index <f2> "\Cx0"
macro index <f3> "\Cx1"
macro index <f4> "\Cx2"
#
# Listes
#
subscribe .*@listes.upmc.fr
subscribe .*@listes.sorbonne-universite.fr
subscribe .*@lists.debian.org
subscribe .*@pmichaud.com
subscribe .*@services.cnrs.fr
subscribe .*@listes.fercsup-cgt.org
subscribe .*@groupes.renater.fr

50
muttrc-accounts-lhote Normal file
View File

@ -0,0 +1,50 @@
# mutt config - private datas
set realname = 'Patrick Cao Huu Thien'
set from = 'patrick.cao_huu_thien@sorbonne-universite.fr'
alternates '^patrick.cao_huu_thien@'
alternates '^master.h2zu@gmail.com$'
alternates '^pcao@dalembert.upmc.fr$'
send-hook . 'set realname="Patrick Cao Huu Thien"'
send-hook "~f ^master.h2zu@gmail.com$" 'set realname="Master ZU"'
# my host
set hostname = 'dalembert.upmc.fr'
set use_domain
# SMTP
#
# heywood dont handle TLS -- too old version
set smtp_url=smtp://heywood.dalembert.upmc.fr
unset ssl_force_tls
unset ssl_starttls
# set smtp_url=smtp://mail.lam.jussieu.fr
#
# accounts
#
source /home/patrick/.mutt/accounts/upmc-offline
macro generic \Cx0 "\Cx| ~/.mutt/accounts/upmc-offline\"\n\Cx&1\"<enter><change-folder>!<enter>"
macro generic \Cx1 "\Cx| ~/.mutt/accounts/gmail-offline\"\n\Cx&0\"<enter><change-folder>!<enter>"
# switch account with <tab>
macro index <tab> "\Cx1"
macro index <f2> '<sync-mailbox><enter-command>source ~/.mutt/accounts/upmc-offline<enter><change-folder>!<enter>'
macro index <f3> '<sync-mailbox><enter-command>source ~/.mutt/accounts/gmail-offline<enter><change-folder>!<enter>'
#
# Listes
#
subscribe .*@listes.upmc.fr
subscribe .*@listes.sorbonne-universite.fr
subscribe .*@lists.debian.org
subscribe .*@pmichaud.com
subscribe .*@services.cnrs.fr
subscribe .*@listes.fercsup-cgt.org
subscribe .*@groupes.renater.fr

72
muttrc-alias Normal file
View File

@ -0,0 +1,72 @@
# used by macro compose v
alias moi_1 Patrick CAO HUU THIEN <patrick.cao_huu_thien@sorbonne-universite.fr>
alias moi_1bis Patrick CAO HUU THIEN <patrick.cao_huu_thien@upmc.fr>
alias moi_2 Master ZU <master.h2zu@gmail.com>
alias moi_3 Patrick <pcao@dalembert.upmc.fr>
alias pas_moi_ Le concombre Masqué <concombre@example.com>
# reals aliases
# perso
alias pcht Patrick CAO HUU THIEN <patrick.cao_huu_thien@sorbonne-universite.fr>
alias master Master ZU <master.h2zu@gmail.com>
alias chloe Chloe Escudier <chloe.escudier@upmc.fr>
alias chloe2 chloees@gmail.com
# pro
alias toutida Institut ∂\'Alembert <toutida@dalembert.upmc.fr>
alias info info@dalembert.upmc.fr
alias elisee Elisée Mackagny <mackagny@dalembert.upmc.fr>
alias ray Pascal Ray <ray@ida.upmc.fr>
alias lesaec Pascal Le Saëc <lesaec@lam.jussieu.fr>
alias popinet Stephane Popinet <stephane.popinet@upmc.fr>
alias cablage dsi-reseau@sorbonne-universite.fr
alias paola Paola Cinnella <paola.cinnella@sorbonne-universite.fr>
alias zaleski Stéphane Zaleski <stephane.zaleski@sorbonne-universite.fr>
alias katz Brian FG Katz <brian.katz@upmc.fr>
alias arnaud.antkowiak Arnaud Antkowiak <arnaud.antkowiak@upmc.fr>
alias ASR ASR <asr@services.cnrs.fr>
alias dsi-certi dsi-certi@sorbonne-universite.fr
alias rssi RSSI de SU <rssi@sorbonne-universite.fr>
alias paulo.moradefreitas Paulo MORA DE FREITAS <paulo.moradefreitas@cnrs.fr>
alias paulo Paulo MORA DE FREITAS <paulo.moradefreitas@cnrs.fr>
alias stephanie Stephanie Deboeuf <sdeboeuf@dalembert.upmc.fr>
alias thierry Thierry Bastien <thierry.bastien@parisdescartes.fr>
alias pyl Pierre-Yves Lagrée <pierre-yves.lagree@upmc.fr>
alias simona Simona Otarasanu <simona.otarasanu@upmc.fr>
alias evelyne Evelyne Mignon <evelyne.mignon@upmc.fr>
alias catherine Catherine Dejancourt <dejancourt@dalembert.upmc.fr>
alias sandrine Sandrine BANDEIRA <sandrine.bandeira@dalembert.upmc.fr>
alias olivier Olivier LABBEY <labbey@dalembert.upmc.fr>
alias alvaro Alvaro Veronique <veronique.alvaro@upmc.fr>
alias dupuy Sylvie Dupuy <sylvie.dupuy@sorbonne-universite.fr>
# exterieur pro
alias sebastien-carri Sebastien Gross <sebastien.gross@carri.com>
alias abaqus Yannick MARGANI <Yannick.MARGANI@3ds.com>
alias newstep Clement Bounchareun <boun@newstep.fr>
alias ugap Julie Prost <julie.prost@sorbonne-universite.fr>
# CGT
alias nathalie GAUDARD Nathalie <nathalie.gaudard@sorbonne-universite.fr>
alias michel Michel Krawczyk <michel.krawczyk@upmc.fr>
alias florence Florence Le Priol <florence.le_priol@sorbonne-universite.fr>
alias karine Karine Vettese <karine.vettese@sorbonne-universite.fr>
alias michelle.charabie Michelle Charabie-Delblond <michelle.charabie-delblond@sorbonne-universite.fr>
alias eric Eric Charron <eric.charron@insp.upmc.fr>
alias solveig Solveig Langen <solveig.langen@espe-paris.fr>
alias beatrice.voilmy Beatrice Fontaine Voilmy <beatrice.voilmy@espe-paris.fr>
# perso
alias lucie tatie.lucie@gmail.com
alias papi_et_nanou Papi et Nanou <nanou.escudier@gmail.com>
alias juliette Juliette Mersanne <juliette.mersanne@yahoo.fr>
alias emmanuelle Emma Chevalier <chevalier.emma@wanadoo.fr>
alias thomas Thomas Félix-François <thomas@nocive.com>
alias Matthieu.Pluvinage Matthieu Pluvinage <Matthieu.Pluvinage@shields-e.com>
alias aziz Aziz Boutalbi <azizounet@free.fr>
alias emmanuelle.wilgenbus Emmanuelle Wilgenbus <emmanuelle.wilgenbus@gmail.com>

82
muttrc-colors Normal file
View File

@ -0,0 +1,82 @@
# vim: filetype=muttrc
# from https://github.com/LukeSmithxyz/mutt-wizard/blob/master/etc/muttcol
#
# Header colors:
# color ( header | body ) <foreground> <background> <regexp>
color header brightwhite color236 "^Subject"
color header color124 color236 "^From"
color header color11 color236 "^From:"
color header color10 color236 "^To"
color header color40 color236 "^(CC|BCC)"
color header color9 color240 "^(X-j-chkmail-Status|X-Spam-Status|X-Amavis-Spam-Status|X-Renater-SpamScore)"
# header dans le body ?? FIXME
color body color40 color236 "\[[^\[]+\]"
# field in body
color body color248 color236 "^[A-Z][a-zA-Z0-9\-]*:\.*"
color body blue default "[\-\.+_a-zA-Z0-9]+@[\-\._a-zA-Z0-9]+" # Email addresses
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
color body green default "\`[^\`]*\`" # Green text between ` and `
color body brightblue default "^# \.*" # Headings as bold blue
color body brightcyan default "^## \.*" # Subheadings as bold cyan
color body brightgreen default "^### \.*" # Subsubheadings as bold green
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
color body brightcyan default "[;:][-o][)/(|]" # emoticons
color body brightcyan default "[;:][)(|]" # emoticons
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
color body red default "(BAD signature)"
color body cyan default "(Good signature)"
color body brightgreen default "^gpg: Good signature"
color body brightyellow default "^gpg: "
color body brightyellow red "^gpg: BAD signature "
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
# color index <foreground> <background> <pattern>
# color index default default '.*' # default
color index default default '~u' # list messages
color index green default '~P' # from me
color index brightgreen color0 '~p' # for me
color index brightyellow color0 "~N" # new messages
color index yellow color0 "~O" # ols messages
color index red color0 '~T' # tagged messages
color index red default '~H ..*' # spam messages
color index magenta default 'ray|lesaec|mackagny|info'
# color index color28 default '~f netdata ~s "recovered "'
color index color2 default '~f netdata ~s "recovered "'
color index color202 default '~f netdata ~s "needs attention"'
color index color9 default '~f netdata ~s "critical "'
color index cyan blue '~D' # deleted messages
# color <ojb> <foreground> <background>
color normal default default
color indicator brightblack white
color normal brightyellow default
color error red default
color tilde black default
color message cyan default
color markers red white
color attachment white default
color search brightmagenta default
color status brightyellow blue
color hdrdefault color248 color236
color quoted green default
color quoted1 blue default
color quoted2 cyan default
color quoted3 yellow default
color quoted4 red default
color quoted5 brightred default
color signature color248 default
color bold black default
color underline black default
color normal default default
# mono
mono bold bold
mono underline underline
mono indicator reverse
mono error bold
mono body bold "^gpg: Good signature"
mono body bold "^gpg: BAD signature from.*"

209
muttrc-leger Normal file
View File

@ -0,0 +1,209 @@
# mutt config commun
#
# from https://github.com/Nelyah/dotfiles/blob/master/.mutt/settings
set use_envelope_from=yes
set reverse_name
set reverse_realname
#
# paths
#
# set folder = ~/.mail # mailbox location -- set in accounts files
set alias_file = ~/.mutt/muttrc-alias # where to store aliases
source ~/.mutt/muttrc-alias
set header_cache = ~/.mutt/cache/headers # where to store headers
set message_cachedir = ~/.mutt/cache/bodies # where to store bodies
set certificate_file = ~/.mutt/certificates # where to store certs
set tmpdir = ~/.mutt/temp # where to keep temp files
set print = ask-yes
set print_command = lp
set ispell = "aspell check"
#
# general
#
set mail_check=90 # check mail every (s)
set timeout=15 # wait only (s) max
set editor='vim "+set spelllang=fr"'
set nowait_key
set user_agent=yes
set mime_forward=yes # set forward message as attach and not in text
# text/html ....
alternative_order text/plain text/html
auto_view text/html
# status format
# default is = "-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---"
set status_format = "-%r-%v@%h: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---"
#
# pager format
# default is "-%Z- %C/%m: %-20.20n %s%* -- (%P)"
set pager_format = "-%Z- %C/%m: from <%n> « %s »%* -- (%P)"
#
# index
#
# index format dynamic change
# from https://muttmua.gitlab.io/mutt/manual-dev.html#index-format-hook
set index_format="%4C %Z %?H?[%H]? %-10@date@ %-30.30L (%?l?%4l&%4c?) %s"
index-format-hook date "~d<1d" "%[%H:%M]"
index-format-hook date "~d<2d" "hier %[%H:%M]"
index-format-hook date "~d<5d" "%[%a %H:%M]"
index-format-hook date "~d<1m" "%[%a %d]"
index-format-hook date "~d<1y" "%[%d %b]"
index-format-hook date "~A" "%[%m/%Y]"
set sort = threads # default sorting
set sort_aux = last-date-received # second sorting
#
# keybinding
#
bind generic <home> first-entry
bind generic <C-up> first-entry
bind generic <end> last-entry
bind generic <C-down> last-entry
bind generic <left> previous-entry
bind generic <right> next-entry
bind generic '"' what-key # print key code -- ctrl+g to quit
bind index G imap-fetch-mail # force fetch new email
bind index K previous-unread
bind index J next-unread
bind index \ct tag-thread
# TODO macro index <Esc>t <enter-command>untag-pattern<enter>
bind pager <pageup> half-up
bind pager <up> half-up
bind pager <pagedown> half-down
bind pager <down> half-down
#
# Macros
#
macro index <esc>T <untag-pattern>
# urlscan
macro index,pager \cb "<pipe-message>urlscan<enter>" "open URL in urlscan"
# save messages
macro index >I <tag-prefix><save-message>=SERVICE.INFO<enter> 'save to service info'
macro index >N <tag-prefix><save-message>=netdata<enter> 'save to netdata'
macro index >P <tag-prefix><save-message>=2019-2020-PYL<enter> 'Le chef'
macro index >S <tag-prefix><save-message>=SPAM<enter> 'save to SPAM'
# filtres to new/old/flag messages
macro index ,a "<limit>~A<Enter>" "Voir: all"
macro index ,n "<limit>(~N|~O|~F)<Enter>" "Voir: new/flag"
macro index ,m "<limit>(~N|~O)(~p|~P|~C info@)|~C printers@|~C proxmox@|~s 'monit alert'|~s SMART|~F<Enter>" "Voir: new+from/to me"
macro index ,M "<limit>(~p|~P|~C info@|~C printers@)|~C proxmox@|~s 'monit alert'|~s SMART|~F<Enter>" "Voir: from/to me"
macro index ,t "<limit>(~N|~O|~F) ~C tout.?ida@<Enter>" "Voir: new+toutida"
macro index ,T "<limit>~C tout.?ida@<Enter>" "Voir: toutida"
# filtres autres
macro index ,i "<limit>Demande.*inscription<Enter>" "view logwatch"
macro index >i <tag-prefix><save-message>=dalembert-inscription<enter> 'save to IMPRIMANTES'
# macro index /c "<limit>~C su-adherents|~C diffusion-fercsup|~C bureau-sntrsjussieu|~C communication-syndicale|~C commob_jussieu|~s CGT|~s 'commission sociale'<Enter>" "view listes CGT"
macro index ,c "<limit>~C corresp_ssi@services.cnrs.fr | ~C cssi_dr2@services.cnrs.fr | ~C netadmin@listes.sorbonne-universite.fr | ~c cssi@listes.sorbonne-universite.fr | ~f support@cert-manager.com | ~s genci <Enter>" "view CSSI"
macro index >C <tag-prefix><save-message>=CSSI<enter> 'save to CSSI'
macro index ,l "<limit>logwatch|cron<Enter>" "view logwatch"
macro index >L <tag-prefix><save-message>=logwatchs<enter> 'save to logwatchs'
macro index ,v "<limit>~f @brahma<Enter>" "view brahma logs"
macro index >V <tag-prefix><save-message>=VLAN<enter> 'save to VLAN'
# listes
macro index /a "<limit>~C asr@services.cnrs.fr<Enter>" "Voir: liste-ASR"
macro index >A <tag-prefix><save-message>=liste-ASR<enter> "save to liste-ASR"
macro index /d "<limit>~C @lists.debian.org<Enter>" "Voir: liste-Debian"
macro index >D <tag-prefix><save-message>=liste-DEBIAN<enter> "save to liste-DEBIAN"
macro index /h "<limit>~C hackesr@groupes.renater.fr<Enter>" "Voir: liste-hackesr"
macro index >H <tag-prefix><save-message>=liste-hackesr<enter> "save to liste-hackesr"
macro index /l "<limit>(~C @listes.upmc.fr|~C @services.cnrs.fr|~C @groupes.renater.fr|~C @pmichaud.com)<Enter>" "Voir: Listes pro"
macro index /m "<limit>monit<Enter>" "Voir: monit"
# get new messages by default
folder-hook INBOX push ,m
# identities
macro compose \cf "<edit-from>^Umoi\_<tab>" "Select from"
#
# spam detection - champs %H
#
spam "X-j-chkmail-Status: Spam (.*)" "ju/%1"
spam "X-Spam-Status: Yes" "sa"
spam "X-Amavis-Spam-Status: Yes" "am"
spam "X-Renater-SpamScore: ([1-9][0-9]*)" "re/%1"
set spam_separator="|"
#
# Messages
#
set rfc2047_parameters # decoded some
set send_charset = "us-ascii:utf-8" # UTF stuff
set assumed_charset = "utf-8"
set charset = "utf-8"
set date_format = "%d %b %Y a %H:%M:%S %Z"
set attribution_locale = "fr_FR.UTF-7"
set attribution="Le %d, %n a écrit :"
# delete duplicate messages
folder-hook . push "<delete-pattern>~=<enter>"
#
# headers
#
ignore *
unignore from date subject to cc reply-to User-Agent Content-Length
unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
unignore posted-to: List-Id:
unignore X-j-chkmail-Status: X-Spam-Status: X-Amavis-Spam-Status: X-Renater-SpamScore:
# reset header order
unhdr_order *
hdr_order Date: Subject: From: From To: Cc: reply-to: User-Agent: x-mailer: posted-to: List-Id: x-mailing-list: Content-Length: X-*:
# pager
set pager_stop # dont exit at the end of the message with <space>
#
# Colors
#
source $HOME/.mutt/muttrc-colors
#
# Accounts
#
# from https://github.com/Nelyah/dotfiles/blob/master/.mutt/settings
macro generic \Cx| "<enter-command>source"
macro generic \Cx& "<enter-command>macro index \\t \"\\Cx"
source $HOME/.mutt/muttrc-accounts
#
# GPG
#
source $HOME/.mutt/gpg.rc
set crypt_autosign = yes
set crypt_replysign = yes
set crypt_replyencrypt = yes
set crypt_replysignencrypted = yes
# set crypt_protected_headers_write = yes # protect subject
# set crypt_protected_headers_subject = 'Sujet Sensible (chiffré)'
set pgp_default_key = D7B87DFB479CA02E48A2383C00054A3358D16D27
# set pgp_sign_as = D7B87DFB479CA02E48A2383C00054A3358D16D27
# auto attach pub key from https://stackoverflow.com/a/67065558
macro compose y "<attach-key>`echo D7B87DFB479CA02E48A2383C00054A3358D16D27`<enter><enter><send-message>"
# Esc-k pour inclure manuellement
#
# Query : ldap
#
# Use with Ctrl+t
set query_command = "$HOME/.mutt/mutt_ldap.sh %s"

177
muttrc-lhote Normal file
View File

@ -0,0 +1,177 @@
# mutt config commun
#
# from https://github.com/Nelyah/dotfiles/blob/master/.mutt/settings
set use_envelope_from=yes
set reverse_name
set reverse_realname
#
# paths
#
# set folder = ~/.mail # mailbox location -- set in accounts files
set alias_file = ~/.mutt/muttrc-alias # where to store aliases
source ~/.mutt/muttrc-alias
set header_cache = ~/.mutt/cache/headers # where to store headers
set message_cachedir = ~/.mutt/cache/bodies # where to store bodies
set certificate_file = ~/.mutt/certificates # where to store certs
set tmpdir = ~/.mutt/temp # where to keep temp files
set print_command = lp
set ispell = "aspell check"
set mbox_type = "MailDir"
#
# general
#
set mail_check=90 # check mail every (s)
set timeout=15 # wait only (s) max
set editor='vim "+set spelllang=fr"'
set nowait_key
set user_agent=yes
# text/html ....
alternative_order text/plain text/html
auto_view text/html
# status format
# default is = "-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---"
set status_format = "-%r-%v@%h: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---"
#
# pager format
# default is "-%Z- %C/%m: %-20.20n %s%* -- (%P)"
set pager_format = "-%Z- %C/%m: from <%n> « %s »%* -- (%P)"
#
# index
#
# index format dynamic change
# from https://muttmua.gitlab.io/mutt/manual-dev.html#index-format-hook
set index_format="%4C %Z %?H?[%H]? %-10@date@ %-30.30L (%?l?%4l&%4c?) %s"
index-format-hook date "~d<1d" "%[%H:%M]"
index-format-hook date "~d<2d" "hier %[%H:%M]"
index-format-hook date "~d<5d" "%[%a %H:%M]"
index-format-hook date "~d<1m" "%[%a %d]"
index-format-hook date "~d<1y" "%[%d %b]"
index-format-hook date "~A" "%[%m/%Y]"
set sort = threads # default sorting
set sort_aux = last-date-received # second sorting
#
# keybinding
#
bind generic <home> first-entry
bind generic <C-up> first-entry
bind generic <end> last-entry
bind generic <C-down> last-entry
bind generic <left> previous-entry
bind generic <right> next-entry
bind generic '"' what-key # print key code -- ctrl+g to quit
bind index G imap-fetch-mail # force fetch new email
bind index K previous-unread
bind index J next-unread
bind pager <pageup> half-up
bind pager <up> half-up
bind pager <pagedown> half-down
bind pager <down> half-down
#
# Macros
#
# save messages
macro index >C <tag-prefix><save-message>=CSSI<enter> 'save to CSSI'
macro index >i <tag-prefix><save-message>=dalembert-inscription<enter> 'save to IMPRIMANTES'
macro index ,i "<limit>Demande.*inscription<Enter>" "view logwatch"
macro index >I <tag-prefix><save-message>=SERVICE.INFO<enter> 'save to service info'
macro index >L <tag-prefix><save-message>=logwatchs<enter> 'save to logwatchs'
macro index ,l "<limit>logwatch<Enter>" "view logwatch"
macro index >N <tag-prefix><save-message>=netdata<enter> 'save to netdata'
macro index >P <tag-prefix><save-message>=2019-2020-PYL<enter> 'Le chef'
macro index >S <tag-prefix><save-message>=SPAM<enter> 'save to SPAM'
macro index >V <tag-prefix><save-message>=VLAN<enter> 'save to VLAN'
macro index ,v "<limit>vlan<Enter>" "view vlan"
# urlscan
macro index,pager \cb "<pipe-message>urlscan<enter>" "open URL in urlscan"
# limit to new/old/flag messages
macro index ,a "<limit>~A<Enter>" "Voir: all"
macro index ,n "<limit>(~N|~O|~F)<Enter>" "Voir: new/flag"
macro index ,m "<limit>(~N|~O)(~p|~P|~C info@|~C printers@|~C proxmox@|~s monit)|~F<Enter>" "Voir: new+from/to me"
macro index ,M "<limit>(~p|~P|~C info@|~C printers@|~C proxmox@|~s monit)|~F<Enter>" "Voir: from/to me"
macro index ,t "<limit>(~N|~O|~F) ~C tout.?ida@<Enter>" "Voir: new+toutida"
macro index ,T "<limit>~C tout.?ida@<Enter>" "Voir: toutida"
macro index /a "<limit>~C asr@services.cnrs.fr<Enter>" "Voir: liste-ASR"
macro index >A <tag-prefix><save-message>=liste-ASR<enter> "save to liste-ASR"
macro index /h "<limit>~C hackesr@groupes.renater.fr<Enter>" "Voir: liste-hackesr"
macro index >H <tag-prefix><save-message>=liste-hackesr<enter> "save to liste-hackesr"
macro index /d "<limit>~C @lists.debian.org<Enter>" "Voir: liste-Debian"
macro index >D <tag-prefix><save-message>=liste-DEBIAN<enter> "save to liste-DEBIAN"
macro index /l "<limit>(~C @listes.upmc.fr|~C @services.cnrs.fr|~C @groupes.renater.fr|~C @pmichaud.com)<Enter>" "Voir: Listes pro"
macro index /m "<limit>monit<Enter>" "Voir: monit"
# get new messages by default
folder-hook INBOX push ,m
# identities
macro compose \cf "<edit-from>^Umoi\_<tab>" "Select from"
#
# spam detection - champs %H
#
spam "X-j-chkmail-Status: Spam (.*)" "ju/%1"
spam "X-Spam-Status: Yes" "sa"
spam "X-Amavis-Spam-Status: Yes" "am"
spam "X-Renater-SpamScore: ([1-9][0-9]*)" "re/%1"
set spam_separator="|"
#
# Messages
#
set rfc2047_parameters # decoded some
set send_charset = "us-ascii:utf-8" # UTF stuff
set assumed_charset = "utf-8"
set charset = "utf-8"
set date_format = "%d %b %Y a %H:%M:%S %Z"
set attribution_locale = "fr_FR.UTF-7"
set attribution="Le %d, %n a écrit :"
#
# headers
#
ignore *
unignore from date subject to cc reply-to User-Agent Content-Length
unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
unignore posted-to: List-Id:
unignore X-j-chkmail-Status: X-Spam-Status: X-Amavis-Spam-Status: X-Renater-SpamScore:
# reset header order
unhdr_order *
hdr_order Date: Subject: From: From To: Cc: reply-to: User-Agent: x-mailer: posted-to: List-Id: x-mailing-list: Content-Length: X-*:
# pager
set pager_stop # dont exit at the end of the message with <space>
#
# Colors
#
source $HOME/.mutt/muttrc-colors
#
# Accounts
#
# from https://github.com/Nelyah/dotfiles/blob/master/.mutt/settings
macro generic \Cx| "<enter-command>source"
macro generic \Cx& "<enter-command>macro index \\t \"\\Cx"
source $HOME/.mutt/muttrc-accounts
#
# Query : ldap
#
# Use with Ctrl+t
set query_command = "$HOME/.mutt/mutt_ldap.sh %s"