[Mailman-Users] Regexp help - Matching Subjects to Hold Posts in Mailman 2.0.11

Jim Tittsler jwt at onjapan.net
Tue May 31 08:56:07 CEST 2005

On May 31, 2005, at 14:44, David Powell wrote:

> One line has a tab b/w ":" and "[SPAM", another a space and the third
> nothing.  The other thing I wasn't sure about was if the first  
> letter of
> subject is uppper case or not.

If you are putting these in 2.0.x's bounce_matching_headers list  
variable, it doesn't matter.  Mailman takes the thing before the  
colon and its trailing whitespace (tabs or spaces) as the header  
field name to look for and the remainder of the line as the regular  
expression to compare against.  (Which explains the comment in the  
description that unescaped leading whitespace is stripped from the  
regex... not that it affects your case.)

(For the test cases where you didn't have whitespace separating the  
subject: and the regex, I'm surprised that you didn't get error  
messages logged in your Mailman config log.)

subject: \[SPAM
worked for me on an old 2.0.13 Mailman.  (I don't have a 2.0.11  
version to play with, but a really quick check of the CVS log  
suggests there were no relevant changes between those versions.)  If  
you want to track down where its going wrong on your machine, you  
could sprinkle some syslog() calls in Mailman/MailList.py's  
parse_matching_header_opt() and HasMatchingHeader().

Jim Tittsler     http://www.OnJapan.net/      GPG: 0x01159DB6
Python Starship  http://Starship.Python.net/crew/jwt/
Mailman IRC      irc://irc.freenode.net/#mailman

More information about the Mailman-Users mailing list