summaryrefslogtreecommitdiff
path: root/Mailman/Bouncers/Postfix.py
diff options
context:
space:
mode:
authorbwarsaw2001-10-01 16:29:05 +0000
committerbwarsaw2001-10-01 16:29:05 +0000
commitaa441ecb4472f991912fa9e0fbeff2e1a3aa8bb6 (patch)
tree9c6d3f04597728d0a6da6b40095e9734e4d04769 /Mailman/Bouncers/Postfix.py
parentc87380fa95d3774c7e6210872c8592474bd87bc7 (diff)
downloadmailman-aa441ecb4472f991912fa9e0fbeff2e1a3aa8bb6.tar.gz
mailman-aa441ecb4472f991912fa9e0fbeff2e1a3aa8bb6.tar.zst
mailman-aa441ecb4472f991912fa9e0fbeff2e1a3aa8bb6.zip
Diffstat (limited to 'Mailman/Bouncers/Postfix.py')
-rw-r--r--Mailman/Bouncers/Postfix.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Mailman/Bouncers/Postfix.py b/Mailman/Bouncers/Postfix.py
index 86fb7be91..f55147a0a 100644
--- a/Mailman/Bouncers/Postfix.py
+++ b/Mailman/Bouncers/Postfix.py
@@ -27,13 +27,13 @@ It also matches something claiming to be `The BNS Postfix program'.
import re
-from Mailman.pythonlib.StringIO import StringIO
+from cStringIO import StringIO
def flatten(msg, leaves):
# give us all the leaf (non-multipart) subparts
- if msg.ismultipart():
+ if msg.is_multipart():
for part in msg.get_payload():
flatten(part, leaves)
else:
@@ -72,14 +72,14 @@ def findaddr(msg):
def process(msg):
- if msg.gettype() <> 'multipart/mixed':
+ if msg.get_type() <> 'multipart/mixed':
return None
# We're looking for the plain/text subpart with a Content-Description: of
# `notification'.
leaves = []
flatten(msg, leaves)
for subpart in leaves:
- if subpart.gettype() == 'text/plain' and \
+ if subpart.get_type() == 'text/plain' and \
subpart.get('content-description', '').lower() == 'notification':
# then...
return findaddr(subpart)