#extends phd_pp_ru #implements respond #attr $Title = ".muttrc" #attr $Copyright = 2003 #attr $Prev = "mime.types.html" #attr $Next = "procmailrc.html" #attr $alternates = (("text/plain", "Plain text version", "muttrc"),) #def body_html #raw
#
# User configuration file for Mutt
#
# Text version here
#
# Generated by gvim :runtime syntax/2html.vim
#
#
# User configuration file for Mutt
#

set hostname=phd.pp.ru

my_hdr From: Oleg Broytman <phd@phd.pp.ru>
my_hdr Reply-To: Oleg Broytman <phd@phd.pp.ru>
my_hdr X-Attribution: Oleg
my_hdr X-Url: http://phd.pp.ru/
my_hdr X-Operating-System: Debian GNU/Linux

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<O7^\"hul]^|AGtiI7SkYF-2VD?UH*h_!zuCIf+^F7\n\
 c0x8?W,UfhCAx^YY\#1ALhvG\\2yG}LW:)zw\#1\;Yajq\"hK~S

# Note: $folder should be set _before_ any other path vars where `+' or `='
# is used because paths are expanded when parsed
#
#set folder=~/Mail                # where I keep my mailboxes; I am happy with this default

# source aliases
source =mutt/aliases

# All my addresses
alternates `awk '{s=s"|"$0} END {print substr(s,2)}' $HOME/mail/misc/.myemail` # All my addresses

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Mailboxes to watch for new mail
#
#       mailboxes <path1> [ <path2> ... ]
#

mailboxes ! =admin =block =bulk =spam `echo $HOME/mail/lists/* | sed s#$HOME/mail/#=#g`

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Identify mailing lists I subscribe to
#
#       lists <list-name> [ <list-name> ... ]

lists python-announce-list@python.org zope-announce@zope.org

subscribe python-list@python.org python-dev@python.org python-ideas@python.org \
   email-sig@python.org zope@zope.org zopyrus@itconnection.ru \
   quixote-users@mems-exchange.org durus-users@mems-exchange.org \
   sqlobject-discuss@lists.sourceforge.net pysqlite@lists.initd.org

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Settings
#

# 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 set for mail without a charset
set send_charset="us-ascii:iso-8859-1:koi8-r:windows-1251:utf-8" # character set 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

set sort=mailbox-order           # primary sorting method
#set sort=threads                 # sort by threads,...
set sort_aux=date                # ...then by date

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 save_history=1000            # number of lines of history in file

set read_inc=10                  # Progress indicator when reading folders.
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 ascii_chars                  # use ASCII instead of ACS chars for threads
set autoedit                     # Start editor immediately
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
#set arrow_cursor                 # Draw a simple cursor on slow terminals
set fast_reply                   # skip initial prompts when replying if no autoedit
set forward_format="[Fwd: %s]"    # subject to use when forwarding messages
set help                         # show the help lines
set ignore_list_reply_to         # Ignore Reply-To headers pointing to mailing lists.
set include=yes                  # Always include a copy when replying.
#set indent_string="%v> "         # how to quote replied text
set locale=C                     # locale to format dates
set mail_check=30                # how often (in seconds) to poll for new mail
set mark_old=no                  # Distinguish between seen (but unread) and new messages
set mask=""                      # Show dot-files in the file browser
set menu_scroll                  # no implicit next-page/prev-page
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 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
set rfc2047_parameters           # Sometimes, I get mails which use a bogus encoding for MIME parameters. Setting this shouldn't harm.
set sendmail_wait=5              # Wait 5 seconds before putting sendmail to the background.
set sig_dashes=no                # Do not add "-- " before my sig - I already have it there
set status_on_top                # I prefer the status bar on top
set suspend=no                   # Do not suspend on Ctrl+Z
set tilde                        # Indicate empty lines in the pager.
set tmpdir=~/tmp                 # Temporary files aren't stored in public places.
set use_domain=no                # don't qualify local addresses with $domain
set use_ipv6=no                  # Speed up DNS
set wait_key=no                  # Do not wait for a key after running external programs, pipes

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# MIME settings
#

alternative_order text/enriched text/plain text

#auto_view text/html
#auto_view application/ms-tnef text/x-vcard
#auto_view application/x-gzip application/x-gunzip
#auto_view application/rtf
#set implicit_autoview # use copiousoutput filters from mailcap for all types of attachments

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Header fields I don't normally want to see
#
ignore *                         # this means "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 \
   newsgroups subject user-agent x-mailer x-url x-face

# default list of header fields to weed when displaying
#
#ignore "from " received content- mime-version status x-status message-id
#ignore sender references return-path lines

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Specify the order of the headers to appear when displaying a message
#
#       hdr_order <hdr1> [ <hdr2> ... ]
#

hdr_order date from to x-original-to reply-to mail-followup-to cc \
   newsgroups subject user-agent x-mailer x-url x-face

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Change settings based on mailbox
#
#       folder-hook [!]<regexp> <command>
#
# <command> is executed when opening a mailbox matching <pattern>

# Restore defaults
folder-hook .* "set hostname=phd.pp.ru; \
   my_hdr From: Oleg Broytman <phd@phd.pp.ru>; \
   my_hdr Reply-To: Oleg Broytman <phd@phd.pp.ru>; \
   my_hdr X-Url: http://phd.pp.ru/; \
   set signature=~/.signature; \
   set record==sent-mail"

folder-hook =lists/zope set signature==signatures/zope

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Multiple spool mailboxes
#
#       mbox-hook [!]<pattern> <mbox-mailbox>
#
# Read mail in <pattern> is moved to <mbox-mailbox> when <pattern> is
# closed.

#mbox-hook =mutt-users.in =mutt-users
#mbox-hook +TEST +inbox

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Specify default filename when saving messages
#
#       save-hook [!]<pattern> <mailbox>
#
# <mailbox> is provided as default when saving messages from <pattern>

#save-hook mutt- =mutt-mail
#save-hook aol\.com +spam

save-hook .* =inbox

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Specify where to save composed messages
#
#       fcc-hook [!]<pattern> <mailbox>
#
# <pattern> is recipient(s), <mailbox> is where to save a copy

#fcc-hook joe +joe
#fcc-hook bob +bob

#fcc-hook .* +sent

fcc-hook .* =sent-mail

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Change settings based upon message recipient
#
#       send-hook [!]<pattern> <command>
#
# <command> is executed when sending mail to an address matching <pattern>

#send-hook mutt- 'set signature=~/.sigmutt; my_hdr From: Mutt User <user@example.com>'

send-hook "~L '@(mail|list|inbox|bk)\.ru'" "\
   my_hdr From: Oleg Broytman <phd@mail.ru>; \
   my_hdr Reply-To: Oleg Broytman <phd@mail.ru>; \
   set signature==signatures/mail.ru"

send-hook "~L python-announce-list@python\.org" "my_hdr Reply-To: python-list@python.org"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Key bindings
#

# change Up/Down for pager
bind pager <Up> previous-line
bind pager <Down> next-line

bind index <Esc>c copy-message
bind pager <Esc>c copy-message

bind index <Esc>S decode-save
bind pager <Esc>S decode-save

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Macros
#

# Go to the first folder with unread messages
macro index C <Home>c\n
macro pager C q<Home>c\n

# Move current message to inbox
macro index S s!\n
macro pager S s!\n

# Pipe spam
macro index z |"sa-learn --no-sync --ham\n"
macro pager z |"sa-learn --no-sync --ham\n"

macro index Z |"sa-learn --no-sync --spam\n"
macro pager Z |"sa-learn --no-sync --spam\n"

macro index <Esc>s |"spamassassin -d | ~/mail/bin/spamcop.py\nj"
macro pager <Esc>s |"spamassassin -d | ~/mail/bin/spamcop.py\nj"

macro index <Esc>z ":set editor='vim -s ~/mail/misc/spamcop.vim'\nr:set editor=vim.sh\nqnN"
macro pager <Esc>z ":set editor='vim -s ~/mail/misc/spamcop.vim'\nr:set editor=vim.sh\nqn"

# Go to main mailbox
macro index H <Home>c!\n
macro pager H q<Home>c!\n

# Go to python mailbox
macro index Y <Home>c=lists/python\n
macro pager Y q<Home>c=lists/python\n

# Recode base64 to 8bit, html to plain text, mustdie-1251 to koi8-r, etc.
macro index M "|mimedecode.py | less\n"
macro pager M "|mimedecode.py | less\n"

macro index E ":set editor=mimedecode.sh\ne:set editor=vim.sh\n"
macro pager E ":set editor=mimedecode.sh\ne:set editor=vim.sh\n"

# Convert X-Face header to an image and display it
macro index <Esc>f |"~/mail/bin/view-x-face\n"
macro pager <Esc>f |"~/mail/bin/view-x-face\n"

# Delete messages from me and for medap-lis list
macro index <Esc>D "D~P\nD~C medap-lis\n"
macro pager <Esc>D "D~P\nD~C medap-lis\n"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Colors
#
# This is for an xterm with with grayish background

#     object      foreground     background regexp/pattern

color normal      default        default
color hdrdefault  black          default

color header      magenta        default ^(date|x-mailer|user-agent|x-operating-system):
color header      blue           default ^(from|to|cc|reply-to|mail-followup-to):
color header      brightblack    default ^(subject):

color quoted      blue           default
color quoted1     magenta        default
color quoted2     red            default
color quoted3     green          default
color quoted4     cyan           default
color quoted5     blue           default
color quoted6     magenta        default
color quoted7     red            default
color quoted8     green          default
color quoted9     cyan           default
color quoted10    blue           default

color attachment  white          green
color error       brightred      default
color index       brightblack    default ~N
color indicator   black          cyan
color message     blue           default
color search      black          yellow
color signature   magenta        default
color status      white          blue
color underline   blue           default

color markers     brightblue     default
color tilde       blue           default
color tree        blue           default

# email
color body        brightblue     default [-a-Z_0-9.+]+@[-a-Z_0-9.]+

# URLs
color body        brightblue     default "(((https?|ftp|gopher|telnet)://|(mailto|file|news|about|ed2k|irc|sip|magnet):)[^' \t<>\"]+)[A-Za-z0-9/]"

# Smilies (emoticons)
color body        brightmagenta  default " [;:]-*[dp(){}<>|\\/]| [(){}<>|\\/]-*[;:]" # :-)

# attributes when using a mono terminal
mono header underline ^Subject:
mono quoted bold
#end raw #end def $phd_pp_ru.respond(self)