On Monday 06 October 2003 03:48 pm, Praedor Atrebates wrote: > I am not real up on procmail filter writing (or the cryptic language of > procmail). I have run postfix locally in the past but haven't lately...I > have set it up to run again now. I have never had it work with > spamassassin or procmail before.
Procmail is not that hard to work with, however, if you want to simply the process and have webmin installed, it has a control panel for procmail in the servers tab. You can create recipes there using easy stuff like ^From: whoever and then filter that way for people that you know. I use the List owner header for Expert and Newbie mailing list so I don't need to worry about spoofing, they are more likely to spoof the From header than to spoof the list-owner header. > > Here's what I'm interested in then, and perhaps you could provide hints(?): > > I want all email that _doesn't_ come from someone in my email addressbook > or the expert mailing list to pass through spamassassin. I assume I would > still be using spamd/spamc? How might I create a procmailrc "recipe" to do > the above? Just dinking around I produced something like: > > This first is intended to sidestep spamassassin: > :0f > > * [EMAIL PROTECTED] > * [EMAIL PROTECTED] > * !<an email address> > * !<an email address> > * !<an email address> ...etc... I would write some of these directly to the spool :0H * ^List-Owner: <mailto:[EMAIL PROTECTED]> /var/spool/mail/user That way, you not only skip the spamassassin check but any other recipes that you add subsequently. If you are pretty sure that you want to see the message, that allows you to do so without worrying about extra recipes getting tagged or wasting time routing the mail through any extraneous activities. This is useful for stuff like virus checking recipes like nkvir, if you ever want to use them. So, stuff from my local domain/machine skips the virus check since I am not in the habit of sending viruses to myself. Other messages go through the virus check but may skip spamassassin. Others go through the whole thing. > > | spamc > > This part is intended to have spam routed to /dev/null (based on something > I saw on the web, though I don't know how it would work wrt > spamassassin...perhaps I should have procmail look for some spam tag in the > > headers that spamassassin places?): > :0 H: > > * ^(X-UCIRVINE-SpamCheck:) I use: :0 * ^X-Spam-Flag: YES for spamassassin and then put in dev/null or you can route to a spam folder and screen it before deletion. For myself, anything with a score of 8 or more goes to dev/null and between 4 and 8 goes to a spam folder for checking. > > | /dev/null > > Is this workable or totally offbase? It is workable although you may want to split the email addresses up into separate recipes. It checks them one at a time and once routed, it doesn't need to check them again. If you use procmail to route the mail, put the most frequent sender first, then lesser as follows and that should cut down on processing time, not that you will notice any more anyway since it will all be done in the background. If you are concerned about speed, the faster you dispose of a message, the less time it takes procmail to process and deliver it. -- Bryan Phinney Software Test Engineer
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
