diff options
| author | bwarsaw | 2000-06-27 05:22:32 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-06-27 05:22:32 +0000 |
| commit | 25416d8fbb19591376f1278bec8d6dc9c8e48836 (patch) | |
| tree | 43eba73de8bfb8b4a30543433491aa49cd99b826 | |
| parent | d8c951e9b1510da54bac0f7f92ab74692a5840c8 (diff) | |
| download | mailman-25416d8fbb19591376f1278bec8d6dc9c8e48836.tar.gz mailman-25416d8fbb19591376f1278bec8d6dc9c8e48836.tar.zst mailman-25416d8fbb19591376f1278bec8d6dc9c8e48836.zip | |
ScanMessages(): Watch out for exceptions in RegisterBounce().
| -rw-r--r-- | Mailman/Bouncers/BouncerAPI.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Mailman/Bouncers/BouncerAPI.py b/Mailman/Bouncers/BouncerAPI.py index 0415df9a4..285594279 100644 --- a/Mailman/Bouncers/BouncerAPI.py +++ b/Mailman/Bouncers/BouncerAPI.py @@ -22,13 +22,17 @@ the filename containing the bounce message. """ +import traceback +from types import ListType + # testing kludge if __name__ == '__main__': execfile('bin/paths.py') -from types import ListType from Mailman import mm_cfg from Mailman import Errors +from Mailman.Logging.Syslog import syslog +from Mailman.pythonlib.StringIO import StringIO @@ -52,7 +56,14 @@ def ScanMessages(mlist, msg, testing=0): for addr in addrs: # we found a bounce or a list of bounce addrs if not testing: - mlist.RegisterBounce(addr, msg) + try: + mlist.RegisterBounce(addr, msg) + except Exception, e: + syslog('error', 'Delivery exception: %s' % e) + s = StringIO() + traceback.print_exc(file=s) + syslog('error', s.getvalue()) + return 0 else: print '%16s: detected address <%s>' % (modname, addr) # we saw some bounces |
