View Full Version : Procmail

12-17-2007, 08:28 AM
I am completly novice to procmail. I was told by westhost to look here...

I am the IT admin for my SMALL comapny with about 40-50 email accounts on a couple different domains...

I have spamassassin installed, and would like to have anything with "***SPAM***" automatically deleted BEFORE it gets to the in box... the reason is, I have several mobile devices that receive e-mail and I am getting ALOT of complaints about spam on the phones... In outlook its easy to setup rules and delete everything that has spam in the subject line..

so i asked the westhost tech support and they pointed me here...

I don't know how to edit or configure the procmail file... I am a hardware guy, not a software guy, but I guess now is a good time to learn...

can somebody walk me through this?


12-17-2007, 08:50 PM
Have a look at the email pages at Jalal's site: http://codeworks.gnomedia.com/westhost-introduction/email-system-part-1-the-main-components/
There are two pages. On the second page it mentions a procmail rule that you can use to delete spam of a certain level. I'll go ahead and post the rule here since on Jalal's site it is not displaying in the right format at the moment:

* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
That well delete any message that has been run through SA that has a score of 10 or more. The * (stars/asterisks) are the "score" if you wanted to lower the score used then you would decrease the amount of *

This rule should be added to /ect/procmailrc file at the end after the # END SPAMASSASSIN BLOCK line.

If you want to activate it on a per user basis you would create an /ftp/pub/username/.procmailrc file and add the rule to it.

You need to use a plain text editor to create or edit these files. Notepad on Windows can be used or I would suggest downloading the free EditPlus (http://www.editplus.com/) or Crimson (http://www.crimsoneditor.com/) programs. I use EditPlus.