LinuxBasics.org

The community that helps people to run Linux

rss

Example .muttrc

An example ~/.muttrc file to go along with my Using Mutt to access your ISP email account tutorial

#
# Example configuration file for Mutt
#

# emacs-like bindings
bind editor "\e" kill-word
bind editor "\e" kill-word

# map delete-char to a sane value
bind editor delete-char

# some people actually like these settings
#set pager_stop
#bind pager previous-line
#bind pager next-line

# don't add the hostname to the From header
unset use_domain
# don't generate a From header
unset use_from

# Specifies how to sort messages in the index menu.
set sort=threads

# Exim does not remove Bcc headers
unset write_bcc
# Postfix and qmail use Delivered-To for detecting loops
unset bounce_delivered

# weed out binary-only announcements to -devel-changes
#macro index \CW T!~s\(.*source.*\)\nWn^T~A\n "Weed out binary-only announcements"

# imitate the old search-body function
macro index \eb '/~b ' 'search in message bodies'

# 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'

# Show documentation when pressing F1
macro generic "!zcat /usr/share/doc/mutt/manual.txt.gz | sensible-pager\n" "Show Mutt documentation"
macro index "!zcat /usr/share/doc/mutt/manual.txt.gz | sensible-pager\n" "Show Mutt documentation"
macro pager "!zcat /usr/share/doc/mutt/manual.txt.gz | sensible-pager\n" "Show Mutt documentation"

# Use folders which match on \\.gz$ as gzipped folders:
open-hook \\.gz$ "gzip -cd %f > %t"
close-hook \\.gz$ "gzip -c %t > %f"
append-hook \\.gz$ "gzip -c %t >> %f"

# If Mutt is unable to determine your site's domain name correctly, you can
# set the default here.
#
# set hostname=cs.hmc.edu

# If your sendmail supports the -B8BITMIME flag, enable the following
#
# set use_8bitmime

# colors
color normal yellow black
color attachment brightyellow black
color hdrdefault cyan black
color indicator brightcyan blue
color markers brightred black
color quoted green black
color signature cyan black
color status brightcyan blue
color tilde blue black
color tree red black
color header brightgreen black ^From:
color header cyan black ^To:
color header cyan black ^Reply-To:
color header cyan black ^Cc:
color header brightcyan black ^Subject:
color body brightred black [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+

# aliases for broken MUAs
charset-hook windows-1250 CP1250
charset-hook windows-1251 CP1251
charset-hook windows-1252 CP1252
charset-hook windows-1253 CP1253
charset-hook windows-1254 CP1254
charset-hook windows-1255 CP1255
charset-hook windows-1256 CP1256
charset-hook windows-1257 CP1257
charset-hook windows-1258 CP1258

##
## More settings
##
set ispell=ispell

# GnuPG configuration
set pgp_decode_command="/usr/bin/gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
set pgp_verify_command="/usr/bin/gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f"
set pgp_decrypt_command="/usr/bin/gpg --status-fd=2 --passphrase-fd 0 --no-verbose --quiet --batch --output - %f"
set pgp_sign_command="/usr/bin/gpg --no-verbose --batch --quiet --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="/usr/bin/gpg --no-verbose --batch --quiet --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap /usr/bin/gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap /usr/bin/gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
set pgp_import_command="/usr/bin/gpg --no-verbose --import -v %f"
set pgp_export_command="/usr/bin/gpg --no-verbose --export --armor %r"
set pgp_verify_key_command="/usr/bin/gpg --verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="/usr/bin/gpg --no-verbose --batch --quiet --with-colons --list-keys %r"
set pgp_list_secring_command="/usr/bin/gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r"
set pgp_good_sign="^\\[GNUPG:\\] VALIDSIG"

####################################################################################

#set alias_file="~/.mutt/aliases"
#set editor="vim -c 'set ft=mail tw=64'"
#set envelope_from
set forward_format="Fwd: %s"
#set pager_index_lines=8
#set pager_stop
#set postponed="=Postponed"
#set query_command="abook --mutt-query '%s'"
set realname="Your Name" #### replace with your name.
set from="Email Address" #### replace with your email address

set mbox_type=maildir
set mbox="~/mail/inbox/"
set spoolfile="~/mail/inbox/"
set folder="~/mail/"
set record="~/mail/sent/"

# Add an item for each mailbox
mailboxes ~/mail/blt
mailboxes ~/mail/qna

# tell mutt about my mailing lists
subscribe blt-support@basiclinux.net
subscribe qna@linuxbasics.org

# for when you just can't wait for the cron job :)
# set up mutt so i can run fetchmail at any time by pressing G
macro index G "!fetchmail\n" "Invoke fetchmail"
macro pager G "!fetchmail\n" "Invoke fetchmail"

##set query_command="abook --mutt-query '%s'"
##set print_command="muttprint"
macro index \cb "|urlview\n"
macro pager \cb "|urlview\n"

############ Headers to Ignore
# I define a section per mailing list
ignore MIME-Version Content- Lines
ignore Resent-Message-Id Resent-Date Received-Date Resent-To Old-Return-Path
ignore Precedence X-mailing-list X-loop
ignore NNTP-Posting-Host Path Organization Xref Xcanpos Approved References
ignore X-MIME-Autoconverted X-Warning X-Sun-Charset X-Request-Do
ignore X-Commercial-Mail- X-Copyright-
ignore X-Disclaimer
ignore X-MSMail-Priority X-MimeOLE
ignore "from " received content- mime-version status x-status message-id
ignore sender references return-path lines
ignore date delivered-to precedence errors-to in-reply-to user-agent
ignore x-loop x-sender x-mailer x-msmail-priority x-mimeole x-priority
ignore x-accept-language x-authentication-warning

#
ignore X-Original-To
ignore X-Virus-Scanned
ignore X-Mailman-Approved-At
ignore X-Content-Filtered-By
ignore X-BeenThere
ignore X-Mailman-Version
ignore List-Id
ignore List-Help
ignore List-Post
ignore List-Subscribe
ignore List-Archive
ignore List-Unsubscribe
ignore X-Virus-Scanned
ignore X-OriginalArrivalTime
ignore X-Authenticated
ignore X-Enigmail-Version
ignore X-Enigmail-Supports

#
ignore X-MailScanner
ignore X-MailScanner-Information
ignore X-AntiAbuse
ignore X-Source
ignore X-Source-Args
ignore X-Source-Dir
ignore X-Note

#Yahoo Groups
ignore X-eGroups-Return
ignore X-Apparently-To
ignore Thread-Index
ignore X-Authentication-Info
ignore X-eGroups-Remote-IP
ignore Mail-Followup-To
ignore Mailing-List

# Debian
ignore X-Rc-Virus
ignore X-Rc-Spam
ignore X-Spam-Checker-Version
ignore X-Spam-Status
ignore X-Spam-Level
ignore Resent-From
ignore Resent-Sender

set postpone=ask-yes recall=no postponed=~/mail/postponed/

# Some people send non-text mails.
auto_view text/x-vcard
auto_view text/html
alternative_order text/plain # I like plaintext more, than html.

# Ask if I want to include CC and BCC
set askcc
set askbcc
set followup_to

Created by James Allen


Copyright (c) by the authors.
Prior to editing, authors agreed to license their contributions by the terms of the GPL.
See our licensing page for details.


Linux® is a registered trademark of Linus Torvalds.


 
  tutorials/using/example_muttrc.txt · Last modified: 2008/07/20 21:08

LinuxBasics.org

Start Linux-Course Tutorials Linux Links Security Blog Forum E-mail List Search Online Chat

Site-Info

Help Get in Touch Making of LBo

Wiki-Control

Powered by

Linux Apache DokuWiki Mailman RUTE ht://Dig