# Mutt config for Sven Arvidsson # RTFM at http://www.mutt.org/doc/manual/ # get realname from /etc/passwd reset realname # my alias file source ~/.mail_aliases set alias_file=~/.mail_aliases set use_from set from="sa@whiz.se" # set from to same adress the mail was sent to set reverse_name=yes alternates "(sa@64bits.se\|news@64bits.se)" set mbox_type=Maildir set mbox=~/mail/inbox/ set spoolfile=~/mail/inbox/ set postponed=~/mail/drafts set folder=~/mail/ # edit the headers from emacs set edit_headers = yes # call script to cut away sig set editor='$HOME/Software/bin/killsig %s; emacs %s -nw -f text-mode' set editor='$HOME/Software/bin/killsig %s; emacs %s -nw -f mail-mode' set askcc=yes set askbcc=no # use muttprint for printing set print_command="muttprint" # look for new mail here mailboxes /home/sa/mail/root mailboxes /home/sa/mail/inbox mailboxes /home/sa/mail/64bits mailboxes `for file in ~/mail/lists/*; do echo -n "~/mail/lists/$(basename $file) "; done` # manage my mailing lists # remove old entries first unsubscribe * subscribe `cd ~/mail/lists && echo *` unlists * lists `cd ~/mail/lists && echo *` # skip prompt for recipient and subject when replying set fast_reply=yes # use header cache set header_cache=/home/sa/.hcache # always quote set include=yes # put copy of sent mails in sent # if sent from inbox, put them there # if sent from no mailbox at all, put in inbox set record=~/mail/inbox/ folder-hook . set record=~/mail/sent/ folder-hook inbox set record=~/mail/inbox/ # always keep copies of own e-mails set copy # when to check for new e-mail set mail_check=10 # ~/.signature set signature # collapse read threads folder-hook . exec collapse-all # do not collapse thread with unread mail unset collapse_unread # not sure about this set allow_8bit # don't jump to next message at end of message. set pager_stop # sorting by threads by default folder-hook . set sort=threads # showing maildir list default to newest first set sort_browser=reverse-date # showing threads with youngest message last set sort_aux=last-date-received set pager_index_lines=15 # nice window titles set xterm_set_titles=yes set xterm_icon="Mutt with %?m?%m messages&no messages?%?n? [%n NEW]?" # charsets for outgoing messages. set send_charset="iso-8859-1:utf-8" # standard charset set charset=utf-8 # work around broken mailers # (e.g. sends iso-8859-1 as us-ascii) unset strict_mime set assumed_charset="iso-8859-1" # while reading mbox, count message every X set read_inc=10 # don't put '+' at the beginning of wrapped lines set markers=no # pgp/gpg stuff set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f" set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f" set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f" set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f" set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f" set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0x760BDD22 -- -r %r -- %f" set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0x760BDD22 -- -r %r -- %f" set pgp_import_command="gpg --no-verbose --import -v %f" set pgp_export_command="gpg --no-verbose --export --armor %r" set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r" set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r" set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r" set pgp_autosign=yes # my key id set pgp_sign_as=0x760BDD22 # save copy of encrypted message for me set pgp_replyencrypt=yes # save passphrase for 1800 seconds set pgp_timeout=1800 set pgp_good_sign="^gpg: Good signature from" # work around broken enigmail behaviour message-hook '!(~g|~G) ~b"^-----BEGIN\ PGP\ (SIGNED\ )?MESSAGE"' "exec check-traditional-pgp" # mark all read (shift+m) macro index M ".*\rN.*\r" "Mark all messages in this mailbox as read" # special commands for pipeing to spamassassin (alt+s) # move message to spam folder and delete from inbox macro index \es "unset wait_key\nsa-learn --single --spam\nset wait_key\n=spam\n\nset wait_key\n" "SPAM" macro pager \es "unset wait_key\nsa-learn --single --spam\nset wait_key\n=spam\n\nset wait_key\n" "SPAM" #macro index \es "unset wait_key\nsa-learn --single --spam\nset wait_key\n" #macro pager \es "unset wait_key\nsa-learn --single --spam\nset wait_key\n" # call fetchmail from Mutt (shift+g) macro pager G "unset wait_key\nfetchmail\nset wait_key\n" "Restart fetchmail" macro index G "unset wait_key\nfetchmail\nset wait_key\n" "Restart fetchmail" # quickly jump to inbox macro index I "c!\n" "Go to Inbox" macro pager I "c!\n" "Go to Inbox" # disable x from closing mutt without saving bind index x noop # one hand movement keys bind pager exit bind pager view-attachments bind attach exit bind attach view-attach bind index display-message macro index "c?" bind browser select-entry bind browser exit # nuke all headers first, allow normal headers, allow special headers ignore * unignore from: date subject to cc reply-to bcc unignore x-mailing-list: posted-to: # in which order should mutt show its headers? hdr_order From To Cc Bcc Subject Date User-Agent # color definitions # format: # color object foreground background # attachments color attachment black yellow # colorize URLs color body brightblue default "(http|ftp|news|telnet|finger)://[^ ]*" color header yellow default "^cc: " color header white default "^date: " color header white default "^delivery-date: " color header yellow default "^from " color header yellow default "^from: " color header yellow default "^newsgroups: " color header yellow default "^reply-to: " color header brightwhite default "^subject: " color header blue default "^to: " color header yellow default "^x-mailer: " color header yellow default "^message-id:" color header yellow default "^Organization:" color header yellow default "^Organisation:" color header yellow default "^User-Agent:" color indicator white blue # index color markers red default # index color message white blue # index # colorizing the body of messages (i.e. in the pager) color normal white default # pager body # coloring quoted text - coloring only the first four levels: color quoted cyan default # pager body color quoted1 yellow default # pager body color quoted2 red default # pager body color quoted3 green default # pager body color quoted4 cyan default color quoted5 yellow default color quoted6 red default color quoted7 green default color quoted8 cyan default color quoted9 yellow default color signature yellow default # pager body color status white blue # status bar default: black white color tilde blue default # pager body color tree brightmagenta default # index color underline yellow default # color body blue default "<[Gg]>" color body blue default "<[Bb][Gg]>" color index brightgreen default ~N # new color index green default ~O # old unread # mail from myself color index brightwhite default '~f (sa@64bits.se\|sa@whiz.se)' # mail from people in alias file #color index blue default "~f (`cat ~/.mail_aliases | sed -e 's/^.*$/\\|/' | tr -d "\n" | sed -e 's/\\|$//'`)" color index yellow default ~F # Flagged color index blue default ~T # Tagged color index red default ~D # Deleted # better defaults set attribution="%F wrote:" set quote_regexp="^( {0,4}[>|:]| {0,4}[a-z0-9]+[>|]+)+" set reply_regexp="^((re|RE|Re|r e|sv|SV|Sv):[ \t]*)*" set index_format="%4C %Z %{%b %d} %-15.15F (%?l?%4l&%4c?) %s" set pager_format="%S [%C] %F (%l) %s" set forw_format="Fw: %s" set folder_format="%d %8s %50f %N" set status_format="-%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)-(%b)---" # this uses ~/.mailcap to show text/html and other auto_view text/html auto_view application/msword # prefer text, but convert to html otherwise alternative_order text/plain text/html