Michael Welch writes:

 >    The filter rule reads: ^subject:.*spam*
 >    But it's catching the word "span"

That's correct.  '*' in a Python regular expression means "zero or
more of the preceding subexpression, in this case the letter "m" (more
precisely, the character class "[Mm]" since we set the match to be
case-insensitive).

If you want to catch the literal string "*spam*" anywhere in the
subject, you need to escape the '*' with '\' like this:

    ^subject:.*\*spam\*

If that's not what you want, you'll have to tell us what you do want.

Steve

-- 
GNU Mailman consultant (installation, migration, customization)
Sirius Open Source    https://www.siriusopensource.com/
Software systems consulting in Europe, North America, and Japan
------------------------------------------------------
Mailman-Users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/[email protected]/
    https://mail.python.org/archives/list/[email protected]/
Member address: [email protected]

Reply via email to