Update of /cvsroot/mailman/mailman/Mailman/Bouncers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7677
Modified Files:
Caiwireless.py DSN.py GroupWise.py Microsoft.py Netscape.py
Postfix.py
Log Message:
Preparing for email 3.0/4.0. get_type() -> get_content_type() etc.
Index: Caiwireless.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/Caiwireless.py,v
retrieving revision 2.5
retrieving revision 2.6
diff -u -d -r2.5 -r2.6
--- Caiwireless.py 27 Aug 2005 01:54:02 -0000 2.5
+++ Caiwireless.py 7 Mar 2006 12:40:05 -0000 2.6
@@ -27,7 +27,7 @@
def process(msg):
- if msg.get_type() <> 'multipart/mixed':
+ if msg.get_content_type() <> 'multipart/mixed':
return None
# simple state machine
# 0 == nothing seen
Index: DSN.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/DSN.py,v
retrieving revision 2.12
retrieving revision 2.13
diff -u -d -r2.12 -r2.13
--- DSN.py 1 Mar 2006 02:34:54 -0000 2.12
+++ DSN.py 7 Mar 2006 12:40:05 -0000 2.13
@@ -85,6 +85,6 @@
# The report-type parameter should be "delivery-status", but it seems that
# some DSN generating MTAs don't include this on the Content-Type: header,
# so let's relax the test a bit.
- if not msg.is_multipart() or msg.get_subtype() <> 'report':
+ if not msg.is_multipart() or msg.get_content_subtype() <> 'report':
return None
return check(msg)
Index: GroupWise.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/GroupWise.py,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -d -r2.7 -r2.8
--- GroupWise.py 27 Aug 2005 01:54:02 -0000 2.7
+++ GroupWise.py 7 Mar 2006 12:40:05 -0000 2.8
@@ -30,7 +30,7 @@
def find_textplain(msg):
- if msg.get_type(msg.get_default_type()) == 'text/plain':
+ if msg.get_content_type() == 'text/plain':
return msg
if msg.is_multipart:
for part in msg.get_payload():
@@ -44,7 +44,7 @@
def process(msg):
- if msg.get_type() <> 'multipart/mixed' or not msg['x-mailer']:
+ if msg.get_content_type() <> 'multipart/mixed' or not msg['x-mailer']:
return None
addrs = {}
# find the first text/plain part in the message
Index: Microsoft.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/Microsoft.py,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -d -r2.7 -r2.8
--- Microsoft.py 27 Aug 2005 01:54:02 -0000 2.7
+++ Microsoft.py 7 Mar 2006 12:40:05 -0000 2.8
@@ -25,7 +25,7 @@
def process(msg):
- if msg.get_type() <> 'multipart/mixed':
+ if msg.get_content_type() <> 'multipart/mixed':
return None
# Find the first subpart, which has no MIME type
try:
Index: Netscape.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/Netscape.py,v
retrieving revision 2.6
retrieving revision 2.7
diff -u -d -r2.6 -r2.7
--- Netscape.py 27 Aug 2005 01:54:02 -0000 2.6
+++ Netscape.py 7 Mar 2006 12:40:05 -0000 2.7
@@ -61,7 +61,7 @@
leaves = []
flatten(msg, leaves)
for i, subpart in zip(range(len(leaves)-1), leaves):
- if subpart.get_type() == 'text/plain':
+ if subpart.get_content_type() == 'text/plain':
plainmsg = subpart
break
if not plainmsg:
Index: Postfix.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/Postfix.py,v
retrieving revision 2.10
retrieving revision 2.11
diff -u -d -r2.10 -r2.11
--- Postfix.py 28 Aug 2005 05:31:26 -0000 2.10
+++ Postfix.py 7 Mar 2006 12:40:05 -0000 2.11
@@ -71,14 +71,14 @@
def process(msg):
- if msg.get_type() not in ('multipart/mixed', 'multipart/report'):
+ if msg.get_content_type() not in ('multipart/mixed', 'multipart/report'):
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.get_type() == 'text/plain' and \
+ if subpart.get_content_type() == 'text/plain' and \
subpart.get('content-description', '').lower() == 'notification':
# then...
return findaddr(subpart)
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org