procmail
[Top] [All Lists]

Re: Trouble with recipe(s)

2003-10-16 11:19:30
As it was written on Oct 14, thus David W. Tamkin typed:

David:  Birl asked,
David:
David:  > I know Im doing something dumb, but I cant figure out what:
David:  > Given these 2 similiar receipes:
David:  >
David:  >
David:  >         :0:
David:  >         * @\/[^(_at_)]+mail\(_dot_)com
David:  >         .SPAM/$MATCHmail.com
David:  >
David:  >         :0:
David:  >         * @\/[^(_at_)]+mail\(_dot_)net
David:  >         .SPAM/$MATCHmail.net
David:
David:  Charles had the right explanation ($MATCHmail is a variable in its own
David:  right, which you've not set), and moreover it will include the
David:  "mail.com" or "mail.net" when it extracts.  So while this is the way to
David:  get the value of $MATCH and the static string "mail" next to each other,
David:
David:            :0:
David:            * @\/[^(_at_)]+mail\(_dot_)com
David:            .SPAM/${MATCH}mail.com
David:
David:            :0:
David:            * @\/[^(_at_)]+mail\(_dot_)net
David:            .SPAM/${MATCH}mail.net
David:
David:  this will get what I believe you actually want:
David:
David:    :0:
David:    * @\/[^(_at_)]+mail\(_dot_)(com|net)
David:    .SPAM/$MATCH



Excellent!  Works like charm.  Thanks.


(You know, after experiencing and working around a similar problem with
 /bin/sh variables, Im suprised I didnt think of that before).

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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