Click to See Complete Forum and Search --> : Trying to figure out procmail with spamassassin
ianshot
06-15-2003, 09:02 PM
I use a server where they installed Spam Asssassin the other day. It puts *****SPAM***** in the subject line. I use Pine to check my mail. I'd like to figure out a way to put all the messages that Spam Assasin marks as spam in a different folder under Pine. I've been reading Procmail websites all afternoon and am more confused than I was when I started.
Does anyone have a good easy to understand (for a non-programmer) something I can read to figure out how to make it do what I need it to do. Thank you.
Ian.
cnjohnson
06-16-2003, 11:00 AM
Originally posted by ianshot
I use a server where they installed Spam Asssassin the other day. It puts *****SPAM***** in the subject line. I use Pine to check my mail. I'd like to figure out a way to put all the messages that Spam Assasin marks as spam in a different folder under Pine. I've been reading Procmail websites all afternoon and am more confused than I was when I started.
Does anyone have a good easy to understand (for a non-programmer) something I can read to figure out how to make it do what I need it to do. Thank you.
Ian.
Sorry, but I am confused. Are you asking about pine (i.e., how do I get pine to organize e-mail by header content), or are you asking about running sendmail and procmail and spamassassin together to support pine on your own?
Sorry about my confusion.
Cheers--
Charles
ianshot
06-19-2003, 09:11 AM
What I am trying to do, is get all my e-mail dumped into a folder if it has the subject line *****SPAM*****, then when I ssh into the server and go into pine I only see the actual e-mail, and all the spam is in the Spam folder.
Does that make more sense?
I noticed that when i posted the original, it really did not make a lot of sense.
cnjohnson
06-20-2003, 09:46 AM
Originally posted by ianshot
What I am trying to do, is get all my e-mail dumped into a folder if it has the subject line *****SPAM*****, then when I ssh into the server and go into pine I only see the actual e-mail, and all the spam is in the Spam folder.
Does that make more sense?
I noticed that when i posted the original, it really did not make a lot of sense.
Makes perfect sense. I assume that your server is running sendmail and spamassassin. So, all you need to do is wrtie a procmail script that will direct all spam to a particular directory.
You can read the spamassassin docs, since there is such a sript in the docs, or you can read docs about procmail scripts (lots of help there, too).
If you get stuck, hollar back at me.
Cheers--
Charles
Yinchie
06-20-2003, 10:18 AM
You could use procmail to filter those tagged emails to a different folder.
:0
* ^X-Spam-Flag: Yes
$SPAMDIR
When a message is tagged as spam by SpamAssassin it also ads a extra header in the email message, which is X-Spam-Flag.
So procmail can check if a email message has this header and if so it puts them into $SPAMDIR, offcource you define this dir first.
Here is the exact procmail code I have.
:0fw: spamassassin.lock
* < 256000
| $SPAMASSASSIN
:0e
{
EXITCODE=75 HOST
}
:0
* ^X-Spam-Flag: Yes
/dev/null