diff options
| author | bwarsaw | 1999-11-30 23:13:03 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-11-30 23:13:03 +0000 |
| commit | 74c930699f2a730539b3283dac6e84a2b1b24da0 (patch) | |
| tree | 07a974ad1e66c6799fcd0df2e4103db880f12ed9 /Mailman | |
| parent | a5f71d9797fa81c8092befbbf2805c69aa9f4d87 (diff) | |
| download | mailman-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.py | 5 |
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): |
