Replace last use of deprecated rfc822 module.
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# A simple milter that has grown quite a bit.
|
# A simple milter that has grown quite a bit.
|
||||||
# $Log$
|
# $Log$
|
||||||
|
# Revision 1.70 2006/11/21 18:45:49 customdesigned
|
||||||
|
# Update a use of deprecated rfc822. Recognize report-type=delivery-status
|
||||||
#
|
#
|
||||||
# See ChangeLog
|
# See ChangeLog
|
||||||
#
|
#
|
||||||
@@ -11,7 +13,6 @@
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import StringIO
|
import StringIO
|
||||||
import rfc822
|
|
||||||
import mime
|
import mime
|
||||||
import email.Errors
|
import email.Errors
|
||||||
import Milter
|
import Milter
|
||||||
@@ -1581,12 +1582,8 @@ class bmsMilter(Milter.Milter):
|
|||||||
try:
|
try:
|
||||||
msg.dump(out)
|
msg.dump(out)
|
||||||
out.seek(0)
|
out.seek(0)
|
||||||
msg = rfc822.Message(out)
|
msg = out.read().split('\n\n',1)[-1]
|
||||||
msg.rewindbody()
|
self.replacebody(msg) # feed modified message to sendmail
|
||||||
while True:
|
|
||||||
buf = out.read(8192)
|
|
||||||
if len(buf) == 0: break
|
|
||||||
self.replacebody(buf) # feed modified message to sendmail
|
|
||||||
if spam_checked:
|
if spam_checked:
|
||||||
if gossip and self.umis:
|
if gossip and self.umis:
|
||||||
gossip_node.feedback(self.umis,0)
|
gossip_node.feedback(self.umis,0)
|
||||||
|
|||||||
Reference in New Issue
Block a user