Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Oct 2005 17:49:39 -0400
From:      stan <stanb@panix.com>
To:        Free BSD Questions list <freebsd-questions@freebsd.org>
Subject:   Re: procmail/formail syntax question
Message-ID:  <20051023214939.GB30009@teddy.fas.com>
In-Reply-To: <20051023200717.GB82057@slackbox.xs4all.nl>
References:  <20051023190951.GA25702@teddy.fas.com> <20051023200717.GB82057@slackbox.xs4all.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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"
>  <snip>
> > 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051023214939.GB30009>