2012-07-03 17:21:48 +02:00
|
|
|
|
## -*- mode:sh -*- #
|
|
|
|
|
################################################################################
|
|
|
|
|
## Mutt Configuration
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
## Note on folders:
|
|
|
|
|
## These folders are assumed to exist:
|
2013-05-27 23:37:07 +02:00
|
|
|
|
## ~/.mutt.d: personal stuff (contacts, account information).
|
|
|
|
|
## ~/.mutt: public stuff (theme, mailcap).
|
|
|
|
|
## ~/.cache/mutt: header cache.
|
2012-07-03 17:21:48 +02:00
|
|
|
|
|
2013-03-02 13:06:30 +01:00
|
|
|
|
##------------------------------------------------------------------------------
|
2012-07-03 17:21:48 +02:00
|
|
|
|
## General options
|
2013-03-02 13:06:30 +01:00
|
|
|
|
##------------------------------------------------------------------------------
|
2012-07-03 17:21:48 +02:00
|
|
|
|
|
2013-03-02 16:53:37 +01:00
|
|
|
|
## Beep on new incoming mails.
|
|
|
|
|
set beep_new = "yes"
|
|
|
|
|
|
|
|
|
|
## Headers are editable in editor.
|
|
|
|
|
set edit_headers=yes
|
|
|
|
|
|
2013-05-24 11:44:23 +02:00
|
|
|
|
## Set EDITOR dynamically.
|
2013-05-27 23:37:07 +02:00
|
|
|
|
source "~/.mutt/maileditor.sh|"
|
2012-07-03 17:21:48 +02:00
|
|
|
|
|
2013-03-02 16:53:37 +01:00
|
|
|
|
## Store message headers locally to speed things up. Gentoo wiki says that if a
|
|
|
|
|
## folder is specified, it is even faster. If no folder exists, the cache will
|
|
|
|
|
## be a single file.
|
2013-03-02 16:24:29 +01:00
|
|
|
|
set header_cache = "~/.cache/mutt"
|
2012-07-05 20:02:42 +02:00
|
|
|
|
|
2013-03-02 16:53:37 +01:00
|
|
|
|
## Tell Mutt to check all IMAP folders. This will add all of them to the
|
|
|
|
|
## sidebar. Contrary to the manu 'mailboxes' way, order cannot be controlled, so
|
|
|
|
|
## you should set 'sidebar_sort' to yes. This will sort the folders
|
|
|
|
|
## alphabetically, ignoring punctuation.
|
|
|
|
|
set imap_check_subscribed
|
2012-07-05 20:02:42 +02:00
|
|
|
|
|
|
|
|
|
## Keep imap connection alive by polling intermittently (time in seconds).
|
|
|
|
|
set imap_keepalive = 300
|
|
|
|
|
|
2013-03-02 16:53:37 +01:00
|
|
|
|
## Allow mutt to open new imap connection automatically.
|
|
|
|
|
unset imap_passive
|
2012-07-05 20:02:42 +02:00
|
|
|
|
|
2013-03-02 16:53:37 +01:00
|
|
|
|
## Mailcap
|
2013-05-27 23:37:07 +02:00
|
|
|
|
set mailcap_path = ~/.mutt/mailcap
|
2013-03-02 16:53:37 +01:00
|
|
|
|
auto_view text/html
|
|
|
|
|
alternative_order text/plain text/html
|
2012-07-05 20:02:42 +02:00
|
|
|
|
|
2013-03-02 16:53:37 +01:00
|
|
|
|
## How often to check for new mail (time in seconds).
|
|
|
|
|
set mail_check = 60
|
2012-07-05 20:02:42 +02:00
|
|
|
|
|
|
|
|
|
## Mailbox type.
|
|
|
|
|
set mbox_type=Maildir
|
|
|
|
|
|
2013-12-18 12:37:32 +01:00
|
|
|
|
## Forward attachment as well
|
|
|
|
|
set mime_forward=yes
|
|
|
|
|
set mime_forward_rest=yes
|
|
|
|
|
|
2013-09-24 08:09:34 +02:00
|
|
|
|
## Keep showing the list of mails while in pager.
|
|
|
|
|
set pager_index_lines=8
|
|
|
|
|
|
2012-09-26 23:06:26 +02:00
|
|
|
|
## Encoding
|
|
|
|
|
set send_charset="us-ascii:utf-8"
|
|
|
|
|
|
2013-03-02 16:53:37 +01:00
|
|
|
|
## Remove delay between mailbox switches.
|
|
|
|
|
set sleep_time = 0
|
2013-03-02 13:06:30 +01:00
|
|
|
|
|
|
|
|
|
##------------------------------------------------------------------------------
|
2012-07-03 17:21:48 +02:00
|
|
|
|
## Multiple accounts
|
2013-03-02 13:06:30 +01:00
|
|
|
|
##------------------------------------------------------------------------------
|
2012-07-03 17:21:48 +02:00
|
|
|
|
|
2013-05-27 23:37:07 +02:00
|
|
|
|
## accountrc should contain the following config:
|
|
|
|
|
|
|
|
|
|
## Set account names (arbitrary).
|
|
|
|
|
# set my_ac_personal=personal
|
|
|
|
|
# set my_ac_work=work
|
|
|
|
|
#
|
|
|
|
|
## Fetch passwords
|
|
|
|
|
# source "ccat ~/.mutt-pwds.cpt |"
|
|
|
|
|
## Or
|
|
|
|
|
# source "gpg2 -dq ~/.mutt-pwds.gpg |"
|
|
|
|
|
##
|
|
|
|
|
## Folder hooks, one per account.
|
|
|
|
|
# source "~/.mutt.d/$my_ac_personal"
|
|
|
|
|
# folder-hook $folder 'source ~/.mutt.d/$my_ac_personal'
|
|
|
|
|
# source "~/.mutt.d/$my_ac_work"
|
|
|
|
|
# folder-hook $folder 'source ~/.mutt.d/$my_ac_work'
|
|
|
|
|
##
|
|
|
|
|
## Optionnaly you can add shortcuts to switch mailboxes:
|
|
|
|
|
# macro index,pager <f2> '<enter-command>source ~/.mutt.d/$my_ac_personal<enter><change-folder>!<enter>'
|
|
|
|
|
# macro index,pager <f3> '<enter-command>source ~/.mutt.d/$my_ac_work<enter><change-folder>!<enter>'
|
2012-06-20 19:07:54 +02:00
|
|
|
|
|
2012-07-28 20:04:21 +02:00
|
|
|
|
## Store passwords as follows in .mutt-pwds:
|
2013-05-27 23:37:07 +02:00
|
|
|
|
# set my_pw_account = foo
|
2012-10-09 20:42:00 +02:00
|
|
|
|
##
|
2013-03-02 13:06:30 +01:00
|
|
|
|
## CCRYPT:
|
2013-05-27 23:37:07 +02:00
|
|
|
|
## $ ccencrypt .mutt-pwds
|
2013-03-02 13:06:30 +01:00
|
|
|
|
##
|
2012-10-09 20:42:00 +02:00
|
|
|
|
## GNUPG: Generate a key pair with:
|
2013-05-27 23:37:07 +02:00
|
|
|
|
## $ gpg2 --gen-key
|
2012-07-28 20:04:21 +02:00
|
|
|
|
## Encrypt them with:
|
2013-05-27 23:37:07 +02:00
|
|
|
|
## $ gpg2 -e -r <user> ".mutt-pwds"
|
2012-07-05 20:02:42 +02:00
|
|
|
|
|
2013-05-27 23:37:07 +02:00
|
|
|
|
source "~/.mutt.d/accountrc"
|
2012-06-20 19:07:54 +02:00
|
|
|
|
|
2012-07-03 17:21:48 +02:00
|
|
|
|
##------------------------------------------------------------------------------
|
2012-07-05 20:02:42 +02:00
|
|
|
|
## Aliases
|
2012-07-03 17:21:48 +02:00
|
|
|
|
##------------------------------------------------------------------------------
|
2012-06-20 19:07:54 +02:00
|
|
|
|
|
2013-04-30 14:17:22 +02:00
|
|
|
|
## Mutt native support
|
2013-05-27 23:37:07 +02:00
|
|
|
|
# set alias_file = "~/.mutt.d/aliases"
|
2013-04-30 14:17:22 +02:00
|
|
|
|
# set sort_alias = alias
|
|
|
|
|
# set reverse_alias = yes
|
|
|
|
|
# source $alias_file
|
|
|
|
|
|
|
|
|
|
## Abook
|
2013-05-24 11:44:23 +02:00
|
|
|
|
## We redirect the error stream in case the config file in not compatible with
|
|
|
|
|
## current abook bersion.
|
|
|
|
|
set query_command= "abook --mutt-query '%s' 2>/dev/null"
|
2013-04-30 14:17:22 +02:00
|
|
|
|
macro index,pager a "<pipe-message>abook --add-email-quiet<return>" "Add this sender to Abook"
|
|
|
|
|
bind editor <Tab> complete-query
|
2012-07-03 17:21:48 +02:00
|
|
|
|
|
|
|
|
|
##------------------------------------------------------------------------------
|
|
|
|
|
## Keys
|
|
|
|
|
##------------------------------------------------------------------------------
|
|
|
|
|
|
2013-03-02 16:53:37 +01:00
|
|
|
|
## Security issue: if enter-command is available from the GUI, it is possible to
|
|
|
|
|
## see the password unencrypted. We disable it for this reason. Every command
|
|
|
|
|
## that the user intends to use must be bound to a key in advance, otherwise it
|
|
|
|
|
## will never be accessible.
|
2013-09-20 22:32:35 +02:00
|
|
|
|
bind generic,alias,attach,browser,editor,index,compose,pager,pgp,postpone ':' noop
|
|
|
|
|
|
|
|
|
|
## HTML mail view with graphical Internet browser.
|
2013-09-21 17:07:10 +02:00
|
|
|
|
macro attach 'V' "<pipe-entry>cat >~/.cache/mutt/mutt-attach.mail && $BROWSER ~/.cache/mutt/mutt-attach.mail && rm ~/.cache/mutt/mutt-attach.mail<enter>"
|
2013-03-02 16:53:37 +01:00
|
|
|
|
|
2013-03-02 16:24:29 +01:00
|
|
|
|
## Remap bounce-message function to "B"
|
2013-03-02 13:06:30 +01:00
|
|
|
|
bind index B bounce-message
|
|
|
|
|
|
2013-03-02 16:24:29 +01:00
|
|
|
|
## Fix the 'change-dir' issue with multiple accounts. When change-dir was called
|
|
|
|
|
## with account A, then use switched to account B, change-dir will still point
|
|
|
|
|
## to account A by default.
|
2013-03-04 17:31:57 +01:00
|
|
|
|
# macro index 'c' '<change-folder>?<change-dir><home>^K=<enter>'
|
2013-03-02 16:24:29 +01:00
|
|
|
|
|
2012-07-05 20:02:42 +02:00
|
|
|
|
## Manual fetch.
|
2012-07-03 17:21:48 +02:00
|
|
|
|
bind index "^" imap-fetch-mail
|
|
|
|
|
|
2013-03-02 13:06:30 +01:00
|
|
|
|
## Fix the backspace wrong binding that happens on some terminals.
|
2012-07-04 13:21:01 +02:00
|
|
|
|
#bind index,pager previous-page
|
|
|
|
|
|
|
|
|
|
## Fix Backspace -- Shell alternative.
|
2013-03-02 16:53:37 +01:00
|
|
|
|
## $ infocmp > termbs.src
|
2012-07-04 13:21:01 +02:00
|
|
|
|
## Changed kbs=^H to kbs=\177, then:
|
2013-03-02 16:53:37 +01:00
|
|
|
|
## $ tic -x termbs.src
|
2012-07-04 13:21:01 +02:00
|
|
|
|
|
2012-07-03 17:21:48 +02:00
|
|
|
|
##------------------------------------------------------------------------------
|
|
|
|
|
## Custom headers for outgoing mail
|
|
|
|
|
##------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
## Undo any custom headers that may have been put in by the global Muttrc
|
|
|
|
|
# unmy_hdr *
|
|
|
|
|
|
2013-03-02 16:53:37 +01:00
|
|
|
|
## Remove any global 'From:' header
|
|
|
|
|
# unset use_from
|
2012-07-03 17:21:48 +02:00
|
|
|
|
## Don't append a domain to my outgoing mails
|
2013-03-02 16:53:37 +01:00
|
|
|
|
# unset use_domain
|
|
|
|
|
# my_hdr From: Firstname Lastname <myfirstname@mymailserver>
|
2012-07-03 17:21:48 +02:00
|
|
|
|
|
|
|
|
|
## Extra info.
|
2012-07-04 13:21:01 +02:00
|
|
|
|
my_hdr X-Info: Simplicity is the ultimate sophistication.
|
2012-07-03 17:21:48 +02:00
|
|
|
|
|
|
|
|
|
## OS Info.
|
|
|
|
|
# my_hdr X-Operating-System: `uname -s`, kernel `uname -r`
|
|
|
|
|
|
|
|
|
|
## This header only appears to MS Outlook users
|
2013-03-02 16:53:37 +01:00
|
|
|
|
# my_hdr X-Message-Flag: WARNING!! Outlook sucks!
|
2012-07-02 19:11:12 +02:00
|
|
|
|
|
2012-07-03 17:21:48 +02:00
|
|
|
|
## Custom Mail-User-Agent ID.
|
2012-07-04 13:21:01 +02:00
|
|
|
|
set user_agent = yes
|
|
|
|
|
# my_hdr User-Agent: Every email client sucks, this one just sucks less.
|
2012-07-02 19:11:12 +02:00
|
|
|
|
|
2012-07-03 17:21:48 +02:00
|
|
|
|
##------------------------------------------------------------------------------
|
2012-07-04 13:21:01 +02:00
|
|
|
|
## Themes
|
2012-07-03 17:21:48 +02:00
|
|
|
|
##------------------------------------------------------------------------------
|
2012-07-02 19:11:12 +02:00
|
|
|
|
|
2012-07-04 13:21:01 +02:00
|
|
|
|
## Index format
|
2013-08-04 17:35:27 +02:00
|
|
|
|
## We use my_col_* to get dynamic column size.
|
2012-07-04 13:21:01 +02:00
|
|
|
|
## See 'man 3 strftime' and 'man 3 printf'.
|
|
|
|
|
# set index_format="%?M?_%M_ ?%Z %2C %.13d (%-68.68F) %-68.68s %?M?_%M_&(%c/%l?"
|
|
|
|
|
set date_format="%y-%m-%d %T"
|
2013-11-25 19:47:10 +01:00
|
|
|
|
|
2013-08-05 00:12:03 +02:00
|
|
|
|
folder-hook .*[sS]ent.* 'set my_col_from = `echo $((30 * ($(tput cols)-35-24) / 100))`; set my_col_subject = `echo $((70 * ($(tput cols)-35-24) / 100))`; set index_format="%2C | %Z [%d] %-$my_col_from.${my_col_from}t (%-4.4c) %-$my_col_subject.${my_col_subject}s"'
|
2013-08-04 17:35:27 +02:00
|
|
|
|
folder-hook ! .*[sS]ent.* 'set my_col_from = `echo $((30 * ($(tput cols)-35-24) / 100))`; set my_col_subject = `echo $((70 * ($(tput cols)-35-24) / 100))`; set index_format="%2C | %Z [%d] %-$my_col_from.${my_col_from}F (%-4.4c) %-$my_col_subject.${my_col_subject}s"'
|
2012-07-04 13:21:01 +02:00
|
|
|
|
|
2013-11-25 19:47:10 +01:00
|
|
|
|
## Original status_format, with dash line removed.
|
2013-11-09 17:44:22 +01:00
|
|
|
|
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) "
|
|
|
|
|
|
2013-11-25 19:47:10 +01:00
|
|
|
|
## This will redraw screen while refreshing the new cols value. Since there
|
|
|
|
|
## seems to be no way to check what folder is the current, this will not behave
|
|
|
|
|
## like the above hooks and will set the index_format correctly for non Sent
|
|
|
|
|
## folders only.
|
|
|
|
|
macro pager \CL '<enter-command>set my_col_from = `echo $((30 * ($(tput cols)-35-24) / 100))`; set my_col_subject = `echo $((70 * ($(tput cols)-35-24) / 100))`; set index_format="%2C | %Z [%d] %-$my_col_from.${my_col_from}F (%-4.4c) %-$my_col_subject.${my_col_subject}s"<enter><redraw-screen>'
|
|
|
|
|
|
2012-07-05 20:02:42 +02:00
|
|
|
|
## Colors
|
2013-03-02 16:53:37 +01:00
|
|
|
|
# source "/usr/share/doc/mutt/samples/colors.default"
|
|
|
|
|
# source "/usr/share/doc/mutt/samples/colors.linux"
|
2013-11-09 17:15:03 +01:00
|
|
|
|
# source "~/.mutt/colors.classic.sh|"
|
|
|
|
|
source "~/.mutt/colors.zenburn.sh|"
|
|
|
|
|
source "~/.mutt/colors.fallback.sh|"
|
|
|
|
|
source "~/.mutt/mutt.colors"
|
2013-03-02 13:06:30 +01:00
|
|
|
|
|
2013-11-09 17:15:03 +01:00
|
|
|
|
##------------------------------------------------------------------------------
|
|
|
|
|
## Sidebar
|
|
|
|
|
##------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
## We use a script to test if sidebar is installed. Needs to be loaded _after_
|
|
|
|
|
## the theme.
|
|
|
|
|
source "~/.mutt/sidebar.sh|"
|