diff options
| author | bwarsaw | 2002-04-05 23:53:39 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-04-05 23:53:39 +0000 |
| commit | f8c93b6dfcb83aa3c5d200ba76411f18059c5707 (patch) | |
| tree | f3bb063d70270304f0a01be82edf20cd8a004770 /Mailman/Utils.py | |
| parent | 6155e5682b8e6156b9f52a64fd7bff7955e6ff4b (diff) | |
| download | mailman-f8c93b6dfcb83aa3c5d200ba76411f18059c5707.tar.gz mailman-f8c93b6dfcb83aa3c5d200ba76411f18059c5707.tar.zst mailman-f8c93b6dfcb83aa3c5d200ba76411f18059c5707.zip | |
Diffstat (limited to 'Mailman/Utils.py')
| -rw-r--r-- | Mailman/Utils.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py index a896f4f4b..f495e93c1 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -519,16 +519,17 @@ def maketext(templatefile, dict=None, raw=0, lang=None, mlist=None): ADMINDATA = { # admin keyword: (minimum #args, maximum #args) - 'subscribe': (0, 3), - 'unsubscribe': (0, 1), - 'who': (0, 0), + 'confirm': (1, 1), + 'help': (0, 0), 'info': (0, 0), 'lists': (0, 0), - 'set': (3, 3), - 'help': (0, 0), - 'password': (2, 2), 'options': (0, 0), + 'password': (2, 2), 'remove': (0, 0), + 'set': (3, 3), + 'subscribe': (0, 3), + 'unsubscribe': (0, 1), + 'who': (0, 0), } # Given a Message.Message object, test for administrivia (eg subscribe, @@ -550,12 +551,9 @@ def is_administrivia(msg): # See if the body text has only one word, and that word is administrivia if ADMINDATA.has_key(bodytext.strip().lower()): return 1 - # See if the subect has only one word, and that word is administrivia - if ADMINDATA.has_key(msg.get('subject', '').strip().lower()): - return 1 # Look at the first N lines and see if there is any administrivia on the # line. BAW: N is currently hardcoded to 5. - for line in lines[:5]: + for line in lines[:5] + [msg.get('subject', '')]: if not line.strip(): continue words = [word.lower() for word in line.split()] |
