From owner-freebsd-questions@FreeBSD.ORG Sun Oct 23 23:29:56 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 831DA16A48F for ; Sun, 23 Oct 2005 23:29:56 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB33443D45 for ; Sun, 23 Oct 2005 23:29:55 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (patr530-a216.otenet.gr [212.205.215.216]) by rosebud.otenet.gr (8.13.4/8.13.4/Debian-1) with ESMTP id j9NNTo5G004290 for ; Mon, 24 Oct 2005 02:29:51 +0300 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id j9NNSEYI001814 for ; Mon, 24 Oct 2005 02:28:14 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id j9NNSEwX001813 for freebsd-questions@freebsd.org; Mon, 24 Oct 2005 02:28:14 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 24 Oct 2005 02:28:14 +0300 From: Giorgos Keramidas To: freebsd-questions@freebsd.org Message-ID: <20051023232814.GB1753@flame.pc> References: <20051023190951.GA25702@teddy.fas.com> <20051023200717.GB82057@slackbox.xs4all.nl> <20051023214939.GB30009@teddy.fas.com> <20051023221317.GA1211@flame.pc> <20051023225648.GB31109@teddy.fas.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051023225648.GB31109@teddy.fas.com> Subject: Re: procmail/formail syntax question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2005 23:29:56 -0000 On 2005-10-23 18:56, stan wrote: >On Mon, Oct 24, 2005 at 01:13:18AM +0300, Giorgos Keramidas wrote: >>On 2005-10-23 17:49, stan wrote: >>>On Sun, Oct 23, 2005 at 10:07:17PM +0200, Roland Smith wrote: >>>>On Sun, Oct 23, 2005 at 03:09:51PM -0400, stan wrote: >>>>> I'm trying to get procmail to rewrite the TO: header. I've tried something like: >>>>> >>>>> TO=`formail -xTo:` >>>> >>>> [...] >>> >>> So, I need to be able to rewrite the subject. Yes it's dumb but.... >> >> ``Much confusion in you I sense, young Jedi.'' >> >> If you want to rewrite the *SUBJECT* of the messages, then why are you >> trying to rewrite the *RECIPIENT* header? >> >> Having said that, I think that what you're missing is the 'f' option in >> the rule that pipes mail to formail and that you don't really need >> formail for something as simple: >> >> :0 Hf >> * X-Virus-Status: Yes >> | sed -e 's/^[sS]ubject:[[:space:]]\+/Subject: [virus] ' > > Yes, Oh freat master, I sense a great confusion :-) > It's the To: header he wants rewriten. You can always hit the Windows user hard on the head with a cluebat. All the mail reading software for Windows that I've recently had to work with supports filtering by the _SUBJETC_ of the messages too :-)