# ~~~~~~~~~~~~~~~~~~~~~~~ # smashor's mutt config # ~~~~~~~~~~~~~~~~~~~~~~~ # ++++++++++++++++++++++++++++++++++++++++ # # you wanna understand this? # # read this http://www.mutt.org/doc/manual # # ++++++++++++++++++++++++++++++++++++++++ # reset all # reset all variables to system defaults. unhook * # remove all hooks # +++++++++++++++++++++++++++++++++++ # # let's begin with the most important # # thing: the COLORS ! ;-) # # +++++++++++++++++++++++++++++++++++ # # color object foreground background [ regexp ] # # object can be one out of: # attachment, body, bold, error, header, hdrdefault, index, indicator, markers, message, normal, quoted, quoted1, quotedN, search, signature, status, tile, tree, underline # # colors (foreground color can use bright as in brightred): # white, black, green, magenta, blue, cyan, yellow, red, default, colorx # color normal green default color indicator brightgreen default mono indicator bold color status brightyellow black mono status bold color error brightred black mono error bold color hdrdefault blue default color header blue default "^from:" color header blue default "^to:" color header brightblue default "^subject:" color header blue default "^list-id:" color message white default color body brightwhite default "[-a-z_0-9.]+@[-a-z_0-9.]+" mono body bold "[-a-z_0-9.]+@[-a-z_0-9.]+" color body green default "^Good signature" mono body bold "^Good signature" color body brightgreen default "^Bad signature from.*" mono body bold "^Bad signature from.*" color signature brightred default color quoted yellow default color quoted1 magenta default color tree brightblue default color tilde black default color attachment brightblue default # ++++++++++++++++++++++++ # # settings relating to the # # sending procedure # # ++++++++++++++++++++++++ # # MTA settings set sendmail="/usr/bin/msmtp -a rz --syslog=on" set from="wudmx@web.de" set realname="Andreas Leppert" # ++++++++++++++++ # # general settings # # ++++++++++++++++ # set mbox_type=Maildir # one out of MH, mbox, Maildir, MMDF set folder=~/.maildir set spoolfile=~/.maildir/INBOX #set folder=imaps://andi@webmediasolutions.de # + and = will be substituted by this value #set spoolfile=imaps://andi@webmediasolutions.de #set record=~/.maildir/.sent-msgs/ #set record="imaps://andi@webmediasolutions.de/INBOX.sent-mail" # keep copy of sent msgs in this mailbox set record="~/.maildir/INBOX.sent-mail" set copy=ask-yes #set postponed="imaps://andi@webmediasolutions.de/INBOX.postponed" # unsent msgs are here set postponed="~/.maildir/INBOX.postponed" set maildir_trash=no # deleted msgs move to this maildir set mbox=+INBOX set read_only=no # mailboxes in ro-mode set quit=ask-yes # shall i really quit? set move=ask-yes # don't ask if msgs go to mailbox set confirmappend=yes # asks whether append msg to mailbox set confirmcreate=yes # asks if mbox shall be created when saving to non-existing mbox set delete=ask-yes # really delete msgs? set check_new=yes # check if new msgs available set mail_check=90 # look every 10 seconds for new msgs set timeout=15 # number of seconds mutt waits when no key is pressed until it is checked for new mails set mark_old=yes # old unread msgs have an 'O' set mailcap_path="~/.mailcap" # path to file containing MIME information auto_view text/html set help=yes # show help information set beep=yes # beep on error set beep_new=yes # beep on new msg # ++++++++++++++++ # # display settings # # ++++++++++++++++ # set alias_format="%4n %2f %t %-20a %r" set attach_format="%u%D%I %t%4n %T%.40d%> [%.7m/%.10M, %.6e%?C?, %C?, %s] " set compose_format="-- Mutt: Compose [Approx. msg size: %l Atts: %a]%>-" set date_format="!%a, %b %d, %Y at %I:%M:%S%p %Z" set folder_format="%2C %t %8s %d %N %f" set forward_format="[%a: %s]" set index_format="%4C [%-4Z] %-12[%b%d %H:%M] (%5c) %-30.25n %s" set pager_format="" set status_format=" %r %b %f %n Del %d Msgs %m %l %> (%P)" set sort=threads # sorting mails in threads set sort_browser=alpha # sorting in file browser in alpha order set sort_alias=alias # sorting of aliases set status_on_top # status bar on top set allow_ansi=no # ansi tags are dismissed set ascii_chars=yes # use ASC chars and not ascii chars set collapse_unread=no # dont collapse thread when there's new msg set digest_collapse=yes # dont show subparts of msg, use 'v' set pager_context=1 set pager_index_lines=12 set menu_scroll set menu_context=5 set pager_context=5 set markers=yes set charset="utf-8" # ++++++++++++++++ # # compose settings # # ++++++++++++++++ # set editor="vim" # editor of your choice set indent_string="> " # quote string set to_chars=" +TCF" set sig_dashes=yes # two dashes before signature set signature="~/.maildir/.signature" # my signature set alias_file="~/.maildir/.aliases" # path to alias file set autoedit=no # first print send menu set fast_reply=no # first print send menu set abort_nosubject=ask-yes # shall i continue when no subject exists? set abort_unmodified=ask-yes # shall i abort msg if unmodified? set askcc=yes # asks for CC before editing msg set askbcc=yes # asks for BCC before editing msg set include=ask-yes # include msg in reply msg set edit_headers=yes # allows you to edit the headers set attribution="On %d, %n wrote:" # line before old msg in reply set postpone=ask-yes # unsent msgs to postpone directory set ispell="aspell -l de -e -c" # ++++++++++++ # # send setting # # ++++++++++++ # set allow_8bit=yes # 8Bit data is converted to 7Bit data set hostname="" # part of address after the @ set use_domain=yes # if no domain part, use hostname set use_from=yes # use From header set use_envelope_from=yes set user_agent=yes # print mutt header set fcc_attach=yes # add attachments to body of msg set fcc_clear=no # always encrypt attachment when msg is encrypted set forward_quote=no # forward msg wont be quoted set crypt_verify_sig=no ignore * unignore Date To From Subject X-Mailer Organization User-Agent List-ID hdr_order Date From To Subject List-ID X-Mailer User-Agent Organization # +++++++++++ # # keybindings # # +++++++++++ # # i want nice shortcuts # look at the reference # bind map key function # map: generic alias attach browse editor index compose pager pgp postpone # key: key or keybindings, control-a is \Ca; # key: \t, , \r, \n, \e (escape), , , , , , , , # key: , , , , , , , , , # function: function name or noop which unbinds the key bind pager h display-toggle-weed bind index next-entry bind index previous-entry bind pager . next-line bind pager , previous-line bind pager \Cd next-page bind pager \Cu previous-page bind pager next-entry bind pager previous-entry # ++++++++++++++++++ # # what about macros? # # ++++++++++++++++++ # # address book macro generic \ea "!abook\n" macro index \ea "!abook\n" macro pager \ea "!abook\n" # edit .muttrc macro generic \ev "!vim ~/.muttrc\n" macro index \ev "!vim ~/.muttrc\n" macro pager \ev "!vim ~/.muttrc\n" # fetch mail from IMAP server / POP servers macro index G "!offlineimap -l ~/.offlineimaplog; fetchmail -a\r" macro pager G "!offlineimap -l ~/.offlineimaplog; fetchmail -a\r" # synchronise with server on quit macro index q "!offlineimap -l ~/.offlineimaplog\r" macro index Q "" #macro pager q "!offlineimap -l ~/.offlineimaplog\r" # send mail over RZ if on campus, else use web.de #macro generic ":my_hdr From: tux@tux.tld:set sendmail='/usr/local/bin/msmtp -a tux'" #macro generic ":my_hdr From: tf@test.tld:set sendmail='/usr/local/bin/msmtp -a test'" macro generic ":set sendmail='/usr/bin/msmtp -a web --syslog=on'" macro generic ":set sendmail='/usr/bin/msmtp -a rz --syslog=on'" #macro pager l "links2 -force-html -dump" #macro attach l "links2 -force-html -dump" #macro index \cb |urlview\n 'call urlview to extract URLs out of a message' #macro pager \cb |urlview\n 'call urlview to extract URLs out of a message' #macro generic \cj "!xterm -e nano $HOME/.muttrc\r" #macro generic "1" ":set from=wudmx@web.de" #macro generic "2" ":set from=andi@webmediasolutions.de" # +++++++ # # aliases # # +++++++ # source ~/.maildir/.aliases # +++++++++++++ # # mailing lists # # +++++++++++++ # unlists * unsubscribe * lists gentoo-gwn \ power@bughost.org \ bugtraq@securityfocus.com \ focus-linux@securityfocus.com \ security-basics@securityfocus.com \ webappsec@securityfocus.com \ xmonad@haskell.org \ kernelnewbies@nl.linux.org \ vim_announce@googlegroups.com \ vim_use@googlegroups.com \ vim_multibyte@googlegroups.com \ linux-utf8@nl.linux.org subscribe gentoo-gwn \ power@bughost.org \ bugtraq@securityfocus.com \ focus-linux@securityfocus.com \ security-basics@securityfocus.com \ webappsec@securityfocus.com \ xmonad@haskell.org \ kernelnewbies@nl.linux.org \ vim_announce@googlegroups.com \ vim_use@googlegroups.com \ vim_multibyte@googlegroups.com \ linux-utf8@nl.linux.org # ++++++++++++++ # # gnupg settings # # ++++++++++++++ # 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 0x4845F397 -- -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 0x4845F397 -- -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 crypt_autosign=yes set pgp_sign_as=0x4845F397 set crypt_replyencrypt=yes set pgp_timeout=1800 set pgp_good_sign="^gpg: Good signature from" # muttprint configuration TODO set print_command="muttprint" #set print="yes" set print_split set print_decode=yes # decode msg before printing macro index p " " macro pager p " " #TODO #charset-hook US-ASCII utf-8 #charset-hook x-unknown utf-8 #iconv-hook ISO-8859-1 utf-8 #iconv-hook ISO-8859-15 utf-8 #iconv-hook US-ASCII utf-8 #iconv-hook unknown utf-8 # +++++ # # hooks # # +++++ # # managing my different email-accounts # when mail is sent to wudmx@web.de via To: or CC:, set from and realname to the appropriate values! message-hook '~C wudmx@web.de' 'set from="wudmx@web.de"' message-hook '~C wudmx@web.de' 'set realname="Andreas Leppert"' message-hook '~C webmaster@wudmx-home.de' 'set from="webmaster@wudmx-home.de"' message-hook '~C webmaster@wudmx-home.de' 'set realname="Andreas Leppert"' message-hook '~C andi@webmediasolutions.de' 'set from="andi@webmediasolutions.de"' message-hook '~C andi@webmediasolutions.de' 'set realname="Andreas Leppert"' message-hook '~C andileppert@t-online.de' 'set from="andileppert@t-online.de"' message-hook '~C andileppert@t-online.de' 'set realname="Andreas Leppert"' message-hook '~C uobdq@stud.uni-karlsruhe.de' 'set from="uobdq@stud.uni-karlsruhe.de"' message-hook '~C uobdq@stud.uni-karlsruhe.de' 'set realname="Andreas Leppert"' message-hook '~C s_aleppe@ira.uka.de' 'set from="s_aleppe@ira.uka.de"' message-hook '~C s_aleppe@ira.uka.de' 'set realname="Andreas Leppert"' # if you have several accounts, you can use these lines to make it more convenient account-hook . 'unset imap_user; unset imap_pass; unset tunnel' account-hook imaps://andi@webmediasolutions.de/ 'set imap_user=andi imap_pass=hgqfxo' # store mails using save command into the appropriate remote IMAP folder #save-hook wudmx@web.de$ imaps://andi@webmediasolutions.de/INBOX #save-hook root@webmediasolutions.de$ imaps://andi@webmediasolutions.de/INBOX.WMS.ROOTMAIL #save-hook '~h List-Id.*xmonad\.haskell\.org' imaps://andi@webmediasolutions.de/INBOX.lists.xmonad #save-hook '~h List-Id.*webappsec.list-id.securityfocus.com' imaps://andi@webmediasolutions.de/INBOX.lists.secfoc-webappsec #save-hook '~h List-Id.*security-basics.list-id.securityfocus.com' imaps://andi@webmediasolutions.de/INBOX.lists.secfoc-sec-basics #save-hook '~h List-Id.*focus-linux.list-id.securityfocus.com' imaps://andi@webmediasolutions.de/INBOX.lists.secfoc-focus-linux # only important for mailboxes with lots of mails # splits the big folder into smaller ones on a year or month-year base mbox-hook gentoo-gwn$ =INBOX.lists.gentoo-gwn.`date +%Y` mbox-hook kernelnewbies$ =INBOX.lists.kernelnewbies.`date +%Y-%m` mbox-hook linuxpowertop$ =INBOX.lists.linuxpowertop.`date +%Y-%m` mbox-hook mutt-users$ =INBOX.lists.mutt-users.`date +%Y-%m` mbox-hook secfoc-focus-linux$ =INBOX.lists.secfoc-focus-linux.`date +%Y` mbox-hook secfoc-sec-basics$ =INBOX.lists.secfoc-sec-basics.`date +%Y-%m` mbox-hook vim_use$ =INBOX.lists.vim_use.`date +%Y-%m` mbox-hook xmonad$ =INBOX.lists.xmonad.`date +%Y-%m` mbox-hook ebay$ =INBOX.private.ebay.`date +%Y` mbox-hook paypal$ =INBOX.private.paypal.`date +%Y` # +++++++++ # # mailboxes # # +++++++++ # mailboxes =INBOX \ =INBOX.lists.gentoo-gwn \ =INBOX.lists.kernelnewbies \ =INBOX.lists.linux-utf8 \ =INBOX.lists.linuxpowertop \ =INBOX.lists.mutt-announce \ =INBOX.lists.mutt-users \ =INBOX.lists.secfoc-bugtraq \ =INBOX.lists.secfoc-focus-linux \ =INBOX.lists.secfoc-sec-basics \ =INBOX.lists.secfoc-webappsec \ =INBOX.lists.vim_use \ =INBOX.lists.vim_announce \ =INBOX.lists.vim_multibyte \ =INBOX.lists.xmonad \ =INBOX.private.ebay \ =INBOX.private.fun \ =INBOX.private.paypal \ =INBOX.private.register \ =INBOX.private.todo \ =INBOX.sent-mail \ =INBOX.university \ =INBOX.university.clusterpraktikum \ =INBOX.university.ksn # +++++++ # # mutt-ng # # +++++++ # set sidebar_visible="yes" set sidebar_width=40 set sidebar_delim=" | " color sidebar_new yellow default bind index \Cp sidebar-prev bind index \Cn sidebar-next bind index \Co sidebar-open bind pager \Cp sidebar-prev bind pager \Cn sidebar-next bind pager \Co sidebar-open # I don't need these. just for documentation purposes. See below. # bind index \Ck sidebar-scroll-up # bind index \Cj sidebar-scroll-down # bind pager \Ck sidebar-scroll-up # bind pager \Cj sidebar-scroll-down macro index B ':toggle sidebar_visible' macro pager B ':toggle sidebar_visible' # perhaps this is a better binding since I almost never use bounce-message # b toggles sidebar visibility # macro index b 'toggle sidebar_visible' # macro pager b 'toggle sidebar_visible' # # Remap bounce-message function to "B" # bind index B bounce-message # ++++++++++++ # # nice to have # # ++++++++++++ # # Naja, anyway, ich mache regen Einsatz von display-filtern, damit laesst sich prima Werbung ausblenden. # # zB fuer Heisec-Newsletter: # folder-hook . set display_filter="" # folder-hook heisec set display_filter="~/.mutt/heisecfilter.sed" # # Und der Filter: # # #!/usr/bin/sed -f # / \//,/^heise Security News/d # /--Anzeige--/,/------/d # /\*\*\*\*\* heise/,//d # /\*\*\*\*\* CeBIT-Special/,//d # /Impressum/,//d # /IT-Anbieterverzeichnis auf heise online/,//d # /Veranstaltungskalender bei iX/,//d # /./,/^$/!d # # ============================================ # # # # # NNTP (only with NNTP-Patch from # # http://www.fiction.net/blong/programs/mutt/#nntp # # and compiled with --enable-nntp) # # # #set nntp_inews="/usr/bin/inews -h" # inews Binary # #set nntp_user="" # NNTP user # #set nntp_pass="" # NNTP password # #set nntp_newsrc=~/.tin/.newsrc.mutt # .newsrc location # #set nntp_context=10000 # Number of messages to read in a newsgroup. # ##server-hook # # # # # NNTP (with patch from "Andrej N. Gritsenko" ) # # # #set catchup_newsgroup=ask-yes # catchup articles when leaving newsgroup # #set group_index_format="%4C %M%N %5s %-35.35f %d" # # # newsgroup browser format # #reset inews # inews command with headers (use default!) # #set mime_subject # Use MIME-Quoted-Printable in news headers # #set news_cache_dir=~/.mutt/news-cache # Cache files # #set news_server=luv.does-not-exist.org # News server (defaults to $NNTPSERVER) # #set newsrc=~/.tin/.newsrc.mutt # newsrc file # #set nntp_attempts=10 # number of attempts to connect to NNTP server # #set nntp_context=100 # number of articles in entered newsgroup # #set nntp_load_description # load newsgroup descriptions # #set nntp_user="" # NNTP username # #set nntp_pass="" # NNTP password # #set nntp_poll=30 # time (in seconds) to check for new news # #set post_moderated=ask-yes # Post articles to moderated newsgroups? # #set reconnect_news=ask-yes # reconnect when nntp connection was lost? # #unset save_unsubscribed # save info about unsubscr. groups in newsrc? # #set show_new_news # ask for new newsgroups when entering server? # #unset x_comment_to # add X-Comment-To: Realname? # ##server-hook [!]regexp command