# This is a Mutt Email Client config file. #Author : Bhaskar Chowdhury #Email: unixbhaskar@gmail.com # Folder hooks folder-hook 'gmail1' 'source ~/.muttrc' folder-hook 'gmail2' 'source ~/.muttrc.gmail2' # Macros for switching accounts macro index 'source ~/.muttrc!' # macro index 'source ~/.muttrc.gmail2!' # Basic settings about presentations source "gpg2 -dq $HOME/.mail.cred.gpg |" set imap_user = "unixbhaskar@gmail.com" set imap_pass =$my_pass set pager_context=1 set pager_index_lines=6 #show a mini-index in pager set menu_scroll set pgp_verify_sig=yes #dont show pgp in pager #set status_on_top #put status line at top set sort=threads #sort by message threads in index set status_format=" %r %b %f %n Del %d Msgs %m %l %> (%P)" set pager_format="%-10.10i %[!%a %b %d %R]" set date_format="!%H:%M %a %d %b %Y" set index_format="%D %Z %[] %-30.30F (%-4.4c) %s %?y? %y?" set folder_format="%2C %t %8s %d %N %f" set text_flowed=yes set mbox_type=Maildir set charset=UTF-8 set maildir_header_cache_verify=no set arrow_cursor = yes set alias_file=~/.mutt/aliases set check_new=yes set pager_stop=yes source $alias_file ignore * unignore ^from: ^date: ^subject: ^to: ^cc: unignore Message-Id #set to your from address set from="unixbhaskar@gmail.com" set realname="Bhaskar Chowdhury" # Few global settings # set record="$home/sent" #sent mail is saved here set delete=yes #delete without prompting set include=yes #quote msg in reply set fast_reply=yes #no prompting on reply set beep=no #no noise set markers=no #no + on wrapped lines set confirmappend=no #no prompt for save to =keep set to_chars=" +TCFL" #no L for mail_list set send_charset="us-ascii:utf-8" set message_id_format="<%z_%f@unixbhaskar-laptop>" # Imaps ,headers, bodies set folder="imaps://imap.gmail.com:993" set spoolfile="+INBOX" set record ="+[Gmail]/Sent Mail" set header_cache=~/.mutt/cache/headers set message_cachedir=~/.mutt/cache/bodies #set mbox=$HOME/mail/received-`date +"%y%m"` #gpg set pgp_sign_as="9F017E9D66B07216543CEBB0B23A9DB7114B2915" set crypt_use_gpgme=yes set crypt_replysign=yes set crypt_replysignencrypted=yes set pgp_timeout=3600 #This is to send mail in the background, but please set the log file for that #sendmail_wait = -1 # GnuPG configuration, not using ,kept for self note #set pgp_decode_command="gpg2 --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" #set pgp_verify_command="gpg2 --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f" #set pgp_decrypt_command="gpg2 --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" #set pgp_sign_command="gpg2 --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f" #set pgp_clearsign_command="gpg2 --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" #set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg2 --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" #set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg2 %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" #set pgp_import_command="gpg2 --no-verbose --import %f" #set pgp_export_command="gpg2 --no-verbose --export --armor %r" #set pgp_verify_key_command="gpg2 --verbose --batch --fingerprint --check-sigs %r" #set pgp_list_pubring_command="gpg2 --no-verbose --batch --quiet --with-colons --list-keys %r" #set pgp_list_secring_command="gpg2 --no-verbose --batch --quiet --with-colons --list-secret-keys %r" #set pgp_good_sign="^\\[GNUPG:\\] GOODSIG" # Mailboxes mailboxes =inbox # mailboxes =sent #mailboxes =Credit_Card mailboxes =Al_Viro mailboxes =Linus mailboxes =Greg(GKH) mailboxes =Andrew_Morton mailboxes =Ted_Tso mailboxes =H_Peter_Anvin mailboxes =Junio_C_Hamano_Git mailboxes =Ingo_Molnar mailboxes =Documents mailboxes =Geek_Stuff mailboxes =linux-kernel # mailboxes =unix_tips mailboxes ="[Gmail]/Sent Mail" mailboxes =Jonathan_Corbet mailboxes =Paul_E_McKenney mailboxes =David_Miller mailboxes =Thomas_Gleixner # Sent backup set mbox=$HOME/.maildir/received-`date +"%y%m"` set record=$HOME/.maildir/sent-`date +"%y%m"` auto_view text/html # Mailcap settings set mailcap_path=~/.mutt/mailcap set smtp_url="smtp://unixbhaskar@smtp.gmail.com:587/" set smtp_pass=$my_pass # # simulate the old url menu 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' # #run fetchmail by hitting key of G macro index G "!fetchmail -a -m 'procmail -d %T'\r" #macro pager G "!fetchmail -a -m 'procmail -d %T'\r" # # default list of header fields to weed out when displaying mail # #ignore them all and then unignore what you want to see # ignore * unignore Date To From: Subject X-Mailer Organization User-Agent hdr_order Date From To Subject X-Mailer User-Agent Organization unignore my_hdr X-URL: https://unixbhaskar.wordpress.com # ##your Mutt has to have some colors # ##these are for four levels of quoted text # ##they override the system settings in /etc/mutt/Muttrc # source /home/bhaskar/.mutt/colors/mutt-colors-solarized-dark-256.muttrc # #color quoted green default color quoted1 magenta black # #color quoted2 yellow default # #color quoted3 red default # #color signature cyan cyan set signature = "$HOME/.mutt/mysig.sig" #How to color individual mail id on index page color index brightcyan default '~f torvalds@linux-foundation.org' color index green default '~f akpm@linux-foundation.org' color index cyan default '~f viro@zeniv.linux.org.uk' color index brightyellow default '~f davem@davemloft.net' color index brightgreen default '~f paulmck@linux.ibm.com' color index brightgreen default '~f paulmck@kernel.org' color index brightred default '~f corbet@lwn.net' color index brightblue default '~f tglx@linutronix.de' color index magenta default '~f tytso@mit.edu' color index blue default '~f hpa@zytor.com' color index blue default '~f gitster@pobox.com' color index brightcyan default '~f unixbhaskar@gmail.com' color index brightmagenta default '~f kevin@8t8.us' color index yellow default '~f gregkh@linuxfoundation.org' # Colors color hdrdefault brightcyan black color header brightwhite black "^from:" color header brightwhite black "^subject:" color quoted brightgreen black color signature brightwhite black color indicator blue green color error red black mono error bold color status brightgreen black mono status bold color tree yellow black color tilde brightmagenta black color body brightwhite black "[-a-z_0-9.]+@[-a-z_0-9.]+" mono body bold "[-a-z_0-9.]+@[-a-z_0-9.]+" color body brightyellow black "^Good signature" mono body bold "^Good signature" color body brightwhite red "^Bad signature from.*" mono body bold "^Bad signature from.*" color normal white black color message green black color attachment brightgreen black # Sidebar settings set sidebar_visible set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" set mail_check_stats #set sidebar_component_depth = 1 # Move the highlight to the previous mailbox bind index,pager \Cp sidebar-prev # Move the highlight to the next mailbox bind index,pager \Cn sidebar-next # Open the highlighted mailbox bind index,pager \Co sidebar-open # Move the highlight to the previous page # This is useful if you have a LOT of mailboxes. bind index,pager sidebar-page-up # Move the highlight to the next page # This is useful if you have a LOT of mailboxes. bind index,pager sidebar-page-down # Move the highlight to the previous mailbox containing new, or flagged, # mail. bind index,pager sidebar-prev-new # Move the highlight to the next mailbox containing new, or flagged, mail. bind index,pager sidebar-next-new # Toggle the visibility of the Sidebar. bind index,pager B sidebar-toggle-visible # Note: All color operations are of the form: # color OBJECT FOREGROUND BACKGROUND # Color of the current, open, mailbox # Note: This is a general NeoMutt option which colors all selected items. color indicator cyan black # Color of the highlighted, but not open, mailbox. #color sidebar_highlight black color8 # Color of the divider separating the Sidebar from NeoMutt panels #color sidebar_divider color8 black # Color to give mailboxes containing flagged mail color sidebar_flagged red black # Color to give mailboxes containing new mail color sidebar_new green black # Color to give mailboxes containing no new/flagged mail, etc. #color sidebar_ordinary color245 default # Selected mail for deletion Colors #color index blue black ~N # New mail #color index brightwhite black ~O # Old mail #color index red black ~F # Forwared mail #color index brightwhite black ~p # Mail sent to me color index red black ~D # Mail is marked as deleted # New mail arrival notification pop up set new_mail_command="notify-send --icon='/home/bhaskar/Pictures/neomutt.png' \ 'New Emails' '%n new messages, %u unread.' &" # Attachement related stuff macro attach O \ "\ unset wait_key\ rm -f /tmp/mutt-attach\ /tmp/mutt-attach\ /tmp/mutt-attach &^A\ " #Mail attachement save to a specific directory #bind editor noop #macro attach W /home/bhaskar/attachments/ macro attach E "/home/bhaskar/attachments/" # Customized keys for convenience ,mostly change label folders macro index \Ci " =inbox" macro index \Ck " =linux-kernel" macro index \Cg " =Greg(GKH)" macro index AL " =Al_Viro" macro index L " =Linus" macro index AN " =Andrew_Morton" macro index,pager \Cf " ~p ~P" macro index \el "Bhaskar" macro index \ea "all" macro index,browser \Cr "source ~/.muttrc" macro index \sn "l ^a^k~N\n" macro index P '| git am -s'\n macro index,pager S "?" # Mu : mail indexer and searcher settings macro index \emu "/usr/bin/mu find --clearlinks --format=links --linksdir=~/.maildir/search date:today --fields=\" n l \"" macro index \emr "~/.maildir/search" # url views macro pager \Cb "'urlview'" # Archive, but not yet using #macro index,pager A "=Archive" "Archive Message" ### BEGIN NOTMUCH-MUTT SETTINGS macro index \ens "unset wait_key~/bin/mutt-notmuch --prompt search~/.cache/notmuch/mutt/results/" "search mail (using notmuch)" macro index \ent "unset wait_key~/bin/mutt-notmuch thread~/.cache/notmuch/mutt/results/set wait_key" "search and reconstruct owning thread (using notmuch)" # Setting vim spell setting for mail compose set editor="vim -c 'set spell spelllang=en'" #set editor="emacsclient -a \"\" -t" # Automated task for each folder for deletion of old mails folder-hook linux-kernel 'push ~r>3d!~F' folder-hook inbox/Google_Alert 'push ~r>1w!~F' folder-hook tip-bot2 'push ~r>1w!~F' folder-hook kbuild_test_robot 'push ~r>1w!~F' folder-hook kernelci_bot 'push ~r>1w!~F' folder-hook kernel_test_robot 'push ~r>1w!~F' folder-hook David_Miller 'push ~r>1w!~F' folder-hook Thomas_Gleixner 'push ~r>1w!~F' folder-hook Greg 'push ~r>1w!~F' folder-hook Jonathan_Corbet 'push ~r>1w!~F' folder-hook H_Peter_Anvin 'push ~r>1w!~F' folder-hook Junio_C_Hamano_Git 'push ~r>1w!~F' folder-hook Ted_Tso 'push ~r>1w!~F' folder-hook Ingo_Molnar 'push ~r>1w!~F' folder-hook Andrew_Morton 'push ~r>1w!~F' folder-hook Al_Viro 'push ~r>1w!~F' folder-hook Linus 'push ~r>1w!~F' folder-hook Paul_E_McKenney 'push ~r>1w!~F' # Default views of various file types auto_view text/* application/* image/* audio/* # Mailing list related settings lists linux-kernel@vger.kernel.org subscribe [0-9]+.*@vger.kernel.org lists mutt-users@mutt.org subscribe [0-9]+.*@mutt.org #Status Bar set status_chars = " *%A" set status_format = "[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?"