[TAG] Getting started with mutt
Benjamin A. Okopnik
ben at linuxgazette.net
Mon Aug 14 06:19:47 MSD 2006
On Sun, Aug 13, 2006 at 09:07:20PM -0400, Claude Sutton wrote:
> I have made the change.
>
> There is a lot to learn to get it the way I want it.
>
> I hate spam. I ran bogofilter on Evolution and it worked great, so I
> have been working on getting that set up with mutt.
>
> I have 99% of it. Bogo gets the email, gives it a grade, which is shown
> properly in the headers. Bad stuff gets 1 and good stuff gets 0.
What do you mean by "Bogo gets the email"? When we last saw Batman, the
Penguin had him tied up like this:
``
fetchmail -> procmail -> mutt
''
If you describe where and how you added 'bogofilter', then we might be
able to help you.
I'm going to take a wild guess - feel free to correct me if I've got it
wrong - and figure that you meant "bogo marks up the email via these
macros that I've set up". If that's what you mean, then that's not going
to help you much, except to 'teach' bogofilter to reject such mail in
the future; assessing it for spam quotient and sorting it based on that
has to happen before it ever gets to Mutt.
> The macros do not work. I get the beep.
That doesn't necessarily mean that the macros didn't work; my macro for
black-/white-listing mail does nothing visible and produces a beep, but
it saves the address in the appropriate file anyway.
> By his instructions, I have this in .muttrc:
>
> The heart of the problem is that I do not know how to set up a mailbox
> system.The macros can not work because the file system is not correct.
No. The macros aren't doing what you want them to do because computers
can't go backwards in time. :)
> I would like to have the following mailboxes:
>
> inbox
> family
> trash
> saved
>
> I have a ~/Mail and in it I have those files, but mutt does not like my
> ieas.
That's because ~/Mail is not the standard mailbox location; it's the
place where you save your sent mail, etc. The standard location is -
ready for this? - '/var/mail'. That's where you need to create an empty
file for each user. You also need to set the ownership for each of those
files to the user's account name, the group to 'mail', and the
permissions to 0600.
> Help would be appreciated.
>
> When I ran bogo before, I did not have this macro system. I just let
> bog do its own thing, occasionally running a bad word list over it, and
> it worked probably as close to 100% as you can get. So maybe the macros
> are a waste. But dropping them would not change the fact that I do not
> know how to set up a mutt file system. I have spent a lot of time
> googling the problem, but I still don't get it.
Well, for one thing, that's because there's no such thing as 'a mutt
file system'; Mutt uses whatever directories you specify. However, the
problem here is not related to Mutt at all: Mutt is only a mail _client_
(a very clever and capable one, but that's all it is.) The piece of the
process that decides how your email gets distributed is your Mail
Delivery Agent (MDA) - which happens to be 'procmail'. You already know
about ~/.procmailrc - that's where all the decisions about what goes
where get implemented.
So, assuming you've set up the mailboxes you want, you just need to
write some procmail "recipes" to decide what goes where. Here is a
sample configuration for you to consider; obviously, you're going to
need to twiddle the recipes to use the specific names and files that you
want. Also, I use 'spamassassin' rather than 'bogofilter' - but
figuring out the differences should be pretty simple.
```
### Set up some default parameters for procmail
MAILDIR=/var/mail
DEFAULT=$LOGNAME
LOGFILE=/var/log/procmail.log
### Filter everything through Spamassassin
:0fw
| spamassassin -L
### Send everything marked as spam to the 'trash' mailbox
:0:
* ^X-Spam-Status: Yes
trash
### Save family's mail into the 'family' box
:0:
* ^TO_(joe|sid|maggie|sue)
family
### Claude's mail
:0:
* ^TO_(claude|The_Big_Honcho|Linux_guru)
$DEFAULT
'''
You'll also need to create '/var/log/procmail.log', with permissions
loose enough that a process owned by you (i.e., procmail) can write to
it; 666 should work fine.
Again, for more info on writing procmail recipes, see 'man procmailrc'
and 'man procmailex'.
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://linuxgazette.net *
More information about the TAG
mailing list