Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jan 2000 09:12:05 -0800 (PST)
From:      wellsian@caffeine.com
To:        Evren Yurtesen <yurtesen@ispro.net.tr>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: filtering spam by name of the sender?
Message-ID:  <Pine.BSF.4.21.0001280744050.81842-100000@smartypants.caffeine.com>
In-Reply-To: <Pine.BSF.4.21.0001281706050.15201-100000@finland.ispro.net.tr>

next in thread | previous in thread | raw e-mail | index | archive | help
Or, in a more cooperative mood: :)

Edit /etc/procmailrc (or whererever it's located on your system) to add
a cheesy kill recipe pair:

--- clip ---
:0 cw
* ! ^from:.*evilhakr@
* ! ^from:.*bum@nomanners\.com     < Two examples of from tests
* ! ^TO_friend@                    < Special TO macro for all "to's"
* ! ^subject: Free Money For Life! < Be specific! Subj. tests scary!
* ! ^received:.*hakyou\.com        < Catch relayed junk
* ! ^received:.*250\.250\.250\.250
/dev/null

:0 E
/dev/null                          < use a filename while testing
--- clip --- Oh, and clip the comments after the "<" above

The "!" logic makes it confusing. Ignore the inversion and it's like this:
If any one of the tests match then drop msg to /dev/null. If none of them
match then the message will continue through the rc. The reason for the
convulution is that all recipe tests are AND'd; pm has no OR capability
within a single recipe without continued regexp lines that can get tricky.
And as your tests multiply you further tax the regex engine. (though now
that I think about it that's probably better tested):

:0
* (^received:.*hakyou\.com| \
   ^from:.*evilhakr@anrkyrus\.com | \
   etc... )
/dev/null               < or use a file while testing

Where you put stuff in the rc file is very important, but I'll stop here
since I've no idea how much you know about procmail. For uce-controls,
earlier is generally better. (But then procmail is already pretty late.:)
If you need to learn more about procmail then the man pages (procmail,
procmailrc, procmailex) are critical as are contributed resources such as
available from www.procmail.org.

Like one with beginner docs: http://www.uwasa.fi/~ts/info/proctips.html

Good luck,
-Dave

On Fri, 28 Jan 2000, Evren Yurtesen wrote:

> I want system level protection
> I use procmail as local delivery program already.
> How can I configure it? I think it is reaing a global
> configuration file at usr/local/etc/procmailrc
> is not it so?



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0001280744050.81842-100000>