[Mailman-Users] ISO speciific RegExp to filter/discard bot subscribe requests
Steven D'Aprano
steve at pearwood.info
Sun Aug 30 13:43:07 CEST 2015
On Sun, Aug 30, 2015 at 02:06:26AM -0700, Nelson Kelly wrote:
[...]
> Inserted the above recommended RegExp string into the ban_list, and
> within minutes subscribe request bot spam began showing up in the mod
> queue.
>
> All the new spams appear to be of a slightly different format from which
> I described in the OP.
>
> blahblah+blah-blah-blah-blah-12345678 at gmail.com
> blah_12_34+blah-blah-blah-blah-12345678 at hotmail.com
Try this regex instead:
^.*\+.*?\d{3,}@
The meaning of it is:
^ start of string
.* any number of characters
\+ a literal plus sign
.*? any number of characters (non-greedy)
\d{3,} at least three digits
@ a literal at sign
I'm not sure if the difference between "non-greedy" .*? and "greedy" .*
is important in this case.
Good luck!
--
Steve
More information about the Mailman-Users
mailing list