Click to See Complete Forum and Search --> : procmail help


Nobody's Hero
02-26-2004, 12:58 PM
Here is my procmail file. It works pretty well, but I want to make some changes. See the comments.


## Pipe all incoming mail through spamassassin
## spamassassin is a resource hog.
## I want it to only filter messages under a certain size.
## How do I do this?
0fw
| /usr/bin/spamassassin


## If somethins is SPAM, let them know.
:0
* ^X-Spam-Flag: YES
| (formail -r; \
echo "This is an auto-generated reply."; \
echo "This mail was identified as SPAM."; \
echo "Mail rejected; it will never be read." ) \
| sendmail -t -oi

## Delete all SPAM.
:0
* ^X-Spam-Flag: YES
/dev/null

## I get a lot of bounce backs replying to SPAM.
## This deletes them.
## This deletes all bounce backs I think...
## It would be better to search the body for the above text.
## How do I do this?
:0
* ^To: <myusername@localhost.localdomain>
/dev/null

## Forward a copy of all mail to my handheld.
## Also keeps a local copy.
## I sometimes send myself email from myhandheld.
## How do I prevent forwarding emails that come from my handheld to my handheld?
:0c
! myusername@tmo.blackberry.net

Nobody's Hero
03-09-2004, 02:04 PM
up!

Anyone? Procmail is very confusing.

Is there a good resource someone could atleast point me to? Most of the website I've gone to don't seem to help.


EDIT: Also, instead of going through spamassassin, it's quicker to go through spamc, correct? As long as spamd is running, is that the only change I need to make?

mdwatts
03-09-2004, 02:30 PM
Sorry as I don't use either.

Have you tried searching G4L for ?? ''spamassassin procmail' (http://www.google.com/linux?hl=en&lr=&ie=ISO-8859-1&q=spamassassin+procmail&btnG=Google+Search)? There looks to be quite a few how-to's.

Nobody's Hero
03-09-2004, 09:36 PM
a G4L'ed for procmail tutorials and recipes, and all I found were a bunch of way too detailed examinations... the spamassassin and procmail combo you suggested worked great... i found this page which was very useful:

http://sharkysoft.com/tutorials/linuxtips/spam/

i still need to know how to not forward mail from my hanheld back to my handheld... i'll work on that and post back if i figure it out...