mailextract_py-patchtxt
By: a guest | Sep 19th, 2009 | Syntax:
None | Size: 0.82 KB | Hits: 649 | Expires: Never
--- mailextract.py.1 2006-04-26 23:56:34.000000000 +0200
+++ mailextract.py 2009-09-19 11:30:38.000000000 +0200
-64,6 +64,14 @@
if namedonly and not name:
src.read() # Read to next boundary.
continue
+ type = headers.gettype()
+ if type == "text/plain" :
+ continue
+ if type == "multipart/digest" :
+ boundary = headers.getparam("boundary")
+ src.push(boundary)
+ src.read()
+ continue
encoding = headers.getencoding()
if not encoding:
raise error, "unknown message encoding"
-80,6 +88,7 @@
mimetools.decode(src, dstfile, encoding)
if dstdir:
dstfile.close()
+ print
def usage():
cmd = os.path.basename(sys.argv[0])