## A basic secure .muttrc for use with gmail ## Files to use source ~/.mutt/aliases #To use gpg encrypted pw #decrypts and extracts password set my_tmp=`gpg -o ~/.mutt/.tmp -d ~/.mutt/.pass.gpg` set my_gpass=`awk '/gmail:/ {print $2}' ~/.mutt/.tmp` # #setts passwords set imap_pass = $my_gpass set smtp_pass = $my_gpass # # Deleting .tmp file immediately set my_del=`rm -f ~/.mutt/.tmp` ##Account Specific Settings # Change the following six lines to match your gmail account details #And Uncomment and edit if YOU DO NOT WANT to USE ENCRYPTED PASSWD. #And comment out the top section that does the pw encryption. set imap_user = "gmail_username@gmail.com" #set imap_pass = "my_pw" set smtp_url = "smtp://username@smtp.gmail.com:587/" #set smtp_pass = "my_pw" set from = "username@gmail.com" set realname = "My Name" # Change the following line to a different editor you prefer. set editor = "nano" ## gmail Config #(most of this should work with other IMAP accounts) ## Basic config, you can leave this as is in most cases # Not sure if timeout and keepalive value tweaking will help intermittent connection issues # (time values are in seconds) set wait_key = no set folder = "imaps://imap.gmail.com:993" set spoolfile = "+INBOX" set imap_check_subscribed set hostname = gmail.com set mail_check = 180 set timeout = 300 # Allow Mutt to open new imap connection automatically. unset imap_passive # Keep IMAP connection alive by polling intermittently set imap_keepalive = 210 set postponed = "+[gmail]/Drafts" set record = "+[gmail]/Sent Mail" set header_cache=~/.mutt/cache/headers set message_cachedir=~/.mutt/cache/bodies set certificate_file=~/.mutt/certificates set alias_file=~/.mutt/aliases set move = no set include set sort = 'threads' set sort_aux = 'reverse-last-date-received' set auto_tag = yes ## Reminds you of missing subject&unmodified or empty body with msg sent as default set abort_nosubject = ask-no set abort_unmodified = ask-no ignore "Authentication-Results:" ignore "DomainKey-Signature:" ignore "DKIM-Signature:" hdr_order Date From To Cc alternative_order text/plain text/html * auto_view text/html ## Some useful extra key bindings ## Improve tab completion: complete address aliases with tab... bind attach view-mailcap bind editor complete # default Mutt setting bind editor ^T complete-query unset query_command # default Mutt setting bind editor noop ## Optimize copy and save to show mailbox list without prompting ## Use numbers to jump directly to a mailbox, i.e. skip arrowing macro index,pager C "?" "copy a message to a mailbox" macro index,pager s "?" "move a message to a mailbox" macro generic "!lynx /usr/share/doc/mutt/html/manual.html\n" "Show Mutt documentation" macro index "!lynx /usr/share/doc/mutt/html/manual.html\n" "Show Mutt documentation" macro pager "!lynx /usr/share/doc/mutt/html/manual.html\n" "Show Mutt documentation" ##Full gpg integration #For encryption via gpg and auto-clear-signing4all. #Also replies to encrypted in kind #and stores encrypted mail as such, I.E. sent folder etc. 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="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0xYour_Key_ID -- -r %r -- %f" set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0xYour_Key_ID -- -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 set pgp_sign_as=Your_Key_ID set pgp_replyencrypt=yes set pgp_timeout=18000 set pgp_good_sign="^gpg: Good sig from" ##gmail-style keyboard shortcuts macro index,pager y "unset trash\n " "gmail archive message" macro index,pager d "set trash=\"imaps://imap.googlemail.com/[gmail]/Bin\"\n " "gmail delete message" macro index,pager gi "=INBOX" "Go to inbox" macro index,pager ga "=[gmail]/All Mail" "Go to all mail" macro index,pager gs "=[gmail]/Starred" "Go to starred messages" macro index,pager gd "=[gmail]/Drafts" "Go to drafts" ## The below can be pasted in to ~/.mutt/aliases to be used #or comment out the line in the Basic config section to keep all aliases here ##Address aliases follow. #These eddress aliases are mostly given as examples, #but all the addresses given are good. #Most if not all of the GoogleGroups #and mailing lists require registration or membership #alias alias_name full_email_address of alias # example of this: # john john.smith@aol.com