From owner-freebsd-questions@FreeBSD.ORG Sun Oct 23 21:49:41 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 B431516A420 for ; Sun, 23 Oct 2005 21:49:41 +0000 (GMT) (envelope-from stanb@panix.com) Received: from mail2.panix.com (mail2.panix.com [166.84.1.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2623843D4C for ; Sun, 23 Oct 2005 21:49:40 +0000 (GMT) (envelope-from stanb@panix.com) Received: from mailspool3.panix.com (mailspool3.panix.com [166.84.1.78]) by mail2.panix.com (Postfix) with ESMTP id E6FD99DC15 for ; Sun, 23 Oct 2005 17:49:39 -0400 (EDT) Received: from teddy.fas.com (pcp08632294pcs.mplsnt01.sc.comcast.net [68.58.232.106]) by mailspool3.panix.com (Postfix) with ESMTP id 7F2084308E6 for ; Sun, 23 Oct 2005 17:49:40 -0400 (EDT) Received: from stan by teddy.fas.com with local (Exim 3.36 #1 (Debian)) id 1ETnil-0007v5-00 for ; Sun, 23 Oct 2005 17:49:39 -0400 Date: Sun, 23 Oct 2005 17:49:39 -0400 From: stan To: Free BSD Questions list Message-ID: <20051023214939.GB30009@teddy.fas.com> Mail-Followup-To: Free BSD Questions list References: <20051023190951.GA25702@teddy.fas.com> <20051023200717.GB82057@slackbox.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051023200717.GB82057@slackbox.xs4all.nl> X-Editor: gVim X-Operating-System: Debian GNU/Linux X-Kernel-Version: 2.4.23 X-Uptime: 17:36:08 up 71 days, 21:09, 2 users, load average: 0.13, 0.04, 0.01 User-Agent: Mutt/1.5.4i Sender: Stan Brown 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 21:49:41 -0000 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:` > > I think this command is expanded only once, and gives an empty string > because you didn't give formail any input. > > > # is moved to "viruses". > > :0: > > * ^X-Virus-Status: Yes > > | formail -I "To: is_virus, $TO" > > > But this does not seem to be working. > > > > What am I doing wrong? > > Why don't you put it in an appropriate mailbox directly? E.g: > > :0: > * ^X-Virus-Status: Yes > /home/username/Mail/virus > > :0: > * ^X-Spam-Status: Yes > /home/username/Mail/probably_spam > That is _exactly_ wht _I_ do. However this is for a friend who recieves mail on this machine, then uses IMAP to fecth it to a Windoze box where he reads it with Outlook. He aparently does not now how to filter within Outlook on anything but the subject. So, I need to be able to rewrite the subject. Yes it's dumb but.... -- U.S. Encouraged by Vietnam Vote - Officials Cite 83% Turnout Despite Vietcong Terror - New York Times 9/3/1967