summaryrefslogtreecommitdiff
path: root/Mailman
diff options
context:
space:
mode:
authorbwarsaw1999-11-30 23:13:03 +0000
committerbwarsaw1999-11-30 23:13:03 +0000
commit74c930699f2a730539b3283dac6e84a2b1b24da0 (patch)
tree07a974ad1e66c6799fcd0df2e4103db880f12ed9 /Mailman
parenta5f71d9797fa81c8092befbbf2805c69aa9f4d87 (diff)
downloadmailman-74c930699f2a730539b3283dac6e84a2b1b24da0.tar.gz
mailman-74c930699f2a730539b3283dac6e84a2b1b24da0.tar.zst
mailman-74c930699f2a730539b3283dac6e84a2b1b24da0.zip
RegisterBounce(): Added optional saveifdirty flag, which defaults to
true. SMTPDirect sets this to zero so the list isn't save between each bounce registration. SMTPDirect does the save after processing all delivery failures.
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Bouncer.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Mailman/Bouncer.py b/Mailman/Bouncer.py
index 8ae7f06ca..19d193fb3 100644
--- a/Mailman/Bouncer.py
+++ b/Mailman/Bouncer.py
@@ -83,7 +83,7 @@ class Bouncer:
if self.bounce_info.has_key(email):
del self.bounce_info[email]
- def RegisterBounce(self, email, msg):
+ def RegisterBounce(self, email, msg, saveifdirty=1):
"""Detect and handle repeat-offender bounce addresses.
We use very sketchy bounce history profiles in self.bounce_info
@@ -96,7 +96,6 @@ class Bouncer:
report = "%s: %s - " % (self.real_name, email)
try:
-
now = time.time()
secs_per_day = 24 * 60 * 60
@@ -171,7 +170,7 @@ class Bouncer:
self._internal_name,
addr)
finally:
- if dirty:
+ if dirty and saveifdirty:
self.Save()
def HandleBouncingAddress(self, addr, msg):