diff options
| author | bwarsaw | 1999-12-10 00:02:09 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-12-10 00:02:09 +0000 |
| commit | 2d96d3432ca9b66a595e76b94f90bfb861538a9c (patch) | |
| tree | f546bdcc2996ba1016eb116e0dab9505ede03389 /Mailman/Bouncers/BouncerAPI.py | |
| parent | 8b65265c494a0f5ae8d0e5457764df7ea8603143 (diff) | |
| download | mailman-2d96d3432ca9b66a595e76b94f90bfb861538a9c.tar.gz mailman-2d96d3432ca9b66a595e76b94f90bfb861538a9c.tar.zst mailman-2d96d3432ca9b66a595e76b94f90bfb861538a9c.zip | |
Diffstat (limited to 'Mailman/Bouncers/BouncerAPI.py')
| -rw-r--r-- | Mailman/Bouncers/BouncerAPI.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Mailman/Bouncers/BouncerAPI.py b/Mailman/Bouncers/BouncerAPI.py index 621e08115..7435ebf80 100644 --- a/Mailman/Bouncers/BouncerAPI.py +++ b/Mailman/Bouncers/BouncerAPI.py @@ -51,7 +51,7 @@ def ScanMessages(mlist, msg, testing=0): if not testing: mlist.RegisterBounce(addr, msg) else: - print 'Bounce of %s detected by module %s' % ( + print ' Bounce of %s detected by module %s' % ( addr, modname) # we saw some bounces return 1 @@ -71,13 +71,15 @@ if __name__ == '__main__': print msg sys.exit(code) - if len(sys.argv) <> 3: - usage(1, 'required arguments: <listname> <filename>') + if len(sys.argv) < 3: + usage(1, 'required arguments: <list> <file> [, <file> ...]') listname = sys.argv[1] - filename = sys.argv[2] - mlist = MailList.MailList(listname, lock=0) - fp = open(filename) - msg = mimetools.Message(fp) - ScanMessages(mlist, msg, testing=1) + + for filename in sys.argv[2:]: + print 'scanning file', filename + fp = open(filename) + msg = mimetools.Message(fp) + ScanMessages(mlist, msg, testing=1) + fp.close() |
