Expressions to reduce spam

Hi, I use the "List of non-member addresses whose postings will be automatically discarded” feature a ton. In the past you have helped me to figure out the correct expressions to use to discard emails from the following:
- The whole email (no help needed, this one is obvious).
- Addresses that begin with X. I say “^phrase” and that does the trick.
- Domain names. I use the method Mark showed me years ago, which is (for example): ^[^@]+@(.*\.)?energydatagroup\.net$ I was later told there was an easier version of this, but this works and I just cut and paste anyway.
Now I need one more. Addresses that end in X. For example, I get TONS of attempted posts to one of my lists from the top level domain top. They’re 100% spam and the domain names are completely different and random. Nothing I tried works. I haven’t kept track of all my attempts so I can’t tell you what they are. My latest failure is: ^[^@]+@(.*\.)*\.top$
Note that I have researched this and read sites on regular expressions and still could not make heads or tails of it.
If I can get this working, I will be able to eliminate a lot of spam because there are so many that come from fake (or at least not legit) top level domains. .site, .win, and so on.
Can anyone give me the correct formula?
And can a future update to Mailman give us listowners more tools for this feature? I shouldn’t have to know regular expressions to be able to get rid of spam. Apple Mail, for example, lets you choose the type of match it is (starts with, ends with, contains); I have tons of spam direction rules that filter by top level domain (ends with .top).
Thanks! Cyndi

On 11/13/16 2:17 PM, Cyndi Norwitz wrote:
Now I need one more. Addresses that end in X. For example, I get TONS of attempted posts to one of my lists from the top level domain top. They’re 100% spam and the domain names are completely different and random. Nothing I tried works. I haven’t kept track of all my attempts so I can’t tell you what they are. My latest failure is: ^[^@]+@(.*\.)*\.top$
We implement junk-domain filtering ahead of Mailman. No reason to let a message get any further in your server than it has to. We use iptables to block connections from IP address ranges in countries where we know we have no users, and then a minimal spamassassin installation to filter top level domains and other 100% junk senders. This makes Mailman's job a lot easier.

On 11/13/16 5:17 PM, Cyndi Norwitz wrote:
Hi, I use the "List of non-member addresses whose postings will be automatically discarded” feature a ton. In the past you have helped me to figure out the correct expressions to use to discard emails from the following:
- The whole email (no help needed, this one is obvious).
- Addresses that begin with X. I say “^phrase” and that does the trick.
- Domain names. I use the method Mark showed me years ago, which is (for example): ^[^@]+@(.*\.)?energydatagroup\.net$ I was later told there was an easier version of this, but this works and I just cut and paste anyway.
Now I need one more. Addresses that end in X. For example, I get TONS of attempted posts to one of my lists from the top level domain top. They’re 100% spam and the domain names are completely different and random. Nothing I tried works. I haven’t kept track of all my attempts so I can’t tell you what they are. My latest failure is: ^[^@]+@(.*\.)*\.top$
Note that I have researched this and read sites on regular expressions and still could not make heads or tails of it.
If I can get this working, I will be able to eliminate a lot of spam because there are so many that come from fake (or at least not legit) top level domains. .site, .win, and so on.
Can anyone give me the correct formula?
And can a future update to Mailman give us listowners more tools for this feature? I shouldn’t have to know regular expressions to be able to get rid of spam. Apple Mail, for example, lets you choose the type of match it is (starts with, ends with, contains); I have tons of spam direction rules that filter by top level domain (ends with .top).
Thanks! Cyndi If you look at your regex, just replace the energydateagroup with [^@]. (There are lots of other ways to do it)
As an alternative, if you look at your example do ea domain and your example for begin with you get "\.top$"
Learning regular expressions really shouldn't be that hard, and can be important when fighting spam (since that is the way most tools work).
-- Richard Damon

On 11/13/2016 5:17 PM, Cyndi Norwitz wrote:
My latest failure is: ^[^@]+@(.*\.)*\.top$
It looks like what fails here is that the expression requires two dots before "top": someone@something..top would be caught but not someone@something.top. So try this:
^[^@]+@(.*\.)*top$
Or probably better:
^[^@]+@[^@]+\.top$
-- Larry Kuenning larry@qhpress.org

On 11/13/2016 03:57 PM, Larry Kuenning wrote:
On 11/13/2016 5:17 PM, Cyndi Norwitz wrote:
My latest failure is: ^[^@]+@(.*\.)*\.top$
It looks like what fails here is that the expression requires two dots before "top": someone@something..top would be caught but not someone@something.top. So try this:
^[^@]+@(.*\.)*top$
Or probably better:
^[^@]+@[^@]+\.top$
Or even just
^.*\.top$
Or to get more than one tld with one regexp
*.*\.(site|win|othertop)$
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 11/13/2016 07:55 PM, Mark Sapiro wrote:
Or to get more than one tld with one regexp
*.*\.(site|win|othertop)$
Ooops. Should be
^.*\.(site|win|othertop)$
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (5)
-
Cyndi Norwitz
-
D L Josephson
-
Larry Kuenning
-
Mark Sapiro
-
Richard Damon