procmail
[Top] [All Lists]

Re: Simple recipe question

1996-08-27 14:45:33
Peter Morrison asked,

| Guy Geens wrote:

| > You are missing a * after the square brakets.

| The condition still does not work... any further suggestions?

What Guy posted looked as though it should have worked: wasn't it

 * ^TOp[^       ;,]*(_at_)domain\(_dot_)name

Er, Peter, you didn't type "\t" instead of an actual tab, did you?  The
brackets should enclose caret, space, tab, semicolon, comma (in any order
except that the caret has to come first).

If you put "\t" or "\n" there you're forbidding t's and n's, so
peter(_at_)domain(_dot_)name, since there is a t between the p and the at-sign, 
will
fail to match.  Same goes for pmorrison(_at_)domain(_dot_)name, which has an n.

No, you can't include a newline inside the bracets, by the way.  However,
nothing in brackets can EVER match a newline, whether the bracketed set
is complemented with an initial caret or not, so you don't have to include
the newline.

| I guess I could limit my namespace to 
p[a-z0-9-_(_dot_)]*(_at_)domain\(_dot_)name
| or similar.

To include a hyphen in a bracketed set, it has to be first (first after the
caret if it's a complemented set) or last.  Make it

 * ^TOp[-a-z0-9_(_dot_)]*(_at_)domain\(_dot_)name

and it should work properly, provided that you do NOT use the `D' flag.

| What other characters are legal in an email address before the @ symbol?

You've just about covered them as far as I know.

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