procmail
[Top] [All Lists]

Analysing headers spawning multiple lines ?

1998-01-23 04:00:03
Hello,
I looked a bit in the list archive without finding something similar. My
problem is to detect if my E-Mail adress appear in the To: Field.
I set it up this way (after the filtering of mailing lists of course !)

:0
* !^To:.*My\.Email\.Adress(\>|>|>)
INCLUDERC = $TRASH 

But if fails in cases like :
To: x(_at_)x, y(_at_)y, ...
    MyName(_at_)My\(_dot_)Email\(_dot_)Adress, z(_at_)z,

That is, the mail is sent to multiples recipients where I appear
somewhere. If I add :

TO=`formail -xTo:`
:0 c
echo To: set to ${TO} >> $MAILDIR/formail.log

The file formail.log contains the list of all the names, separated with
spaces. What would thus be the more efficient way to egrep my E-Mail
address from this environment variable ? I thinked about 

TO=`formail -xTo:`
:0
* ! ? echo ${TO} | egrep "My\.Email\.Adress" -
INCLUDERC = $TRASH

Comments ?

Thanks in advance
Pascal A. Dupuis

--
FORTRAN is not a flower but a weed -- it is hardy, occasionally blooms,
and grows in every computer.
                -- A.J. Perlis

<Prev in Thread] Current Thread [Next in Thread>