summaryrefslogtreecommitdiff
path: root/mailman/app/replybot.py
diff options
context:
space:
mode:
authorBarry Warsaw2009-01-05 00:54:19 -0500
committerBarry Warsaw2009-01-05 00:54:19 -0500
commit37c255b7b0c1b8ea10c8d24a44c8586de86ffcc6 (patch)
treef2225cf1049360298cdaca89b6ca4458b6af3bcc /mailman/app/replybot.py
parentf6d998b93b0dd8978eadc9abc4c3964e3fe66bf7 (diff)
downloadmailman-37c255b7b0c1b8ea10c8d24a44c8586de86ffcc6.tar.gz
mailman-37c255b7b0c1b8ea10c8d24a44c8586de86ffcc6.tar.zst
mailman-37c255b7b0c1b8ea10c8d24a44c8586de86ffcc6.zip
Defaults module is mostly eradicated, converted to lazr.config. The test
suite does not yet work though.
Diffstat (limited to 'mailman/app/replybot.py')
-rw-r--r--mailman/app/replybot.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mailman/app/replybot.py b/mailman/app/replybot.py
index 0a8cdd5b7..ba357e18b 100644
--- a/mailman/app/replybot.py
+++ b/mailman/app/replybot.py
@@ -29,7 +29,6 @@ __all__ = [
import logging
import datetime
-from mailman import Defaults
from mailman import Utils
from mailman import i18n
@@ -48,7 +47,8 @@ def autorespond_to_sender(mlist, sender, lang=None):
"""
if lang is None:
lang = mlist.preferred_language
- if Defaults.MAX_AUTORESPONSES_PER_DAY == 0:
+ max_autoresponses_per_day = int(config.mta.max_autoresponses_per_day)
+ if max_autoresponses_per_day == 0:
# Unlimited.
return True
today = datetime.date.today()
@@ -64,7 +64,7 @@ def autorespond_to_sender(mlist, sender, lang=None):
# them of this fact, so there's nothing more to do.
log.info('-request/hold autoresponse discarded for: %s', sender)
return False
- if count >= Defaults.MAX_AUTORESPONSES_PER_DAY:
+ if count >= max_autoresponses_per_day:
log.info('-request/hold autoresponse limit hit for: %s', sender)
mlist.hold_and_cmd_autoresponses[sender] = (today, -1)
# Send this notification message instead.