procmail/formail syntax question

Roland Smith rsmith at xs4all.nl
Sun Oct 23 13:07:21 PDT 2005


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

Roland
-- 
R.F.Smith (http://www.xs4all.nl/~rsmith/) Please send e-mail as plain text.
public key: http://www.xs4all.nl/~rsmith/pubkey.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20051023/b07eabbf/attachment.bin


More information about the freebsd-questions mailing list