Closed malvidin closed 4 years ago
The SMTP plugin fails to get any data when a date field is invalid. From the CDMC Spam dataset, TEST_00528.eml returns this error:
"error": "worker:failed to scan: File \"/usr/local/lib/python3.7/email/utils.py\", line 198, in parsedate_to_datetime ; TypeError: cannot unpack non-iterable NoneType object"
The offending string is: Date: 2002/09/14 Sat 13:06:03 GMT
Date: 2002/09/14 Sat 13:06:03 GMT
Thanks, @malvidin. This is actually a really annoying issue in python's email parser[1]. I've added handling for this issue, so it should work fine now.
[1] https://bugs.python.org/issue30681
The SMTP plugin fails to get any data when a date field is invalid. From the CDMC Spam dataset, TEST_00528.eml returns this error:
"error": "worker:failed to scan: File \"/usr/local/lib/python3.7/email/utils.py\", line 198, in parsedate_to_datetime ; TypeError: cannot unpack non-iterable NoneType object"
The offending string is:
Date: 2002/09/14 Sat 13:06:03 GMT