Fall back to date instead, when no message ID is available

This commit is contained in:
Sven Slootweg 2012-06-18 17:09:46 +02:00
parent 633abafb7b
commit 66aa44c068
2 changed files with 4 additions and 4 deletions

4
parse
View file

@ -104,8 +104,8 @@ for email_file in file_list:
if message['message-id'] is None:
if options['ignore_invalid'] == True:
message_id = ""
print "WARNING: %s does not contain a valid message-id header. Empty message-id assumed." % email_file
message_id = message['date']
print "WARNING: %s does not contain a valid message-id header. Falling back to date." % email_file
else:
print "%s is not a valid e-mail file." % email_file
finished += 1

4
rename
View file

@ -66,8 +66,8 @@ for email_file in file_list:
if message['message-id'] is None:
if options['ignore_invalid'] == True:
message_id = ""
print "WARNING: %s does not contain a valid message-id header. Empty message-id assumed." % email_file
message_id = message['date']
print "WARNING: %s does not contain a valid message-id header. Falling back to date." % email_file
else:
print "%s is not a valid e-mail file." % email_file
finished += 1