You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by Apache Wiki <wi...@apache.org> on 2006/01/30 07:33:32 UTC

[Spamassassin Wiki] Update of "UsingMutt" by Widgeteye

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Spamassassin Wiki" for change notification.

The following page has been changed by Widgeteye:
http://wiki.apache.org/spamassassin/UsingMutt

New page:
'''UsingMutt''' BY Widgeteye

larrywyb/at/widgeteye.homeip.net



This is how '''I''' use Mutt and procmail. Whether it is the accepted way
I don't know but it ''''works'''' for me.

in the .forward file I have;

"|/usr/bin/procmail -f- || exit 75 #myusername"

#2) "|IFS=' ' && exec /usr/bin/procmail -f- || exit 75 #myusername"

For some reason the accepted line (#2) wouldn't work, I don't know if it's
because I use exim as mta or what but the line above that did work.

'''I have an executable file that calls Mutt, in that file I have;'''

-------------
#!/bin/bash[[BR]]
formail -s procmail < /var/spool/mail/myusername[[BR]]
rm /var/spool/mail/myusername[[BR]]
mutt -y
-------------

Check man mutt to figure out the -y option.

'''In the .muttrc you need the following lines;'''

----------------------------
set folder=$HOME/mail    #Make sure this directory exists[[BR]]

mailboxes =almost-certainly-spam[[BR]]
mailboxes =from #'''optional'''[[BR]]
mailboxes =mbox[[BR]]
mailboxes =probably-spam[[BR]]
----------------------------

You'll notice these mailboxes match a couple of the mailboxes in the .procmailrc
file. '''''REMEMBER''''', every time you change a mailbox in the .procmail file 
you have to make the same change in the .muttrc file.  

Here's what I have in the .procmailrc file;

--------------------
PATH=/usr/bin:/bin:/usr/local/bin:.[[BR]]
MAILDIR=$HOME/mail      # You'd better make sure it exists[[BR]]
DEFAULT=$MAILDIR/mbox #'''this is the default mailbox in the .muttrc file.'''[[BR]]
LOGFILE=$MAILDIR/from[[BR]]
LOCKFILE=$HOME/.lockmail[[BR]]


# The lock file ensures that only 1 spamassassin invocation happens[[BR]]
# at 1 time, to keep the load down.[[BR]]
#[[BR]]
:0fw: spamassassin.lock[[BR]]
* < 256000[[BR]]
| /usr/bin/spamassassin[[BR]]

# Mails with a score of 15 or higher are almost certainly spam (with 0.05%[[BR]]
# false positives according to rules/STATISTICS.txt). Let's put them in a[[BR]]
# different mbox. (This one is optional.)[[BR]]
:0:[[BR]]
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*[[BR]]
# /dev/null[[BR]]
almost-certainly-spam #'''this is the mailbox in the .muttrc file'''[[BR]]


# All mail tagged as spam (eg. with a score higher than the set threshold)[[BR]]
# is moved to "probably-spam".[[BR]]
:0:[[BR]]
* ^X-Spam-Status: Yes[[BR]]
probably-spam #'''this is the mailbox in the .muttrc file'''[[BR]]

# Work around procmail bug: any output on stderr will cause the "F" in "From"[[BR]]
# to be dropped.  This will re-add it.[[BR]]
:0[[BR]]
* ^^rom[ ][[BR]]
{[[BR]]
  LOG="*** Dropped F off From_ header! Fixing up. " [[BR]]
 
  :0 fhw[[BR]]
  | sed -e '1s/^/F/'[[BR]]
}[[BR]]

-------------
If you have questions I don't mind answering if I can. Write me at the email address at the top of the page.

And yes I know this page is ugly.   :)