Hello list's friends. I'm sorry for writting same message third time, but please be patient with me - I have about 200 spam messages a day so I REALLY need to block them.
I have FreeBSD box with sendmail+spamassassin+procmail. As it comes more and more spam messages I realize to prepare rules for spam deletion. I have done 3 months work on spam mesgs+senders+scores analysis. Now I'm ready to do it, but I'm not familiar with procmail. I want to write rules, which will do following: 1. check if the X-Spam-Level is more than 15 2. retrieve the sender domain from Form: header 3. compare sender domain against freemails.txt, where are all big freemail sites listed, as it is bad idea to stop (e.g.) whole yahoo.com 4. if sender is not there, add sender domain to the ACCESS database with "REJECT 550 Stop Spam" 5. delete the spam message 6. spams marked with score 10 should be resent to [EMAIL PROTECTED] Please help me with these rules, because I can not make them work - it's only an idea: ACCESS=/etc/mail/access FREEMAILS=/etc/mail/freemails.txt AWK=/usr/bin/awk TEST=/bin/test EGREP=/usr/bin/egrep FMAIL=/usr/local/bin/formail STOP_SPAM="550 Stop Spam" DOMAIN=`${FMAIL} -x From: | ${AWK} -F@ '{ print $2 }' | ${AWK} -F '>' \ '{ print $1 }'` IS_FREEMAIL=`${EGREP} ${DOMAIN} ${FREEMAILS} | wc -l` #score 15+ = add domain to access dbase and delete :0 h : * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* * ? eval ${TEST} ${IS_FREEMAIL} -gt 0 | echo ${DOMAIN} ${STOP_SPAM} >> ${ACCESS} ; :0 A /dev/null :0 h : * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\* ! [EMAIL PROTECTED] The problem is, I can not make work neighter the simplest last rule. It is invoked 25 times and dies with "Too many hops (26)" message. I think it's simple loop, so I try for 3 days to make it work while looking around whole internet to find the solution. The first rule I have written by my own also can not work. PLEASE, HELP ME. Peter Rosa _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" ------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk