[Mailman-Users] Filter for exact domain names

Mark Sapiro mark at msapiro.net
Sat Dec 13 21:55:48 CET 2008


Cyndi Norwitz wrote:
>
>On Dec 13, 2008, at 9:42 AM, Mark Sapiro wrote:
>
>> Cyndi Norwitz wrote:
>>
>>> 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
>
>Great.
>
>> So the whole regexp matches
>>
>> at least one non-@ followed by @ optionally followed by anything that
>> ends with a period followed by tom.com at the end.
>
>Thanks, I've gone ahead and added the code.


Note that another regexp which will do the same thing and might be
easier to understand is

  ^.*[@.]tom\.com$

This will match anything that ends with @tom.com or .tom.com.

Note however that my experience with trying to use regexps in
discard_these_nonmembers to keep spam from being held is that it isn't
worth it. You may see the same domain a bunch of times, but by the
time you get around to discarding it, it's probably on the way out
anyway. Also, only the message-id of discarded messages is logged by
Mailman, so figuring out if any particular discard_these_nonmembers
entry is still being hit is difficult.

In my case, I've found a combination of greylisting and spam and virus
scanning in the MTA is much more effective, but there's no one-size
fits all solution.

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



More information about the Mailman-Users mailing list