if you are just using fetchmail to get your mail you can call procmail straight from there and bypass sendmail with this line:at the bottom of your ~/.fetchmailrc file
Code:
mda "/usr/bin/procmail -f %F -d %T";
for sendmail
i think all you need to use is this macro in the .mc file
(as i said earlier i dodn't use sendmail so i am out on a linb here)
FEATURE(`local_procmail', `/usr/bin/procmail')
(adjust path)
you can find tutorials around on the net for using m4 on a .mc file to create a new .cf file for sendmail
make sure you are using instructions for your version of sendmail
and back up the old .cf before you try a new one so you don't loose it
first stop sendmail
if i remember correctly redhat uses the file
/etc/mail/sendmail.mc
you put the macro in there
then after backing up the /etc/mail/sendmail.cf file
run:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
then restart sendmail
either way you get it going
now you need a ~/.procmailrc file
this one is mine it puts my spam in a mail file $HOME/mail/spam
you can put it anywhere or if you are running an imap server and have some folders or whatever
and i'm not running spammassassin as a daemon !
not sure if t's the same or what.
Code:
:0fw:spamassassin.lock
| spamassassin :0e
EXITCODE=$?
:0:
* ^X-Spam-Flag: Yes
$HOME/mail/spam