# list of regular expressions which we will view as being indicative
# of an attachment
-attachment_regexes = [ r'\battach(ed|ment|ing)?\b(?im)',
- r'\balleg(o|at[oaie]|ando)(?im)' ]
+attachment_regexes = [ r'(?im)\battach(ed|ment|ing)?\b',
+ r'(?im)\balleg(o|at[oaie]|ando)' ]
# ignore quoted text (which might refer to attachments in previous emails)
attachment_regexes = [ r'(^|^[^\n>].*)' + x for x in attachment_regexes ]
attachment_expected = True
# check to see if this mime-type is something we can ignore
- elif ( re.match( r'message/(?m)', part.get_content_type() ) or
- re.match( r'multipart/(?m)', part.get_content_type() ) or
+ elif ( re.match( r'(?m)message/', part.get_content_type() ) or
+ re.match( r'(?m)multipart/', part.get_content_type() ) or
part.get_content_type() in ignored_types ):
continue