Backup email with (invalid?) date header (Date: 2023-07-26 18:53:25.162982)
Restore email using --cleanup.
Expected outcome: GYB gracefully handles invalid date header, either:
Skipping message
OR using cleanup date
Actual outcome: GYB exits with unhandled exception:
Traceback (most recent call last):
File "gyb.py", line 2767, in <module>
File "gyb.py", line 2239, in main
File "gyb.py", line 1928, in message_hygiene
File "email\utils.py", line 200, in parsedate_to_datetime
ValueError: Invalid date value or format "2023-07-26 18:53:25.162982"
[26812] Failed to execute script 'gyb' due to unhandled exception!
Work-around: modify date header in offending .eml file to Date: Wed, 26 Jul 2023 18:53:25 +0900
Notes: the offending email is successfully restored if --cleanup is not used.
Full steps to reproduce the issue:
Date: 2023-07-26 18:53:25.162982
)--cleanup
.Expected outcome: GYB gracefully handles invalid date header, either:
Actual outcome: GYB exits with unhandled exception:
Work-around: modify date header in offending .eml file to
Date: Wed, 26 Jul 2023 18:53:25 +0900
Notes: the offending email is successfully restored if
--cleanup
is not used.