Date: Wed, 22 Oct 2003 17:02:05 +0200 From: "Peter Rosa" <prosa@pro.sk> To: "FreeBSD Questions" <freebsd-questions@freebsd.org> Subject: Procmail Rules - please help Message-ID: <00a501c398ad$74d6bc60$3501a8c0@pro.sk>
next in thread | raw e-mail | index | archive | help
Hello list's friends. 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 very familiar with procmail. I prepared the following list 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 my own list (freemails.txt), where are all big freemail sites listed. 4. if sender is not there, add sender domain to the ACCESS database with REJECT 550 Stop Spamming 5. delete the spam message 6. spams marked with score 10 should go to quarantene. Please help me with second rule, as it can not work - it's only an idea: FREEMAILS=`cat /etc/mail/freemails.txt` SENDERDOMAIN=`egrep From: - | awk -F@ '{ print $2 }'` :0: * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* * ${SENDERDOMAIN}<>${FREEMAILS} | echo '${SENDERDOMAIN}\t\t550 Stop Spamming' >> /etc/mail/access :0: * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* /dev/null :0: * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\* ! spam-lover@my_domain.com Any solution is very welcome :-) Peter Rosa
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00a501c398ad$74d6bc60$3501a8c0>