From owner-freebsd-questions Wed Feb 19 19:39:54 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 09D6937B401 for ; Wed, 19 Feb 2003 19:39:53 -0800 (PST) Received: from ariel.ucs.unimelb.edu.au (ariel.ucs.unimelb.edu.au [128.250.20.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id D84F843FA3 for ; Wed, 19 Feb 2003 19:39:51 -0800 (PST) (envelope-from jrhoden@unimelb.edu.au) Received: from ariel.ucs.unimelb.edu.au (localhost [127.0.0.1]) by ariel.ucs.unimelb.edu.au (8.12.3/8.12.3) with ESMTP id h1K3dg3J002847; Thu, 20 Feb 2003 14:39:42 +1100 (EST) Received: from localhost (jrhoden@localhost) by ariel.ucs.unimelb.edu.au (8.12.3/8.12.3) with ESMTP id h1K3dfqA002844; Thu, 20 Feb 2003 14:39:42 +1100 (EST) X-Authentication-Warning: ariel.ucs.unimelb.edu.au: jrhoden owned process doing -bs Date: Thu, 20 Feb 2003 14:39:41 +1100 (EST) From: jacob rhoden X-X-Sender: jrhoden@ariel.ucs.unimelb.edu.au To: Dragoncrest Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Removing emails from an email file automatically. In-Reply-To: <4.2.0.58.20030219224303.00971230@pop.voyager.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Hi, On Wed, 19 Feb 2003, Dragoncrest wrote: > Hi all. Is there a simple way to remove a single email from a mail file > using an automated script of some kind? Like combining grep with some > other stuff like that? I'm looking for ideas to get rid of rogue > emails. The other couple haven't exactly been a stellar success yet. Can > I setup something that will search a mail file, find a given sender, and > then just nuke the message without hurting the mail file? Thanks everyone. I am not sure if you want to work on an existing file, or future mail files. If it is future mail files then you probably want to use a program which can stop the mail getting in the file in the first place. If this is the case look up 'procmail'. It allows you to read a mail and do an action on it through your .forward file. Regards, Jacob _______________________________________________________ Jacob Rhoden Phone: +61 3 9844 6102 ITS Division Email: jrhoden@unimelb.edu.au Melbourne University Mobile: +61 403 788 386 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message