* In isMailBroken, we consider header with unknown charset as valid.
This is because, Python may don't know some encoding and we don't
want the script to tag the mail as broken is this case.
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.2--patch-6
try :
for text , charset in email.Header.decode_header( headerContents ) :
text.decode( charset or 'ascii' )
+ except LookupError , e :
+ #
+ # FIXME: We got an unknown charset.. In doubt, we
+ # consider the header as valid.
+ #
+ continue
except UnicodeDecodeError , e :
brokenHeaders.append( headerName )
if brokenHeaders :