Global ban using regex
Using some regex testers and generators like https://regex101.com and https://www.site24x7.com/tools/regex-parser.html, the regex (.*)@inker\.azerbaijan\.su seems to match EVERYTHING@inker.azerbaijan.su (EVERYTHING is constantly changing in current spam mails). However, entering the regex to the Global Ban Add ban /postorius/bans/ result in:
An error occurred: Invalid Parameter "email": Expected a valid email address or regular expression, got (.*)@inker\.azerbaijan\.su.'
Same result when using [Ban list] in postorius/lists/[LISTNAME]/bans/. Entering a none regex addresses like eknejfj@inker.azerbaijan.su works fine.
Does Mailman use a different regex syntax
I am using GNU Mailman 3.3.4 (Tom Sawyer) and Mailman Core Python Version 3.8.10 (default, May 6 2021, 06:30:44) [GCC 9.3.0] (maxking/mailman-core:0.3 and maxking/mailman-web:0.3)
Henrik Rasmussen writes:
Does Mailman use a different regex syntax
Mailman interprets a string starting with "^" as a regex, and one without it as a fixed string to search form. Just put "^" in front. I believe Mailman uses re.match, so the "^" is actually a no-op.
Steve
participants (2)
-
Henrik Rasmussen
-
Stephen J. Turnbull