On Thu, 6 Jan 2000, era eriksson wrote:
ee> On Thu, 6 Jan 2000 15:18:43 +0200, "Jakob Solomon"
<jakob(_at_)finjan(_dot_)com>
ee> wrote:
ee> > How do write a script
ee> > which will send to /dev/null all e-mail
ee> > which have an empty 'To:' field ?
ee>
ee> Let's rephrase that: Send to Dave Null all email which doesn't have a
ee> To: field with something alphanumeric in it:
ee>
ee> :0
ee> * ! ^To: .*[a-z]
ee> /dev/null
ee>
Doesn't the term 'alphanumeric' imply that it contains alpha and numeric
characters? with the above won't that only check for alpha
characters? Shouldn't that be as follows
:0
* !^To: .*[a-z0-9]
/dev/null
ee> Do note that mail can validly have a more or less empty To: field and
ee> instead specify the recipients in Cc:, and that you can easily
ee> masquerade an empty To: field by putting some unimportant comment
ee> there, like
ee>
ee> To: recipient list not shown:;
ee>
ee> or
ee>
ee> To: Recipients of the Procmail mailing list
<nobody(_at_)example(_dot_)com>
ee>
ee> In fact, I don't think I have ever seen a message with a To: field
ee> which was there but which was empty. Perhaps you are actually looking
ee> for something else? Could you tell us what you are trying to
ee> accomplish?
ee>
ee> /* era */
ee>
ee>
--
S.Toms - tomas(_at_)primenet(_dot_)com - homepage is in the works
SuSE Linux v6.2+ - Kernel 2.2.13
Overdrawn? But I still have checks left!