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/bashBR formail -s procmail < /var/spool/mail/myusernameBR rm /var/spool/mail/myusernameBR 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 existsBR
mailboxes =almost-certainly-spamBR mailboxes =from #optionalBR mailboxes =mboxBR mailboxes =probably-spamBR
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 existsBR DEFAULT=$MAILDIR/mbox #this is the default mailbox in the .muttrc file.BR LOGFILE=$MAILDIR/fromBR LOCKFILE=$HOME/.lockmailBR
# The lock file ensures that only 1 spamassassin invocation happensBR
# at 1 time, to keep the load down.BR
#BR
:0fw: spamassassin.lockBR
- < 256000BR
/usr/bin/spamassassinBR |
# 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 aBR
# different mbox. (This one is optional.)BR
:0:BR
- ^X-Spam-Level: \\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*
*BR
# /dev/nullBR almost-certainly-spam #this is the mailbox in the .muttrc fileBR
# 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: YesBR
probably-spam #this is the mailbox in the .muttrc fileBR
# Work around procmail bug: any output on stderr will cause the "F" in "From"BR
# to be dropped. This will re-add it.BR
:0BR
^^rom[][BR]
{BR
LOG="*** Dropped F off From_ header! Fixing up. " BR
:0 fhwBR
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.