[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: postfix help



Dave,

When you've got all this set up you'll never want to play around
with Netscape again, believe me!

I use sendmail, because I've never been able to get the hang of
postfix, supposedly simpler.

Fetchmail looks fine the way you have it.

Procmail will deliver the goods to wherever you want them

Mutt is the BEST!

I attach sample .procmailrc and .muttrc files - not mine, I
pinched them from Telsa Gwynnes website (address in attachment).
They are very well commented and a good place to start.

Good luck!

Glyn M.



On Mon, Jun 12, 2000 at 06:55:01PM -0500, thus spake Dave Bateman:
> I saw from earlier postings that quite a few of you are using postfix.
> I've been using netscrape for e-mail
> and a recent bout with X convinced me that I should set up e-mail
> "properly".
>     I managed to get postfix on my machine and exim off, but I could use
> a hand configuring postfix.
> My machine is strictly dial-up, so I downloaded fetchmail (will that
> work w/ postfix? suggestions?).
>     I think I have fetchmail set up OK, eg;
> 
>             ~/.fetchmailrc
> 
>             bash-2.04$ cat .fetchmailrc
>             poll pop.mindsprind.com protocol POP3 username batemand is
> dsb password xxxxxxx fetchall
> 
>     Is there a configuatorer/magic pill that sets up postfix, or am I
> going to edit main.cf/master.cf by hand?
>     Same question about mutt, will it work w/ postfix/fetchmail? edit
> .muttrc?
> 
>     Seems like a-lot of work compared to netscrape, but then, when X
> goes down and your only help is
> this mail-list...well, you get the point.
> 
> TIA,
> Dave
> 
> ----------
> One machine can do the work of fifty ordinary men.
> No machine can do the work of one extraordinary man.        --- Elbert
> Hubbard
> 
> 
> -- 
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null

-- 
       ******************************************************
       * "The soul is greater than the hum of its parts. "  *
       *                 Douglas Hoftstatder                *
       ******************************************************
################################################################
#                  Here we go....                              #
#                  my very own mail-mangler                    #
################################################################
                                                               
################################################################
# Procmailrc files have two parts. First you tell it where     #
# everything lives. Then you tell it the recipes.              #
################################################################

##########################################
# Varibiggles and where everything lives #
##########################################

################################################################
# All of these will work quite happily without changing for    #
# Red Hat Linux 6.0 and 6.1. They won't necessarily work for   #
# other flavours without changing paths. See the "Getting      #
################################################################

SHELL=/bin/bash		
	# Have to have this one (or whatever your shell is)
	# Best bet is bash or sh. 
LINEBUF=4096            
	# Magic. Apparently it burps on long lines if you don't
        # put this in.
PATH=/bin:/usr/bin:/usr/local/bin
	# Where procmail looks for stuff. Works for RH 6.0, 6.1
VERBOSE=off
        # Change to 'on' to get _long_ procmail log. 
MAILDIR=$HOME/Mail	
	# Not where your mail arrives on the machine. Where
	# procmail will assume all the folders you mention in
	# your recipes goes. Make sure your email-reading
	# program also knows about it. (I understand $HOME/Mail
	# is pretty standard, however.)
LOGFILE=$HOME/Mail/procmaillog
FORMAIL=/usr/bin/formail
	# 'formail'. Part of the procmail package. Correct
	# the path if this isn't where it lives for you.
	# ('which formail' may well tell you.)
SENDMAIL=/usr/sbin/sendmail 

############################
# The recipes - I hope...  #
############################

################################################################                                                                
# Gods know how this works. But it's very useful. If you get   #
# email that is sent simultaneously to you and to two other    #
# lists, this will nuke two of those so that you only see it   #
# once. Came from 'man procmail'.                              #
################################################################
# Nuke duplicate messages
:0 Wh: msgid.lock
| $FORMAIL -D 8192 msgid.cache
################################################################
# Next two are from the 'Getting started with procmail' doc.   #
# I'm not too sure about how they work, but they look handy... #
################################################################

# Create a backup cache of 200 most recent messages in case of 
# mistakes (yes, you can change the 200 to 20 or 400 or whatever
# you want)
:0 c
backup

  :0 ic
  | cd backup && rm -f dummy `ls -t msg.* | sed -e 1,200d`

# Regenerate "From" lines to make sure they are valid
:0 fhw
| formail -I "From " -a "From "

################################################################
#                       Mailing lists                          #
#                                                              #
# I think this is the thing that most people who finally get   #
# procmail want to know about: how to get different messages   #
# from different mailing lists into different folders. This is #
# where all that MAILDIR stuff comes from. All the folders I   #
# name in here are all created off whatever directory I filled #
# in as the MAILDIR at the start. And no, they don't suddenly  #
# appear the instant you edit this file. They only appear when #
# procmail finds mail that should go in them.                  #
#                                                              #
# You can have more than one recipe sending email into the     #
# same folder, btw, yes.                                       #
#                                                              #
# General useful (?) comments:                                 #
#	The "^Resent-From: " pattern works wonderfully on      #
#    lists which generate it.                                  #
#	Making the folder not -quite- the list name means you  #
#    can save mail from it to a folder named for the list. Can #
#    be handy.                                                 #
#	Some lists are indeed a pig to catch everything with.  #
#	"TO" is different from "To" and you mustn't put a      #
#    a space after "TO". It catches "To: " and "Cc: ", I       #
#    think. Very handy.                                        #
################################################################

################################################################
# Asatru lists (two different lists going into one folder)     #
################################################################

:0:
* ^TOasatru@home.ease.lsoft.com
IN.asatru

:0:
*^TOasatru-l@eskimo.com
IN.asatru

###########
# bugtraq #
###########

:0:
* ^Sender:.*Bugtraq List
IN.bugtraq

#########################
# gnome CVS commit list #
#########################

:0:
* ^TOcvs-commits-list@gnome.org
IN.cvs-commits

################################################################
# gnome-list - wonder which one of these is the working one? :)#
################################################################

:0:
* ^Sender: owner-gnome@nuclecu.unam.mx
IN.gnome-list

:0:
* ^Resent-From: gnome-list@gnome.org
IN.gnome-list 

:0:
* ^From gnome-list-request@redhat.com 
IN.gnome-list

:0:
* ^To: gnome-list@gnome.org
IN.gnome-list

##################
# gnome-gui-list #
##################

:0:
* ^Resent-From: gnome-gui-list@gnome.org
IN.gnome-gui-list

##################
# gnome-doc-list #
##################

:0:
* ^Resent-From: gnome-doc-list@gnome.org
IN.gnome-doc-list

########################
# gnome-packaging-list #
########################

:0:
* ^TOgnome-packaging-list@gnome.org
IN.gnome-packaging-list

:0:
* ^Resent-From: gnome-packaging-list@nuclecu.unam.mx
IN.gnome-packaging-list


###############################################################
# linuxchix lists: there are three mailing lists here: see    #
# the end of this file for the different ways to deal with    #
# heavy traffic lists with digest options.                    #
###############################################################

#################################################
# Note the hash marks at the start: this one is #
# commented out and thus procmail ignores it.   #
# I don't usually have time to read it all at   #
# once, so I use the digest. This recipe is     #
# here from when I read it all at once.         #
#################################################

# For when I have more time:
#:0:				
#* ^TOgrrltalk@linuxchix.org	
#IN.linuxchix                    

#################################################
# This is what I consider advanced stuff: this  #
# one doesn't put the digest straight into a    #
# folder. Instead it runs 'formail +1 -ds',     #
# which splits the digest into its original     #
# messages, and then puts the results of that   #
# into the folder.                              #
#################################################

:0: 
* ^TOgrrltalk-digest@hub.org
| formail +1 -ds >> IN.linuxchix

:0:
* ^TOissues@linuxchix.org
IN.linuxchix

:0:
* ^TOtechtalk@hub.org
IN.linuxchix

###############################################################
# Someone didn't like their email address being archived on   #
# the archive site and to get around it started sending bccs  #
# to linuxchix. This meant that the recipes above didn't spot #
# it. The following three spot that; and I think work better  #
# than the above recipes. They are at the end of the          #
# linuxchix recipes because I want the digests to get split   #
# first. If these recipes were before the one that splits     #
# digests, they would get acted on first and I wouldn't have  #
# a split digest.                                             #
###############################################################

:0:
* ^Sender: owner-issues@linuxchix.org
IN.linuxchix

:0:
* ^Sender: owner-techtalk@linuxchix.org
IN.linuxchix

:0:
* ^Sender: owner-grrltalk@linuxchix.org
IN.linuxchix

###########
# mailman #
###########

:0:
* ^TOmailman-users@python.org
IN.mailman

##############
# mutt-users #
##############
:0:
* ^TOmutt-users@mutt.org
IN.mutt-users

:0:
* ^Sender: owner-mutt-users@mutt.org
IN.mutt-users

####################################
# Open Source Writers' Group lists #
####################################

:0:
* ^TOoswg-discuss@oswg.org
IN.oswg

:0:
* ^TOoswg-announce@oswg.org
IN.oswg

:0:
* ^TOoswg-docbook@oswg.org
IN.oswg


#################
# Procmail list #
#################

:0:
* ^TOprocmail@Informatik.RWTH-Aachen.DE
IN.procmaillist


####################
# Red Hat announce #
####################

:0:
* ^Resent-From: redhat-announce-list@redhat.com
IN.rh-announce

:0:
* ^TOredhat-watch-list@redhat.com
IN.rh-announce


#########################
# windowmaker: wm-users #
#########################

:0:
*^From wm-user-request@windowmaker.org
IN.wm-user

################################################################
#                 Splitting digests                            #
#                                                              #
# You don't need to do this, but this seems to be another very #
# popular thing to do with procmail. If you're on mailing      #
# lists using the digest option, sometimes you may want to     #
# split the digests back up into the original emails. There is #
# (of course) more than one way to do this:                    #
#                                                              #
# (1) don't bother: just read through all the digest in one    #
# big lump. Simple, easy, and great until you find someone     #
# sent a 500-line postscript file or a giant jpg which got     #
# included into the digest :(                                  #
#                                                              #
# (2) use a mail-reader such as mutt, and if you suddenly want #
# to split a digest up, then whilst reading the message, hit   #
# 	| formail +1 -ds                                       #
# which will put the results into your main inbox. If you want #
# it in a particular folder (like the one you're reading), do  #
#	| formail +1 -ds >> foldername                         #
#                                                              #
# (3) make procmail (or formail, actually), split it up ready  #
# for you to read.                                             #
#                                                              #
# So if you want to have each digest automatically split up    #
# by procmail as it arrives, and to read each message          #
# individually, then here's some examples of what you can put. #
# The first two lines are exactly the same. The third one has  #
# a pipe (vertical line) symbol at the start, and then the     #
# command you're piping it through.                            #
#                                                              #
# Yes, I picked a notoriously heavy-traffic one for the first  #
# example... And it -should- work, but it's not a list I read, #
# sorry!                                                       #
#                                                              #
# Instead of this:                                             #
#	:0:                                                    #
#	* ^Sender: owner-linux-kernel@vger.rutgers.edu         #
#	IN.linux-kernel                                        #
# ...you want this:                                            #
#	:0:                                                    #
#	* ^Sender: owner-linux-kernel@vger.rutgers.edu         #
#	| formail +1 -ds >> IN.linux-kernel                    #
#                                                              #
# Da-dah! That's all.                                          #
#                                                              #
# And for those where the list name changes and that's what    #
# you're matching patterns on, instead of this:                #
# 	:0:                                                    #
# 	* ^TOgrrltalk@hub.org                                  #
# 	IN.linuxchix                                           #
# ...you want this:                                            #
#	:0:                                                    #
* 	^TOgrrltalk-digest@hub.org                             #
#	| formail +1 -ds >> IN.linuxchix                       #
#                                                              #
# Magic :)                                                     #
################################################################



################################################################
# Quick summary for adding your own or changing these: the     #
# general format for putting an email into a folder and not    #
# doing anything fancy to it first is:                         #
#                                                              #
# :0:                                                          #
# * <what you're looking for>                                  #
# <where you're putting it>                                    #
#                                                              #
# The ^ sign in my recipes is the sign procmail understands as #
# "start of the line", so "^From" matches the word "From" when #
# it's the start of a header.                                  #
#                                                              #
# The "IN." at the start of folder names is not necessary:     #
# that's just my naming system. Stolen, like everything else,  #
# from a friend's example. It has the benefit that with my     #
# mail-reader (mutt), which sorts alphabetically, all of them  #
# show up first (capitals are earlier in the alphabet if       #
# you're a computer...) and I can save them easily: from       #
# IN.blah to blah. If you want to call the folders blah-spool, #
# or just blah, then cool. That'll work, too.                  #
#                             -- Telsa                         #
################################################################
################################################################
#          Telsa's over-long .muttrc.                          #
#                                                              #
# This all started when I wanted to switch colours off when    #
# reading email. I read the documentation, and got completely  #
# sidetracked with all the _other_ things I could do instead!  #
#                                                              #
# Mutt has a set of internal defaults for each variable,       #
# option, and thing you can tinker with. When you start it up, #
# it will first apply all of those. Then it will look for a    #
# file on the computer called "Muttrc", which has a set of     #
# default settings for everyone on the system. This usually    #
# lives in /etc/Muttrc. It applies those settings.             #
#                                                              #
# And _then_ it looks in the home directory of the user in     #
# question for a file called ".muttrc". If this exists, it     #
# applies the settings in that, too.                           #
#                                                              #
# So the place to put your personal ones is in that .muttrc in #
# your home directory, because it's the last one that mutt     #
# checks, so those defaults will stick.                        #
#                                                              #
# Your personal .muttrc does not need to mention every         #
# setting. (Mine certainly doesn't.) It only needs to mention  #
# the ones which are different from the default Muttrc. This   #
# makes starting out very easy. If there is one single thing   #
# you don't like in the main one, just set that one single     #
# thing in your .muttrc and forget about all the others. :)    #
#                                                              #
# However, if you're going to make a lot of changes, then a    #
# useful thing to do is to copy the Muttrc and call the copy   #
# '.muttrc' and put it in your home directory. That way, you   #
# can just tweak that one easily. That's what I did, anyway,   #
# and it worked for me.                                        #
#                                                              #
# -Don't- edit the default Muttrc unless you know what you're  #
# doing. Stick to playing with your own personal one until     #
# you have something you know works. If the personal one goes  #
# wrong, you can just delete it, and then mutt will use the    #
# settings in the Muttrc and all is well.                      #
#                                                              #
# Thanks to: the mutt manual writers, the mutt-users mailing   #
# list, Tom Gilbert, Georg Griev, Dick Porter, Fairlight and   #
# Mikko Hänninen for patience under much questioning, (from    #
# everything from 'is a mailbox the same as a folder?' to 'why #
# is this pattern not being evaluated?'). Thanks also to the   #
# rpm specfile writer who carefully included exactly how to    #
# make PGP work with mutt even if you had the US version. And  #
# thanks to the people who put their muttrcs on the web. You   #
# may recognise a lot of this one...                           # 
#                                                              #
# Feel free to peruse, borrow and alter this for your own use. #
# If it breaks something, I won't be too surprised; if it      #
# works, I'll be delighted.                                    #
#                                                              #
# Comments and criticisms and corrections and spellchecks are  #
# all welcome (spam is not, however): send 'em to              #
# hobbit@aloss.ukuu.org.uk.                                    #
#                                           -- Telsa           #
################################################################

################################################################
# A basic convention for almost any ordinary file in your      #
# home directory whose name begins with a dot and ends with    #
# 'rc' is that anything with a # mark at the start of the line #
# is a comment and to be ignored. If you look at files that    #
# fit those criteria, the only exception you're likely to find #
# is that sometimes you'll see "#!/bin/sh" at the very top.    #
#                                                              #
# Sorry, there would have to be an exception, wouldn't there?  #
#                                                              #
# Anyway, anything with hash marks at the start won't get run. #
# This is handy for documenting things, or for temporarily     #
# removing a command without having to write down what it      #
# looked like in case you want to put it back in.              #
#                                                              #
# You will find lots of such comments in this file :)          #
################################################################

################################################################
# I am assuming that you have access to the mutt manual, which #
# comes with mutt. This is not the manual produced by typing   #
# 'man mutt' but the longer document which explains in gory    #
# detail every setting. Sometimes I shall just say "the list   #
# of options is in there".                                     #
#                                                              #
# On my (Red Hat Linux) system, it lives in the mutt           #
# directory in /usr/doc.                                       #
#                                                              #
# If you don't have it on your system, then you can find the   #
# online manual at the mutt website: http://www.mutt.org, and  #
# follow the links under 'Documentation'.                      #
################################################################

################################################################
# Very first command: "ignore"                                 #
#                                                              #
# Email arrives with lots of headers, many of which are really #
# boring unless you're fascinated by the routes email travels  #
# or the exact technical name for the character set that the   #
# email is using. Most people ignore at least some; most mail  #
# programs do the ignoring for you. Mutt lets you choose.      #
#                                                              #
# Remember that Mutt has already looked at and applied         #
# settings from another file before it reads your personal     #
# .muttrc. That file has already told mutt to ignore stuff. If #
# you want to change that, you have to tell mutt to forget     #
# about the earlier file's 'ignore' commands first, before     #
# applying your commands. There is a useful pattern-matching   #
# character for this: a * sign matches 'everything'. So this   #
# is unignore the lot (to get round the fact that mutt may     #
# already have ignored things because of the first file),      #
# and then ignore only the ones on the 'ignore' line.          #
#                                                              #
################################################################
 
unignore *
ignore Resent-Cc Resent-Date MBOX-Line References In-Reply-To Resent-Message-ID Resent-From X-Loop Resent-Sender Precedence 

################################################################
# The global Muttrc has as a comment for the next command:     #
#                                                              #
# "Imitate the old search-body function"                       #
#                                                              #
# Mutt used to have a one-key command to search message bodies #
# but now it's a whole three: "/", followed by "~b". This is   #
# a macro binding escape-b to that combination when you hit it #
# in the pager.                                                #
#                                                              #
# Note that you don't need to keep this in your .muttrc,       #
# because it's already defined in the global one. It will only #
# be different if you choose to rebind escape-b to something   #
# else.                                                        #
################################################################

macro index \eb '/~b ' 'search in message bodies'

#############################
# simulate the old url menu #
#############################

###############################################################
# Again, from the default muttrc. It's another macro. When in #
# either the index or the pager (ie, reading a message), you  #
# can hit ^B and the urlview program will be invoked.         #
# (Normally, you'd have to hit the | symbol and then type     #
# urlview and hit return.) Note: old Red Hat systems (6.0)    #
# didn't require you to have urlview installed, and so if you #
# don't have anything happen, then this might be why :)       #
###############################################################

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'

###############################################################
# To get -out- of urlview, btw, when you've finished looking  #
# at a web page, hit 'q' to get out of Lynx, 'y' to tell it   #
# that yes, you really mean it, 'q' to get out of urlview,    #
# and any key to get back to the mutt page you were on.       #
###############################################################

###############################################################
# Show documentation when pressing F1                         #
#                                                             #
# This is already in the standard global Muttrc. I think it's #
# a _bad_ idea to put this into your personal .muttrc too.    #
#                                                             #
# That's because when a new version of mutt is installed,     #
# part of the install process updates the global Muttrc with  #
# the new home for the documentation. (The exact numbers at   #
# the end of the filename differ with each version.) But it   #
# will not update people's personal files. Because they're    #
# read in order, if you don't keep your personal one up to    #
# date, you can end up with mutt reading the global file,     #
# knowing where the documentation is; then reading your local #
# one and resetting where it thinks the documentation is to   #
# somewhere that is now out of date and doesn't exist. So if  #
# you're copying the global one over as a starting point,     #
# take these lines out of your personal one, or put # marks   #
# at the start so mutt thinks these lines are comments and    #
# ignores them. Like this:                                    #
###############################################################

# macro generic <f1> "!less /usr/doc/mutt-1.0pre3i/manual.txt\n" "Show Mutt documentation"
# macro index   <f1> "!less /usr/doc/mutt-1.0pre3i/manual.txt\n" "Show Mutt documentation"
# macro pager   <f1> "!less /usr/doc/mutt-1.0pre3i/manual.txt\n" "Show Mutt documentation"

###############################################################
# Mailboxes                                                   #
#                                                             #
# These don't _need_ to be full pathnames, but I never got    #
# round to changing them :)                                   #
#                                                             #
# The mailboxes line (or lines) tell mutt where to check for  #
# new mail arriving. (To produce the "New mail in:" message   #
# that mutt shows when you're reading other mail.)            #
#                                                             #
# Note that mutt is -not- responsible for sorting mail into   #
# these places. For that, you need procmail or something.     #
# Mutt only knows that these are places where it should look  #
# to see if there's new mail arriving.                        #
#                                                             #
# Also note that mutt is not what controls the "You have new  #
# mail" messages that you get when you're doing other things  #
# at the command line. That is controlled by the shell. (For  #
# bash users, you can tell your shell where where to look     #
# with the MAILPATH variable, described in 'man bash'.)       # 
###############################################################

mailboxes /var/spool/mail/hobbit 
mailboxes /home/hobbit/Mail/IN.asatru /home/hobbit/Mail/IN.bugtraq 
mailboxes /home/hobbit/Mail/IN.cvs-commits /home/hobbit/Mail/IN.gnome-list 
mailboxes /home/hobbit/Mail/IN.gnome-doc-list /home/hobbit/Mail/IN.linuxchix 
mailboxes /home/hobbit/Mail/IN.mutt-users /home/hobbit/Mail/IN.oswg
mailboxes /home/hobbit/Mail/IN.procmail /home/hobbit/Mail/IN.rh-announce 
mailboxes /homee/hobbit/Mail/IN.testing /home/hobbit/Mail/IN.wm-user


################################################################
# Lists                                                        #
#                                                              #
# If you are not on any mailing lists, you can ignore this     #
# variable and its explanation completely and skip ahead.      #
#                                                              #
# lists does a couple of things. If you have lists defined,    #
# you can use the list name in the index_format variable (see  #
# later!) You can reply to the list with 'L' even when the     #
# reply-to was set to the sender and not the list. Stuff like  #
# that. It's _very_ useful: you don't realise how useful until #
# you've been using it for a while and then have to do without #
# it in a different mailer.                                    #
#                                                              #
# For each mailing list that you want mutt to recognise, you   #
# want the name that appears before the @-sign in the list     #
# email address. You don't need the entire address.            #
#                                                              #
# This is an entirely separate variable from the mailboxes     #
# one, btw. Don't confuse the two. As an example, I have a     #
# mailbox in this file called IN.asatru. That has two lists    #
# filtered into it by procmail. I have to put two separate     #
# entries in for 'lists', one for each mailing list.  In the   #
# same way, IN.linuxchix has several lists filtered into it.   #
################################################################

lists asatru asatru-l bugtraq gnome-list gnome-doc-list grrltalk 
lists issues mutt-users oswg procmail techtalk wm-user

################################################################
# Lots of variables.                                           #
#                                                              #
# If you are looking at the default Muttrc you'll see a few(!) #
# other things which I have either commented out or deleted.   #
# They're in the default one already, so I don't need them all #
# in here as well.                                             #
#                                                              #
# There are explanations of them all in the manual, mostly in  #
# section 6. I haven't pasted all of that into here, although  #
# I've added in a few comments of my own about some of them.   #
# I have, though, included the ones I have changed, and why I  #
# think my choices are better!                                 #
#                                                              #
# If something's in quotes, it usually means you can put your  #
# preferred version (like the filename) in there instead. A    #
# lot of the options, though, are called 'quad-options': a     #
# wonderful concept which mutt seems to have started and I     #
# wish other programs did the same! As well as 'yes' and 'no', #
# there's also 'ask-yes' and 'ask-no'. The first two just do   #
# it automatically; the second pair give you the option, but   #
# assume either yes or no if you don't tell it something       #
# different.                                                   #
#                                                              #
# There's an interesting twist to these options. As well as    #
# setting them like this, and having them affect things all    #
# through mail-reading, you can set these options to vary      #
# according to folder. I like this, and I have included the    #
# ones I use after this section. But first, the ones for all   #
# folders...                                                   #
################################################################

################################################################
# Where to put aliases. Since mutt doesn't automatically look  #
# for it, if you change it from .muttrc you will need to put   #
# 	source aliasfilename                                   #
# after it at the start of a new line.                         #
################################################################
set alias_file="~/.muttrc"

################################################################
# When arrow_cursor is set, only an arrow shows your cursor,   #
# rather than the entire line being highlighted. This is       #
# faster on slower links. And besides, I find the entire line  #
# being bright rather garish. So...                            #
################################################################
set arrow_cursor

################################################################
# If set you get prompted for Cc's: people to send copies to.  #
################################################################
set askcc

################################################################
# The string to precede quoted text in replies.                #
# The default is: set attribution="On %d, %n wrote:"           #
# %d is the date of the quoted message. %n is the author.      #
################################################################
set attribution="On %d or thereabouts, %n wrote:"

################################################################
# unset auto_tag is the default. I forget why I changed this :)#
################################################################
set auto_tag

################################################################
# set beep means you get a beep with an error. If you have     #
# your terminal set up to flash instead of beeping, this can   #
# be quite horrendous!                                         #
################################################################
unset beep

################################################################
# confirmappend and confirmcreate are both set by the global   #
# Muttrc.                                                      #
#                                                              # 
# confirmcreate is very handy for catching typos so I like it. #
# confirmappend is just a pain :) So out it goes:              #
################################################################
unset confirmappend

################################################################
# set copy=yes                                                 #
# Make a copy of all email you send? This is the default, but  #
# if you're short on diskspace you might want to unset it.     #
################################################################
set copy=yes

################################################################
# set date_format="!%a, %b %d, %Y at %I:%M:%S%p %Z"            #
# The way the date is displayed in the index. It uses a set    #
# of variables you can find in the manual page for strftime:   #
# type 'man strftime' and boggle. Yes, you can decide to have  #
# all messages labelled with how many seconds it has been      #
# since 1970, if you're really bored. But it's probably much   #
# more useful to leave this one as the default.                #
################################################################

################################################################
# set editor=""                                                #
# Defaults to VISUAL, EDITOR, or vi (yuk!)                     #
# VISUAL and EDITOR are set in your shell.                     #
################################################################
set editor=joe

################################################################
# set forward_format="[%a: %s]"                                #
# This results in a Subject line of a long email address and   #
# then the old subject. Some people (me :)) dislike this. So   #
# of course you can change it to something which keeps just    #
# the Subject line and puts "Fwd: " before it:                 #
################################################################
set forward_format="Fwd: %s"

################################################################
# set indent_string="> "                                       #
# Note that it's a very bad idea to change this. If you don't  #
# know why, then you _don't_ want to change it. It's a netwide #
# convention. People use this pattern when they want to        #
# highlight quoted text, for example.                          #
################################################################

################################################################
# set index_format="%4C %Z %{%b %d} %-15.15L (%4l) %s"         #
# The explanation for this is... um. Complicated. See the      #
# manual :)                                                    #
#                                                              #
# I don't like it because the capital L means that the list    #
# name is displayed rather than the sender's name. I sort my   #
# lists into folders anyway, so I don't need that. So, I'd     #
# change the L to an F to get the sender's name:               #
# set index_format="%4C %Z %{%b %d} %-15.15F (%4l) %s"         #
#                                                              #
# ...except that this is a variable that I want differently in #
# different folders. See below for the folder hooks. (Quite a  #
# bit below, yes..)                                            #
################################################################

################################################################
# set mailcap_path=""                                          #
# Where to look for mailcap to know how to display MIME stuff  #
# mutt can't do. Mutt has a list of good guesses, so you       #
# shouldn't need to fill this in. If you want to change how    #
# mutt reacts to particular sorts of message, then the file    #
# that gets read here is what you want to change.              #
################################################################

################################################################
# set mark_old                                                 #
# Makes mutt assume that if I quit without reading new         #
# messages, they should be marked as old. I hated this with    #
# elm, so this is the first thing I ever changed.              #                 
################################################################
unset mark_old

################################################################
# set mbox="~/mbox"                                            #
# Nono, not in my home directory, thank you. Btw, the + means  #
# 'this file lives in my mail directory'. An = sign means the  #
# same thing, but "set mbox==received" looks silly.            #
################################################################
set mbox=+received               

################################################################
# set mbox_type="mbox"                                         #
# I think I'll leave that alone, yes.                          #
################################################################

################################################################
# You get used to the pager in mutt, but you could change it   #
# and read everything with 'more' or 'less' by putting the     #
# pathname in here.                                            #
################################################################
set pager="builtin"

################################################################
# unset pager_context                                          #
# Number of lines carried over when new screenful of text.     #
################################################################
set pager_context=1

################################################################
# set postponed="~/postponed" This is where postponed stuff    #
# goes. I really dislike having loads of files in my home      #
# directory, so I put everything I can elsewhere.              #
################################################################
set postponed="~/Mail/postponed"

################################################################
# Oh, the excitement: a choice of printers. But this is        #
# probably _not_ what most people want as their default        #
# printer. Be warned!                                          #
################################################################
set print_command="lpr -P lp0"

################################################################
# set quit=yes                                                 #
# Really quit? I hit this by mistake all the time, so..        #
################################################################
set quit=ask-yes

################################################################
# set record=""                                                #
# Where copies of what you send go. Default is nowhere, which  #
# is a bit silly, because the default for whether copies are   #
# made is yes, they are. So you want somewhere to put them.    #
################################################################
set record="=sent"

################################################################
# set save_empty                                               #
# If unset, removes empty mail folders. If you have a -lot- of #
# folders, saving empty folder names makes the file browser    #
# way too big. So...                                           #
################################################################
unset save_empty

################################################################
# set smileys="(>From )|(:[-^]?[][)(><}{|/DP])"                #
# Mutt's -strangest- option! Some people like to highlight     #
# quoted text. Other people use :> as smileys. This option is  #
# here to let you try to separate out the quotes from the      #
# smileys. If you don't understand the regular expression,     #
# rest assured you're not alone...                             #
################################################################

################################################################
# set sort=date-sent                                           #
# You could do this, or sort by date-received, or by threads,  #
# or by from, mailbox-order, score, size, subject, or who it's #
# to. Threads is -really- good for mailing lists. Because I    #
# want different folders to be sorted differently, see below   #
# where the folder-hooks are.                                  #
################################################################

################################################################
# set to_chars="+TCF"                                          #
# How to highlight mail to you. I dislike these. I know they   #
# are to me: that's why they're in my mailbox! So off they go. #
# Note that the 'default' which I have quoted is wrong: it     #
# should have five characters, not four. This is now fixed,    #
# but older /etc/Muttrc files may still have that. The manual  #
# tells you what five groupings these are.                     #
################################################################
set to_chars="     "

################################################################
# IMAP: don't use it, so no clue.                              #
################################################################

################################################################
# PGP: I have this, but I don't use it much. It seems to       #
# work okay with the default options though. I recently        #
# switched to GnuPG, which meant changing a few things. I'm    #
# still not sure I have them quite right, so I'm leaving them  #
# out for now.
################################################################

################################################################
# Colours                                                      #
#                                                              #
# Goodness knows. I either read mutt on a plain black/white    #
# screen or in X, where I like transparent terminals with the  #
# background picture showing through. So I don't use colour.   #
#                                                              #
# A note here for those who start mutt in X and get a set of   #
# defaults that bear no resemblance to what they have in any   #
# file. Type 'mutt -v' or 'mutt --version' and you'll get a    #
# list of things. Does it say mutt [ncurses] or mutt [slang]?  #
# It will be one or the other. If it's slang, here's what I    #
# had to do in order to get my normal backgrounds to show      #
# through: if you are using bash as a shell (probably, if you  #
# are using Linux; I think it's pretty standard there) then    #
# type this at your prompt; then start mutt and look. If it    #
# worked, then put the two lines into your .bash_profile.      #
#                                                              #
#		COLORFGBG="default;default"                    #
#		export COLORFGBG                               #
#                                                              #
# Please don't ask me for an explanation or I'll cry.          #
#                                                              #
# I first noticed this when in X. Whether it's necessary for   #
# just reading at the console, I don't know. It doesn't hurt,  #
# certainly.                                                   #
################################################################

################################################################
# Folder-hooks: or options which vary with folder.             #
#                                                              #
# For some of the options above, I want things to vary by      #
# folder. Mutt is very flexible like this. You can have all    #
# sorts of hooks: save-hooks, send-hooks, and folder-hooks. I  #
# don't use the first two (yet), but these folder-hooks might  #
# give you some ideas.                                         #
#                                                              #
# Some basics:                                                 #
#       . means every folder                                   #
#       = or + in front of a name means it's a mail folder     #
#    which is in your MAILDIR -- your mail directory. This is  #
#    probably ~/Mail.                                          #
#                                                              #
# Mutt goes through them in order, applying them successively. #
# So for each folder-hook you define, have a default. If you   #
# don't have a default for a folder, mutt will just apply the  #
# folder-hooks it was last using. This can be... unfortunate.  #
# That's where (and why) the . becomes very handy: you can set #
# it to something innocuous and safe.                          #
################################################################

################################################################
# First folder-hook: sorting mail in different folders. What   #
# order do you want your email in? Threading is fantastic      #
# for lists: it's absolutely the best option, IMO. If folder-  #
# hooks didn't exist, and I had to choose one option for all   #
# folders, I'd use threading. But I don't really like it for   #
# some other folders. Luckily, folder-hooks do exist...        #
#                                                              #
# So first the default. Out of the long list of mailboxes I    #
# defined at the top of the file, I want the majority of them  #
# threaded. So that sounds like the best default for me:       #
################################################################

folder-hook . set sort=threads

################################################################
# Now the exceptions:                                          #
#                                                              #
# For personal email, I want to see what's arrived in what     #
# order in one folder, and I want to see when I sent things in #
# the other. So those two are easy and we'll get those out of  #
# the way first. (By the way, the sent folder isn't in the     #
# mailbox line because I don't want mutt to tell me about new  #
# mail in it.)                                                 #
################################################################

folder-hook /var/spool/mail/hobbit set sort=date-received
folder-hook =sent set sort=date-sent

################################################################
# Now I have a mailbox which is more complicated. In the       #
# IN.cvs-commits mailbox, many many messages arrive constantly #
# and I am only interested in messages about five or six       #
# things. Luckily, those things are mentioned in the subject   #
# line. So I score by subject contents, assigning 1 to things  #
# I'm interested in, and nothing to things I'm not bothered    #
# about. Then I sort this mailbox by score, and the things I   #
# want to know about are at the top.                           #
#                                                              #
# If instead of adding 1 to "good" subjects, I subtracted 1    #
# from the other subjects, I believe Mutt won't show those     #
# with negative numbers. I haven't tried.                      #
#                                                              #
# Sorting by score relies on using a special set of patterns   #
# which can be found in section 4.2 of the manual. Be warned,  #
# however, that three of those are not used: ~b, ~B and ~h.    #
# This is to be considered a feature: it increases speed :)    #
#                                                              #
# For the curious with no manual (how?) ~e matches the sender  #
# field and ~s matches the subject. You put the twiddle and    #
# what it should match in single quotes, and put the score to  #
# assign to that after it. Then it all goes into double        #
# quotes.                                                      #
################################################################

folder-hook IN.cvs-commits set sort=score
folder-hook IN.cvs-commits "unscore *"
folder-hook IN.cvs-commits "score '~s gnome-core' 1"
folder-hook IN.cvs-commits "score '~s gnome-libs' 1"
folder-hook IN.cvs-commits "score '~s gnome-docu' 1"
folder-hook IN.cvs-commits "score '~s desktop-docs' 1"
folder-hook IN.cvs-commits "score '~s white-papers' 1"
folder-hook IN.cvs-commits "score '~s crescendo' 1"

################################################################
# It's also possible to score by other things. For example,    #
# when I am subscribed to two lists called "junk-not" and      #
# "junk", I have them in the same mailbox. One has an extra    #
# header. So I use:                                            #
#                                                              #
# folder-hook IN.junk set sort=score                           #
# folder-hook IN.junk "unscore *"                              #
# folder-hook IN.junk "score '~e junk-not' 1"                  #
#                  ...for those.                               #
################################################################

################################################################
# Altering the index appearance in different folders           #
#                                                              #
# This is the index_format from earlier in the file. In the    #
# manual, you'll find the syntax and all the complicated       #
# patterns you can use under the description of index_format   #
# in section 6.                                                #
#                                                              #
# Here's the default:                                          #
# index_format= "%4C %Z %{%b %d} %-15.15L (%4l) %s"            #
#                                                              #
# My pattern-matching is appalling, and I have never been able #
# to work out all of this. However, I can guess, based on how  #
# it appears when I start mutt.                                #
#                                                              #
# For people like me who have their list-email in different    #
# folders, it's unnecessary to see the list name as the sender #
# of the message. I am more likely to want to see the name of  #
# the sender. So I substituted the capital L for a capital F   #
# and that works fine for me. So that's my idea of the default #
# folder-hook.                                                 #
#                                                              #
# For the lists sorted by score (=IN.cvs-commits and =IN.junk) #
# I want to have the score displayed, too, on the left of the  #
# display.                                                     #
#                                                              #
# Because of the way mutt processes quote marks, the folder-   #
# hooks need extra quote marks around them that the standard   #
# variable doesn't need.                                       #
#                                                              #
# So, after all that explanation, spot the differences!        #
# I've left the Muttrc default in, commented out, for          #
# comparison.                                                  #
################################################################

# default is   set index_format="%4C %Z %{%b %d} %-15.15L (%4l) %s"
folder-hook . 'set index_format="%4C %Z %{%b %d} %-15.15F (%4l) %s"'
folder-hook IN.junk 'set index_format="%2N %2C %Z %{%b %d} %-15.15F (%4l) %s"'
folder-hook IN.cvs-commits 'set index_format="%2N %2C %Z %{%b %d} %-15.15F (%4l) %s"'

################################################################
# Saving accoring to folder-hooks.                             #
#                                                              #
# There is a _much_ better way to do this if you want to save  #
# stuff based on which person sent it. It's the save-hook      #
# itself. Because I tend to save things depending on what      #
# _folder_ it's in, I use a folder-hook.                       #
#                                                              #
# Again, there's a default catch-all at the top (the dot)      #
#                                                              #
# The folder-hooks are very simplistic: the * matches          #
# everything in the folder!                                    #
#                                                              #
################################################################

folder-hook . save-hook * =received
folder-hook IN.asatru save-hook * =asatru
folder-hook IN.bugtraq save-hook * =bugtraq
folder-hook IN.cvs-commits save-hook * =cvs-commits
folder-hook IN.gnome-list save-hook * =gnome-list
folder-hook IN.gnome-doc-list save-hook * =gnome-doc-list
folder-hook IN.junk save-hook * =junk
folder-hook IN.linuxchix save-hook * =linuxchix
folder-hook IN.mutt-users save-hook * =mutt-users
folder-hook IN.rh-announce save-hook * =rh-announce
folder-hook IN.techwriters save-hook * =techwriters
folder-hook IN.testing save-hook * =testing
folder-hook IN.ukpmla save-hook * =ukpml
folder-hook IN.wm-user save-hook * =wm-user

################################################################
# I could have used this instead for the mailing lists:        #
# save-hook ~l =%B                                             #
# This matches anything coming from a list (~l) and saves it   #
# to a folder called whatever the mailing list was called.     #
# But I didn't because I'm bad at pattern-matching and my way  #
# is more legible to me when I look at it.                     #
################################################################


################################################################
# The end.                                                     #
#                                                              #
# What, you're still reading? No, really, it's finished. I     #
# don't know any more. :)                                      #
#                                                              #
# If you are curious about the folders and how email ended up  #
# there, then you might want to have a look at my procmailrc,  #
# which is what splits email up into folders for me. It is not #
# mutt's job. Mutt just deals with the email once it hits the  #
# folders.                                                     #
#                                                              #
# I hope you learned something, even if it was only that some  #
# people (like me, perhaps?) have most peculiar methods of     #
# dealing with their email. Have fun, borrow, rewrite, and     #
# please don't blame me if you do strange and wonderful things #
# to how mutt displays your email. Unlike a .procmailrc, this  #
# is a fairly safe file to experiment with. You really have to #
# -try- to end up doing bad things to your email with mutt;    #
# whereas procmail has that capacity as a sort of intrinsic    #
# property...                                                  #
#                                          -- Telsa            #
################################################################

Reply to: