From owner-freebsd-questions Fri Jan 28 9:22:35 2000 Delivered-To: freebsd-questions@freebsd.org Received: from smartypants.caffeine.com (adsl-209-233-24-51.dsl.snfc21.pacbell.net [209.233.24.51]) by hub.freebsd.org (Postfix) with ESMTP id B04A915E15 for ; Fri, 28 Jan 2000 09:22:10 -0800 (PST) (envelope-from wellsian@caffeine.com) Received: from localhost (wellsian@localhost) by smartypants.caffeine.com (8.9.3/8.9.2) with ESMTP id JAA83949; Fri, 28 Jan 2000 09:12:05 -0800 (PST) (envelope-from wellsian@caffeine.com) From: wellsian@caffeine.com X-Authentication-Warning: smartypants.caffeine.com: wellsian owned process doing -bs Date: Fri, 28 Jan 2000 09:12:05 -0800 (PST) To: Evren Yurtesen Cc: freebsd-questions@FreeBSD.ORG Subject: Re: filtering spam by name of the sender? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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