I wrote:
# Get the recipient
FROM=`$FORMAIL -xTo:`
:0
* FROM ?? ()\/[^(_at_)]+$
* MATCH ?? ^^\/[^.]+
{ ADDRESSEE = $MATCH }
In the first condition line, we capture to MATCH (via the `\/' token) the
value of everything following the `@' until the end of $FROM.
In the second condition line, we parse MATCH at the first dot.
After I wrote that, I tried to go to sleep. Instead of sleeping,
I had the realization that I should have demonstrated the above
with one condition line, not two. Same result, more efficient
algorithm.
FROM=`formail -xTo:`
:0
* FROM ?? @\/[^.]+
{ ADDRESSEE = $MATCH }
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail