summaryrefslogtreecommitdiff
path: root/mailman/queue/command.py
diff options
context:
space:
mode:
authorBarry Warsaw2009-01-06 19:55:59 -0500
committerBarry Warsaw2009-01-06 19:55:59 -0500
commit89f5f76ed31d6ca2faf8e2a783a37e9009b03413 (patch)
treef1023f64501a49917674f5bcd78927aa5cee08ef /mailman/queue/command.py
parent37c255b7b0c1b8ea10c8d24a44c8586de86ffcc6 (diff)
downloadmailman-89f5f76ed31d6ca2faf8e2a783a37e9009b03413.tar.gz
mailman-89f5f76ed31d6ca2faf8e2a783a37e9009b03413.tar.zst
mailman-89f5f76ed31d6ca2faf8e2a783a37e9009b03413.zip
Diffstat (limited to 'mailman/queue/command.py')
-rw-r--r--mailman/queue/command.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mailman/queue/command.py b/mailman/queue/command.py
index 45c9693b5..d2be7c9fd 100644
--- a/mailman/queue/command.py
+++ b/mailman/queue/command.py
@@ -37,7 +37,6 @@ from email.Header import decode_header, make_header
from email.Iterators import typed_subpart_iterator
from zope.interface import implements
-from mailman import Defaults
from mailman import Message
from mailman.config import config
from mailman.i18n import _
@@ -66,7 +65,7 @@ class CommandFinder:
elif msgdata.get('toleave'):
self.command_lines.append('leave')
elif msgdata.get('toconfirm'):
- mo = re.match(Defaults.VERP_CONFIRM_REGEXP, msg.get('to', ''))
+ mo = re.match(config.mta.verp_confirm_regexp, msg.get('to', ''))
if mo:
self.command_lines.append('confirm ' + mo.group('cookie'))
# Extract the subject header and do RFC 2047 decoding.
@@ -95,8 +94,9 @@ class CommandFinder:
assert isinstance(body, basestring), 'Non-string decoded payload'
lines = body.splitlines()
# Use no more lines than specified
- self.command_lines.extend(lines[:Defaults.EMAIL_COMMANDS_MAX_LINES])
- self.ignored_lines.extend(lines[Defaults.EMAIL_COMMANDS_MAX_LINES:])
+ max_lines = int(config.mailman.email_commands_max_lines)
+ self.command_lines.extend(lines[:max_lines])
+ self.ignored_lines.extend(lines[max_lines:])
def __iter__(self):
"""Return each command line, split into commands and arguments.