[1829] in athena10
mutt config
daemon@ATHENA.MIT.EDU (Greg Price)
Tue Mar 24 02:40:57 2009
Date: Tue, 24 Mar 2009 02:39:49 -0400
From: Greg Price <price@MIT.EDU>
To: debathena@mit.edu
Message-ID: <20090324063948.GD15690@mit.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
I've taken a look at the Muttrc provided in the sipb locker and
compared it to the system Muttrc.
The file stripped of comments and blank lines, as broder pasted into
Trac, is 21 lines. Fortunately most of that is already in the system
Muttrc. The parts we would add if we followed the sipb locker are
"""
set folder="imap://$USER@`hesinfo $USER pobox | awk '{print $2}'`"
set imap_headers="X-Spam-Score"
set query_command = "athrun sipb mutt_ldap_query.pl %s"
set record=""
set sort=threads
set spoolfile="imap://$USER@`hesinfo $USER pobox | awk '{print $2}'`"
set use_domain=no
spam "X-Spam-Score:.(.*)" "%1"
"""
All commands and variables are documented on the web [1]. I've also
pasted the comments from the config file, including default values, at
the bottom of this message.
[1] http://www.mutt.org/doc/devel/manual.html
These lines can be sorted like so:
================================
Using MIT IMAP
--------------
set folder="imap://$USER@`hesinfo $USER pobox | awk '{print $2}'`"
set spoolfile="imap://$USER@`hesinfo $USER pobox | awk '{print $2}'`"
set record=""
$folder is the root of the user's mail tree. $spoolfile is the inbox;
I'd set it to just "+INBOX", where "+" is a Mutt abbreviation for the
value of $folder.
Recommendation: definite keep.
This setting of $record is dangerous -- it means that mail you send is
forgotten, with no local copy. This bit me for my first few days at
MIT, using sipb-locker mutt. The upstream default is "~/sent", which
at least means the mail is saved, though not in an optimal place.
I set it to +INBOX.sent-mail, which is my own idiosyncratic choice.
Recommendation: leave default, unless there's a justifiable "MIT
mail" convention; does webmail pick a sent-mail folder?
Using MIT spam filtering
------------------------
set imap_headers="X-Spam-Score"
spam "X-Spam-Score:.(.*)" "%1"
See http://www.mutt.org/doc/devel/manual.html#spam for explanation.
The second line means that each message will have a "spam tag"
consisting of its X-Spam-Score value. Then people who choose to do so
can put the spam tag in their index view, or filter on it, or sort by it.
For Mutt itself the spam tag is a totally opaque string.
The first line tells mutt to fetch "X-Spam-Score" when it fetches all
the messages' headers for the index, so the second line can work.
Probably few people will use this without knowing the documentation
well and being quite able to configure it themselves, so the gain is
not huge. The extra header adds some cost to opening a mailbox. Our
intervening with a setting could be justified by the fact that
X-Spam-Score is a site-local feature of MIT email accounts.
Recommendation: maybe keep.
Sending to sane email addresses
-------------------------------
set use_domain=no
This means that if I send mail to "jdreed" it goes to sendmail with
"To: Jonathan D Reed <jdreed>" (*), so that the mail system can decide
who that means. If I've installed debathena-msmtp-mta or otherwise
send the mail through MIT, that means jdreed@mit.edu. If I've left
this machine to deliver mail locally, it'll go to the local account by
that name, as the default would have done.
(*) mutt checks the passwd database to get realnames.
Recommendation: keep.
Using MIT LDAP
--------------
set query_command = "athrun sipb mutt_ldap_query.pl %s"
See http://www.mutt.org/doc/devel/manual.html#query .
In its present form this can run something from the sipb locker, which
we won't do. The script it invokes is from upstream's contrib, with
chiefly these configuration lines:
my $ldap_server = "ldap.mit.edu";
my $search_base = "dc=mit,dc=edu";
my $LDAPSEARCH="/usr/athena/bin/ldapsearch -Q";
In principle we could depend on lbdb, which packages this script in
Debian, and the script naturally can be configured from the command
line or with a config file. But that seems like a lot of added
complexity for fairly little gain -- this is a feature I've never used.
If someone sees a simpler way so that we're only supplying roughly the
strings "ldap.mit.edu" and "dc=mit,dc=edu", and not extra software,
on the other hand, then probably we should do that.
Recommendation: probably drop.
Personal preference
-------------------
set sort=threads
I set this value myself. But Debathena shouldn't.
Recommendation: drop
================================
Comments welcome. I'll commit a version of this later this week if
the discussion has settled. There is a .d mechanism, so it only means
dropping a file in place.
Greg
================ settings from sipb Muttrc, commented ================
set folder="imap://$USER@`hesinfo $USER pobox | awk '{print $2}'`"
#
# Name: folder
# Type: path
# Default: "~/Mail"
#
#
# Specifies the default location of your mailboxes. A `+' or `=' at the
# beginning of a pathname will be expanded to the value of this
# variable. Note that if you change this variable from the default
# value you need to make sure that the assignment occurs before
# you use `+' or `=' for any other variables since expansion takes place
# during the `set' command.
set imap_headers="X-Spam-Score"
#
# Name: imap_headers
# Type: string
# Default: ""
#
#
# Mutt requests these header fields in addition to the default headers
# ("DATE FROM SUBJECT TO CC MESSAGE-ID REFERENCES CONTENT-TYPE
# CONTENT-DESCRIPTION IN-REPLY-TO REPLY-TO LINES X-LABEL") from IMAP
# servers before displaying the index menu. You may want to add more
# headers for spam detection. Note: This is a space separated list.
set query_command = "athrun sipb mutt_ldap_query.pl %s"
#
# Name: query_command
# Type: path
# Default: ""
#
#
# This specifies the command that mutt will use to make external address
# queries. The string should contain a %s, which will be substituted
# with the query string the user types. See ``query'' for more
# information.
set record=""
#
# Name: record
# Type: path
# Default: "~/sent"
#
#
# This specifies the file into which your outgoing messages should be
# appended. (This is meant as the primary method for saving a copy of
# your messages, but another way to do this is using the ``my_hdr''
# command to create a Bcc: field with your email address in it.)
#
# The value of $record is overridden by the ``$force_name'' and
# ``$save_name'' variables, and the ``fcc-hook'' command.
set sort=threads
#
# Name: sort
# Type: sort order
# Default: date
#
#
# Specifies how to sort messages in the index menu. Valid values
# are:
#
# date or date-sent
# date-received
# from
# mailbox-order (unsorted)
# score
# size
# spam
# subject
# threads
# to
#
# You may optionally use the reverse- prefix to specify reverse sorting
# order (example: set sort=reverse-date-sent).
set spoolfile="imap://$USER@`hesinfo $USER pobox | awk '{print $2}'`"
#
# Name: spoolfile
# Type: path
# Default: ""
#
#
# If your spool mailbox is in a non-default place where Mutt cannot find
# it, you can specify its location with this variable. Mutt will
# automatically set this variable to the value of the environment
# variable $MAIL if it is not set.
set use_domain=no
#
# Name: use_domain
# Type: boolean
# Default: yes
#
#
# When set, Mutt will qualify all local addresses (ones without the
# @host portion) with the value of ``$hostname''. If unset, no
# addresses will be qualified.