X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.muttrc;h=9ddb4ae580446c7c607ac622c16cb6e94a881e79;hb=2a2bd43d48de22b05aab243101a151175466603c;hp=f33de885cbdf1e5aea5943e5cffb1ccdfc39b615;hpb=a7f4978288f86b0f96b9337abf8812932f01c32f;p=dotfiles.git diff --git a/.muttrc b/.muttrc index f33de88..9ddb4ae 100644 --- a/.muttrc +++ b/.muttrc @@ -7,6 +7,14 @@ # #set folder=~/Mail # Where I keep my mailboxes; I am happy with this default +# Character set for my terminal and config files (including aliases) +set charset=`case "$LC_CTYPE" in *UTF-8) echo utf-8 ;; *) echo koi8-r ;; esac` +set assumed_charset="us-ascii:utf-8:windows-1251:koi8-r" # Character sets for mail without a charset +set config_charset=koi8-r # Character set for this config file and alias files +set send_charset="us-ascii:iso-8859-1:koi8-r:windows-1251:utf-8" # Character sets for outgoing mail +charset-hook x-unknown koi8-r # Show unknow encoding as koi8-r +charset-hook windows-1251 cp1251 # Autoconvert windoze encoding + # source aliases source =mutt/aliases @@ -33,14 +41,6 @@ mailboxes ! =admin =block =bulk =spam `echo $HOME/mail/lists/* | sed s#$HOME/mai set ascii_chars=`[ -n "$SLOWTERM" ] && echo yes || echo no` # Use ASCII instead of ACS chars for threads set arrow_cursor=`[ -n "$SLOWTERM" ] && echo yes || echo no` # Draw a simple cursor on slow terminals -# Character set for my terminal -set charset=`case "$LC_CTYPE" in *UTF-8) echo utf-8 ;; *) echo koi8-r ;; esac` -set assumed_charset="us-ascii:utf-8:windows-1251:koi8-r" # Character sets for mail without a charset -set config_charset=koi8-r # Character set for this config file and alias files -set send_charset="us-ascii:iso-8859-1:koi8-r:windows-1251:utf-8" # Character sets for outgoing mail -charset-hook x-unknown koi8-r # Show unknow encoding as koi8-r -charset-hook windows-1251 cp1251 # Autoconvert windoze encoding - set index_format="%4C %Z %{%b %d} %-15.15F (%4c) %s" # Somewhat different index format, which works nicely with mail lists. set pager_format="%4C %Z %[%b %d] %-15.15F (%4l) %s %* ---(%P)---" # Mostly match index_format @@ -52,7 +52,7 @@ set sort_alias=unsorted set sort_browser=alpha set history=1000 # Number of lines of history in memory -set history_file==tmp/.mutt-history +set history_file==tmp/.mutt_history set save_history=1000 # Number of lines of history in file set read_inc=10 # Progress indicator when reading folders. @@ -60,7 +60,8 @@ set write_inc=10 # Progress indicator when writing folders. set allow_8bit # Never do Q-P encoding on legal 8-bit chars set abort_unmodified=no # Let me send empty messages -set alias_file==mutt/aliases # Where to store aliases +set alias_file==tmp/aliases # Where to store aliases +set attribution="`case "$LC_TIME" in ru_RU*) echo '÷ %{%a, %d %b %Y × %I:%M:%S%p %Z} %f ÎÁÐÉÓÁÌ(Á):' ;; *) echo 'On %d, %f wrote:' ;; esac`" # ` set beep=no # Never beep on errors set collapse_unread=no # Do not collapse thread with unread messages set confirmappend=no # Don't ask me if i want to append to mailboxes @@ -78,7 +79,7 @@ set move=no # Do not move read messages to ~/mbox set pager_context=1 # No. of lines of context to give when scrolling set pager_index_lines=6 # How many index lines to show in the pager set pager_stop # Don't move to the next message on next-page -set postponed==tmp/.mutt-postponed +set postponed==tmp/.mutt_postponed set print=ask-no # Don't waste paper set recall=no # When I say "compose", ask me whether I want to continue composing a postponed message. set reply_regexp="^((re([\\[0-9\\]+])*|aw|ÎÁ):[ \t]*)+[ \t]*" # A regular expression to detect replies @@ -124,7 +125,7 @@ set pgp_use_gpg_agent ignore * # Ignore all lines by default # I do want to see these fields, though! -unignore date from to x-original-to reply-to mail-followup-to cc \ +unignore date from reply-to mail-followup-to followup-to to x-original-to cc \ newsgroups subject user-agent x-mailer x-url x-face # Default list of header fields to weed when displaying @@ -139,7 +140,7 @@ unignore date from to x-original-to reply-to mail-followup-to cc \ # hdr_order [ ... ] # -hdr_order date from to x-original-to reply-to mail-followup-to cc \ +hdr_order date from reply-to mail-followup-to followup-to to x-original-to cc \ newsgroups subject user-agent x-mailer x-url x-face # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -151,7 +152,7 @@ my_hdr X-Attribution: phd my_hdr X-Face: \"4chVP^f8\;3Bi>x\"ic0%DuP(ZLyn:\;kzQ1njs]5,GRZG<{<\\~\`|Shxi7|)d|8uO~HFRfyym\n\ {[xs@OYG]2Q]0\#}0sjJp\`1^1+B6]A2+{9fW=S [ ... ] subscribe (python-(announce|dev|ideas)|.*-(list|sig))@python\.org \ + core-workflow@python\.org \ .*@moderators\.isc\.org .*@lists\.sourceforge\.net \ (durus|quixote)-users@mems-exchange\.org pysqlite@lists\.initd\.org \ .*@googlegroups\.com mlug@unixcenter\.ru @@ -181,7 +183,6 @@ folder-hook .* "\ my_hdr From: Oleg Broytman ; \ my_hdr Reply-To: Oleg Broytman ; \ my_hdr X-Url: http://phdru.name/; \ - set attribution='On %d, %f wrote:'; \ set record==sent-mail; \ set signature==signatures/phd@phdru.name" @@ -239,33 +240,31 @@ send-hook .* "\ my_hdr From: Oleg Broytman ; \ my_hdr Reply-To: Oleg Broytman ; \ my_hdr X-Url: http://phdru.name/; \ - set attribution='On %d, %f wrote:'; \ set signature==signatures/phd@phdru.name" send-hook "~L '@.*\.(r|s)u$'" "\ my_hdr From: ïÌÅÇ âÒÏÊÔÍÁÎ ; \ my_hdr Reply-To: ïÌÅÇ âÒÏÊÔÍÁÎ ; \ - set attribution='÷ %{%a, %d %b %Y × %I:%M:%S%p %Z} %f ÎÁÐÉÓÁÌ:'; \ - set signature==signatures/phd@phdru.name-ru" + set signature='iconv -f koi8-r ~/mail/signatures/phd@phdru.name-ru|'" send-hook "~L '@(mail|list|inbox|bk)\.ru'" "\ my_hdr From: ïÌÅÇ âÒÏÊÔÍÁÎ ; \ my_hdr Reply-To: ïÌÅÇ âÒÏÊÔÍÁÎ ; \ my_hdr X-Url: http://my.mail.ru/mail/phd; \ - set signature==signatures/phd@mail.ru" + set signature='iconv -f koi8-r ~/mail/signatures/phd@mail.ru|'" send-hook "~L '(@|\.)(((ya|yandex|narod)\.ru)|(yandex\.com)|yandex-team\.ru)$'" "\ my_hdr From: ïÌÅÇ âÒÏÊÔÍÁÎ ; \ my_hdr Reply-To: ïÌÅÇ âÒÏÊÔÍÁÎ ; \ my_hdr X-Url: http://phd2.ya.ru/; \ - set signature==signatures/phd2@yandex.ru" + set signature='iconv -f koi8-r ~/mail/signatures/phd2@yandex.ru|'" send-hook ~u unmy_hdr Reply-To send-hook "~L python-announce-list@python\.org" "\ set followup_to=no; \ - my_hdr Reply-To: python-list@python.org; \ - my_hdr Mail-Followup-To: phd@phdru.name, python-list@python.org" + my_hdr Reply-To: Oleg Broytman ; \ + my_hdr Mail-Followup-To: Oleg Broytman , Python Mailing List " # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # @@ -284,36 +283,83 @@ bind index,pager S decode-save # Macros # -# Go to the first folder with unread messages -macro index C c\n -macro pager C qc\n - -# Move current message to inbox -macro index,pager S s!\n - -macro index,pager h ":auto_view text/html\n" -macro index,pager H ":unauto_view text/html\n" - -# Pipe spam -#macro index,pager z |"sa-learn --no-sync --ham\n" -#macro index,pager Z |"sa-learn --no-sync --spam\n" -macro index,pager s "q"|"spamassassin -d | ~/mail/bin/spamcop.py\nj" -macro index,pager z "q:set editor='vim -s ~/mail/misc/spamcop.vim'\nr:set editor=vim.sh\nqn" - -# Go to main mailbox -macro index H c!\n -macro pager H qc!\n +macro index C \ + \ + "Go to the first folder with unread messages" +macro pager C \ + \ + "Go to the first folder with unread messages" + +macro index,pager S \ + ! \ + "Move current message to inbox" + +macro index,pager h \ + ":auto_view text/html" \ + "View HTML attachments" +macro index,pager H \ + ":unauto_view text/html" \ + "Don't show HTML attachments" + +macro index s \ + "spamassassin -d | ~/mail/bin/spamcop.py" \ + "Send spam to SpamCop" +macro pager s \ + "spamassassin -d | ~/mail/bin/spamcop.py" \ + "Send spam to SpamCop" +macro index z \ + ":set editor='vim -s ~/mail/misc/spamcop.vim':set editor=vim.shn" \ + "Process message from SpamCop" +macro pager z \ + ":set editor='vim -s ~/mail/misc/spamcop.vim':set editor=vim.shn" \ + "Process message from SpamCop" + +macro index H \ + ! \ + "Go to inbox" +macro pager H \ + ! \ + "Go to inbox" +macro index M \ + =sent-mail \ + "Go to sent-mail" +macro pager M \ + =sent-mail \ + "Go to sent-mail" # Go to python mailbox -macro index Y c=lists/python\n -macro pager Y qc=lists/python\n +macro index Y \ + =lists/python \ + "Go to python" +macro pager Y \ + =lists/python \ + "Go to python" + +# Go to STCnet "Atlas"/STM mailboxes +macro index A \ + =stcnet \ + "Go to stcnet inbox" +macro pager A \ + =stcnet \ + "Go to stcnet inbox" +macro index a \ + =sent-stcnet \ + "Go to sent-stcnet" +macro pager a \ + =sent-stcnet \ + "Go to sent-stcnet" # Recode base64 to 8bit, html to plain text, mustdie-1251 to koi8-r, etc. -macro index,pager M "|mimedecode.py | less\n" -macro index,pager E ":set editor=mimedecode.sh\ne:set editor=vim.sh\n" - -# Convert X-Face header to an image and display it -macro index,pager f |"~/mail/bin/view-x-face\n" +macro index,pager \ + m "mimedecode.py | less" \ + "View MIME-decoded message" +macro index,pager E \ + ":set editor=mimedecode.sh:set editor=vim.sh" \ + "MIME-decode and save" + +macro index,pager f \ + ~/mail/bin/view-x-face \ + "Convert X-Face header to an image and display it" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #