Mutt filters..

Kurt Granroth kurt@granroth.org
Tue, 27 Feb 2001 14:59:53 -0700


Steven M. Klass wrote:
> I browsed TFM and came up short..  Can someone point me on how to
> automagically copy a message from *@xyz.com to another folder in
> mutt.  I am really trying to set this up as my default MUA.  I like
> it so far but I definitely have some questions.

Offhand, I believe you are looking for the 'mbox-hook' keys.  However,
I would suggest that you don't use mutt for that.  What you are
describing is mail filtering and programs like 'procmail' do a much
better job of that.

For instance, I get several hundred emails per day.  I have a set of
procmail "recipies" that process each mail and decides where it should
go.  When I get one from 'plug-discuss@.*', it automatically moves it
to my Mail/plug-discuss mail folder.

> Also how can I set my "from" line.  It want to call
> machinename.domainname.com instead of domainname.com.
> 
> PS I am using qmail..  If that matters for part two anyway?
 
It's best to do this in two steps.  To get mutt to use your custom
header, insert this line into your .muttrc:

  my_hdr From: Steven Klass <user@domainname.com>

Doing that used to be enough.  Unfortunately, quite a few mail servers
out there now don't like invalid From (not From:) headers.  As a
result, you need to get qmail to add a correct one.  To do that, add
this to some random rc file:

export QMAILSHOST=<your real domain name>
export QMAILSUSER=<your user name>

The end result of $QMAILSUSER@$QMAILSHOST must be a valid email
address.
-- 
Kurt Granroth            | http://www.granroth.org
KDE Developer/Evangelist | SuSE Labs Open Source Developer
granroth@kde.org         | granroth@suse.com
            KDE -- Conquer Your Desktop