dotfiles/muttrc-lhote

178 lines
6.0 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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"