OK, so I've got fetchmail set up now and it seems to pull messages from my
ISP's POP server into a file (called username), in /var/spool/mail.
Though it does insist on downloading all the same e-mails every time it
polls??
fetchmailrc
---------------
# Put here each user config
set postmaster "greg"
set bouncemail
set no spambounce
#set properties ""
set daemon 120
#set syslog
poll pop.dsl.pipex.com
tracepolls
proto pop3
user "mfsj30%dsl.pipex.com"
pass "oofoouch"
is greg here
and wants mda /usr/bin/procmail
keep
---------------
Now I'm trying to get procmail to run spamassassin and bogofilter.
procmailrc:
---------------
VERBOSE=on
SHELL=/bin/sh
LINEBUF=4096
PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin
MAILDIR=$HOME/Mail
DEFAULT=$MAILDIR/inbox
LOGFILE=$HOME/procmail.log
##ADMINFOLDER=$MAILDIR/admin
##BULKFOLDER=$MAILDIR/bulk
#FORMAIL=/usr/bin/formail #no idea what formail is?
##LOCKEXT=.lock
##SENDMAIL=/usr/sbin/sendmail
INCLUDERC=$HOME/recipe.rc
---------------
recipe.rc
---------------
## First run stuff through bogofilter
:0fw
| bogofilter -u -e -p -l
## If bogofilter fails, throw the mail back into the pipe ## e=only
execute if preceeding recipe executed and failed
:0e
{ EXITCODE=75 HOST }
## if its spam, put it in the caught folder
:0:
* ^X-Bogosity: Yes
spam
## If it passed, try it through spamassassin.
:0 fw
* < 256000 #What's this for?
| /usr/bin/spamc #spamassassin
##If spam, pass to Bogofilter and spamcan
:0
* ^X-Spam-Status: Yes
{
:0cw
| /usr/bin/bogofilter -S
:0
spam
}
###
## Accept all the rest to default mailbox
:0:
| inbox
---------------
Training bogofilter, using:
[root@atlantic Mail]# bogofilter -s < spam/cur
returns:
stdin: Is a directory
I've tried running bogofilter -s as the user but it cannot find the
bogofilter when I do that.
The spam mail should go to ~/Mail/spam/cur
Cheers,
Greg
|