[Mailman-Users] Expressions to reduce spam

Richard Damon Richard at Damon-Family.org
Sun Nov 13 18:15:08 EST 2016


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:
>
> 1) The whole email (no help needed, this one is obvious).
> 2) Addresses that begin with X.  I say “^phrase” and that does the trick.
> 3) 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



More information about the Mailman-Users mailing list