Cyndi Norwitz wrote:

>I am getting a lot of spam post attempts from a domain  I  
>would like to do an automatic discard in discard_these_nonmembers for  
>this domain.
>I can add this line of code: ^...@]+@(.*\.)?tom\.com$
>But I am concerned that this will discard all .com domain names that  
>end with tom, which may be some legit ones.

It won't

>I do not understand the code as it's different from anything I've  
>worked with and the above recipe (which I mucked up several times on  
>my own despite some trips to the FAQ) came from Mark.  My guess is I  
>need to remove the question mark, but I'd like confirmation first.

It you remove the question mark, the regexp will match only sub-domains
of I.e., it will match, but not As it
is, it will match either of those, and it won't match
because the piece preceding doesn't end with a period.

Here's what it says:

^...@]+ matches the beginning of the line and 1 or more non-@
characters, so ^...@]+@ matches everything up to the first @ as long as
there is at least one character before the @.

Then (.*\.)? matches 0 or 1 occurrences of anything that ends with a
literal period - the ? says 0 or 1 of the preceding.

Then tom\.com$ matches if the remainder ends with ''.

So the whole regexp matches

at least one non-@ followed by @ optionally followed by anything that
ends with a period followed by at the end.

See <>.

Mark Sapiro <>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

Mailman-Users mailing list
Mailman FAQ:
Searchable Archives:

Security Policy:

Reply via email to