procmail
[Top] [All Lists]

Re: how to match this

1997-08-03 11:35:00
| Valid AOL address are 10 characters or less and also has to begin with a  
| letter and not a number also.

Also, as they arrive in email, spaces are stripped out, so the characters
after the first may be only alphabetics or digits.

| How can I match this so as to be able to filter out invalid AOL From:s?

Shall we take a negative approach ...

 * ! ^From: *([^a-z]|.+[^0-9a-z]|............)(_dot_)*(_at_)aol\(_dot_)com$

[If the first character of the local part is not a letter, or if any
 character after the first is neither a letter nor a digit, or if there
 are eleven or more characters, it's illegitimate.]

... or a positive one?

# If there are no other weighted conditions on the recipe, make sure that
# mail that isn't from AOL has a non-zero positive score:
     * .000001^0
# Make the net score negative if the message is from AOL:
     * -1^0 ^From:(_dot_)*(_at_)aol\(_dot_)com$
# Make it positive again if the local part is legitimate:
     *  1^0 ^From: *[a-z][0-9a-z]?[0-9a-z]?[0-9a-z]?[0-9a-z]?[0-9a-z]?\
            [0-9a-z]?[0-9a-z]?[0-9a-z]?[0-9a-z]?(_at_)aol\(_dot_)com$

I think that this time the negative approach was easier.

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