summaryrefslogtreecommitdiff
path: root/Mailman/Handlers/ToOutgoing.py
diff options
context:
space:
mode:
authorbwarsaw2006-07-08 17:45:13 +0000
committerbwarsaw2006-07-08 17:45:13 +0000
commit0e9fb0aec9fcf0027dd354b48196b1fa0d420c4d (patch)
treef63ad44589e00c13e92cf0e83461ecb22dc5aeff /Mailman/Handlers/ToOutgoing.py
parentcbef3114de3e80b9436d909b11568858e3a1cf42 (diff)
downloadmailman-0e9fb0aec9fcf0027dd354b48196b1fa0d420c4d.tar.gz
mailman-0e9fb0aec9fcf0027dd354b48196b1fa0d420c4d.tar.zst
mailman-0e9fb0aec9fcf0027dd354b48196b1fa0d420c4d.zip
Diffstat (limited to 'Mailman/Handlers/ToOutgoing.py')
-rw-r--r--Mailman/Handlers/ToOutgoing.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/Mailman/Handlers/ToOutgoing.py b/Mailman/Handlers/ToOutgoing.py
index 7273c41b2..c29f83f76 100644
--- a/Mailman/Handlers/ToOutgoing.py
+++ b/Mailman/Handlers/ToOutgoing.py
@@ -1,18 +1,19 @@
-# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2006 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
"""Re-queue the message to the outgoing queue.
@@ -21,13 +22,13 @@ posted to the list membership. Anything else that needs to go out to some
recipient should just be placed in the out queue directly.
"""
-from Mailman import mm_cfg
from Mailman.Queue.sbcache import get_switchboard
+from Mailman.configuration import config
def process(mlist, msg, msgdata):
- interval = mm_cfg.VERP_DELIVERY_INTERVAL
+ interval = config.VERP_DELIVERY_INTERVAL
# Should we VERP this message? If personalization is enabled for this
# list and VERP_PERSONALIZED_DELIVERIES is true, then yes we VERP it.
# Also, if personalization is /not/ enabled, but VERP_DELIVERY_INTERVAL is
@@ -39,17 +40,17 @@ def process(mlist, msg, msgdata):
if msgdata.has_key('verp'):
pass
elif mlist.personalize:
- if mm_cfg.VERP_PERSONALIZED_DELIVERIES:
- msgdata['verp'] = 1
+ if config.VERP_PERSONALIZED_DELIVERIES:
+ msgdata['verp'] = True
elif interval == 0:
# Never VERP
pass
elif interval == 1:
# VERP every time
- msgdata['verp'] = 1
+ msgdata['verp'] = True
else:
- # VERP every `inteval' number of times
- msgdata['verp'] = not int(mlist.post_id) % interval
+ # VERP every `interval' number of times
+ msgdata['verp'] = not (int(mlist.post_id) % interval)
# And now drop the message in qfiles/out
- outq = get_switchboard(mm_cfg.OUTQUEUE_DIR)
+ outq = get_switchboard(config.OUTQUEUE_DIR)
outq.enqueue(msg, msgdata, listname=mlist.internal_name())