From owner-freebsd-questions Thu Feb 20 22:26:33 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF4BD37B405 for ; Thu, 20 Feb 2003 22:26:30 -0800 (PST) Received: from post-21.mail.nl.demon.net (post-21.mail.nl.demon.net [194.159.73.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7831E43FBF for ; Thu, 20 Feb 2003 22:26:29 -0800 (PST) (envelope-from cls@raggedclown.net) Received: from [212.238.197.102] (helo=mailhost.raggedclown.net) by post-21.mail.nl.demon.net with esmtp (Exim 3.36 #1) id 18m6dg-0007Dd-00 for freebsd-questions@FreeBSD.ORG; Fri, 21 Feb 2003 06:26:28 +0000 Received: from localhost (localhost [127.0.0.1]) by mailhost.raggedclown.net (Ragged Clown Mail Gateway [dawn]) with ESMTP id 11D48C6B1 for ; Fri, 21 Feb 2003 07:26:27 +0100 (CET) Received: from willow.raggedclown.net (willow.raggedclown.intra [192.168.1.10]) by mailhost.raggedclown.net (Ragged Clown Mail Gateway [dawn]) with ESMTP id 096A3E7A for ; Fri, 21 Feb 2003 07:26:17 +0100 (CET) Received: by willow.raggedclown.net (Ragged Clown Host [willow], from userid 1009) id C6885225C3; Fri, 21 Feb 2003 07:26:17 +0100 (CET) Date: Fri, 21 Feb 2003 07:26:17 +0100 From: Cliff Sarginson To: freebsd-questions@FreeBSD.ORG Subject: Re: Removing emails from an email file automatically. Message-ID: <20030221062617.GB96171@raggedclown.net> References: <4.2.0.58.20030219224303.00971230@pop.voyager.net> <4.2.0.58.20030220235144.0096fe10@pop.voyager.net> <20030221050725.GU13096@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030221050725.GU13096@dan.emsphone.com> User-Agent: Mutt/1.5.3i X-Virus-Scanned: by AMaViS 0.3.12pre8 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Feb 20, 2003 at 11:07:25PM -0600, Dan Nelson wrote: > In the last episode (Feb 20), Dragoncrest said: > > Hmm. I'm trying to avoid using Procmail at all costs since we're > > currently on a Sendmail/Qpopper configuration that I can work with. > > But it may turn out that the only way around this IS to go with that. > > Thing is, I'd like to stick with what we have and make it work with > > that rather than totally ripping our our MTA and throwing in a whole > > brand new one we know nothing about. > > Procmail is not an mta; it's an email filter. It's usually launched > from the .forward file, but you can configure sendmail to use procmail > as the default local mail delivery agent, or you can run it standalone > (procmail < message.txt) if you don't want it to be part of the mail > delivery process at all. > Mmm. Two things here, one is no you should definitely not go around messing inside mailboxes with hand-written scripts; it is not just a simple case of getting at the message, removing it and all will be well. You have to take on board all sorts of probems like file-locking, like the testing of pathological cases, and the fact you are possibly going to be content inspecting mail concerning other people. I presume you are trying to de-spam the incoming mail. This cannot be done without some not inconsiderable effort. Some of it you can do with your MTA (yours is sendmail I take it), by the use of RBL (blacklist lookups for known spammers). Some of it can be done by an MDA (such as procmail), and some of it can be better served by the use of a spam-marking program such as spamassassin. You may also want virus checking in it by the use of Amavis or some-such. In fact you may end up doing checks at all sorts of levels during the delivery process. And then you have to decide what to do with the "spam", since false-positives are possible. Your MUA (whatever you use to read the mail may also have to have filter rules). All in all this is not a 5 minute job. The majority of spam in the world comes mainly from an estimated number of sources to be less than 200, the number of people trying to give solutions to this must be quadruple that number at least ! As pointed out above, procmail is not an MTA , techinically it is an MDA, a delivery agent. It can be set up on a per-user basis or system-wide. It can itself filter the mail into another program like spamassassin and so on. There is a lot of work involved in this, I know I have been busy for a long time on it...and I am not running a corporate server ! You will need to do some investigations..asking here, looking at solutions people have implemented. But no solutions are going to 100% solve the problem, you can reduce it greatly by using the methods I mention above. I know zilch about sendmail, but I know that the new version of Postfix, which I have yet to try, does allow for tight integration of these various things..maybe also with sendmail...I don't know. For reference: I use Postfix as MTA, Amavis/Antivir as virus checker, and procmail recipes to use spamassassin to do spam checks. Even with an artificially low threshold for spam marking I am getting maybe 1 false positive spam a day, when I bump the threshold up to something more realistic I would expect that to further drop. -- Regards Cliff Sarginson The Netherlands [ This mail has been checked as virus-free ] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message