Subject: Re: Checking for empty header

From: [email-masked] (Stephen R. van den Berg)
Date: Wed, 13 Jul 1994 19:59:10 +0200

Quindel <[email-masked]> wrote:
>I've been trying to check for an empty header. If it comes from me, 
>I'd like to check if a header called X-To is empty. If it is, I'd like it 
>to put it in my mailbox like usual. 
>However if X-To is not empty, I'd like it to put the X-To into the To 
>address using the formail which works fine and then remail it.

Try something like:

:0 w
* [email-masked]
* ^X-To:.*[^	 ]
| formail -I From: -I To: -R X-To: To: -s $SENDMAIL -oi -t

Note that the [^	 ] includes a tab and a space.
And of course simply delete the recipe you used to sink the mail to $DEFAULT.

-- 
Sincerely,                                  [email-masked]
           Stephen R. van den Berg (AKA BuGless).

"To err is human, to debug ... divine."