mutt and mailing lists

Stephen R Laniel steve at laniels.org
Wed Feb 22 22:23:58 UTC 2006


On Wed, Feb 22, 2006 at 11:06:12PM +0100, Stelian Iancu wrote:
> Can you post somewhere on the net your .muttrc and .procmailrc (if they
> are not secret, of course :-). Learning by example is the best. I am
> using Thunderbird at the moment, but I'd like to start using mutt.

I've used a lot of email clients, and mutt is by far the
best.

My .muttrc is below. I've not bothered to comment it much,
since it's mostly for my own consumption; let me know if you
need a tutorial.

Also, check here for a little hack that makes mutt work
properly with GnuPG:
http://laniels.org/scripts/gpg_get_keys.pl.txt

It makes mutt auto-encrypt to a recipient if the recipient
is in the my keyring. Mutt should be doing this anyway. But
that's what I consider one of mutt's great features: you can
hack it to fix its (relatively few) deficiencies.

set spoolfile=${HOME}/Mail/inbox
set postponed=${HOME}/Mail/postponed

# S to report message as spam (bad)
macro index S "|/usr/bin/sa-learn --spam &\n<save-message>=spam\n" 
macro pager S "|/usr/bin/sa-learn --spam &\n<save-message>=spam\n"

# H to report message as ham (good)
macro index H "|/usr/bin/sa-learn --ham &\n"
macro pager H "|/usr/bin/sa-learn --ham &\n"
                                                                                
# escape-S undoes last spam or ham report
macro index \eS "|/usr/bin/sa-learn --forget\n"

send-hook '.' "set signature='~/.signature'"
send-hook '.' 'bind compose y send-message'
send-hook '.' 'macro compose Y <filter-entry>"shorlfilter --length 50"\ry<send-message>'

# Generates the mutt 'alternates' command from a clean,
# clearly delimited Perl array.
source '~/bin/generate_mutt_alternates.pl|'

set tmpdir="${HOME}/mutt_tmp"
send-hook '~C "(vtext\.com|mobile\.att\.net|vzwpix\.com|mmode\.com)"' 'set abort_nosubject=no;unset signature;set tmpdir="${HOME}/mutt_tmp/to_cell";set pgp_autosign=no'
set implicit_autoview=yes
set index_format="%4C %Z %{%b %d} %-15.15L (%4c) %s" 
set record="=sent"
set sort=mailbox-order
set move=no
source ${HOME}/private/mutt/aliases
set alias_file="${HOME}/private/mutt/aliases"
set fast_reply
set fcc_clear=yes
set wrapmargin=5
set write_bcc=yes

send-hook '.' 'my_hdr Organization: USMBTRT'

#Various identities for various correspondents
send-hook '.' 'my_hdr From: Stephen R Laniel <steve at laniels.org>'
send-hook 'swretzel' 'my_hdr From: Stephen R Laniel <steef at laniels.org>'
send-hook 'faye_laniel|dlanie' 'my_hdr From: Stephen R Laniel <stephen at laniels.org>'
send-hook '~C ranting_forum' 'my_hdr From: "Steve Laniel:" <steve at laniels.org>
send-hook '~C straw-devel' 'my_hdr From: Steve Laniel <slaniel at laniels.org>'
send-hook '~C "(computersand\.com|woollymammoth\.net|ajmarchitects\.com|piccoboston\.com|pmapc\.com)"' 'my_hdr From: Stephen R Laniel <steve at computersand.com>; set signature="${HOME}/.signature.computersand"'

send-hook '~C "(isc\.org|worldtravelservices\.com|americanprogress\.org|newsig(nature)?.com)"' 'my_hdr From: Stephen R Laniel <slaniel at americanprogress.org>; my_hdr Organization: Center for American Progress; set signature=${HOME}/.signature.americanprogress'

set delete=yes
set realname="Stephen R Laniel"
ignore *
unignore from date subject to cc bcc reply-to
unignore organization x-mailer
unignore posted-to
unignore User-Agent
unignore Content-Type

# Remember the PGP passphrase for 10 mins.
set pgp_timeout=600
send-hook '.' 'set pgp_replysign=yes'
send-hook '.' 'set pgp_autoencrypt=no;set pgp_autosign=yes'
source '~/bin/gpg_get_keys.pl|'

# classical PGP-armor signatures to these people
send-hook '.' 'set pgp_create_traditional=no'
send-hook '~C "(cancer\.org|craigslist\.org|voteprime.com|computersand.com|jasonandfischer.com|vtmednet\.org|blodgett\.com|laniels at pobox\.com|dlaniel at verizon.net|youngbar at insightbb\.com|newsig\.com|americanprogress\.org|vicrhoads at rcn\.com)"' 'set pgp_create_traditional=yes'

# Don't display a '+' at the beginning of wrapped lines
unset markers

set forward_format="%s (fwd)"
set mime_forward=ask-no

unset confirmappend
source ${HOME}/private/mutt/save_hooks

# keybindings

bind index s decrypt-save
bind pager s decrypt-save

bind pager <Down> next-line
bind pager <Up> previous-line

bind index C decrypt-copy
bind pager C decrypt-copy

bind attach G last-entry
bind index G last-entry
bind postpone G last-entry
bind pager G bottom

bind pager e noop
bind index e noop
bind pager = noop
bind index = noop
bind index z noop
bind index Z noop
bind index % noop
bind index <Right> noop
bind pager <Right> noop
bind index <Space> next-page
bind pager x noop
bind index x noop

send-hook '.' 'set reverse_name=yes'
set quote_regexp="^([ \t]*[|>:#])+"

#color normal black white
#color header black white .

-- 
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060222/9a953475/attachment.sig>


More information about the ubuntu-users mailing list