I encountered an issue while using the mail_to_misp extension with my newly configured MISP server.
Upon sending an email to the configured address, I noticed the following entries in the server logs:
28803 May 19 06:49:23 misp3 mail_to_misp.py[7447]: Job started.
28804 May 19 06:49:23 misp3 postfix/local[7446]: B1931BDE2C: to=<misp_handler@my.misp.handler.com>, relay=local, delay=1.1, delays=0.09/0.01/0/1, dsn=5.3.0, status=bounced
(Command died with status 1: "/usr/local/src/mail_to_misp/mail_to_misp.py -". Command output: Traceback (most recent call last): File "/usr/local/src/mail_to_misp/mail_to_misp.py", line 50, in <module> pseudofile = BytesIO(args.infile.read().encode('utf8', 'surrogateescape'))
AttributeError: 'bytes' object has no attribute 'encode'. Did you mean: 'decode'? )
It appears that the mail successfully reaches the server and the script attempts to parse the message. However, the process crashes with an AttributeError on a specific line of the script, throwing the following error:
AttributeError: 'bytes' object has no attribute 'encode'. Did you mean: 'decode'?
Considering the above, I would greatly appreciate any insights or assistance you can provide regarding the possible cause of this error. I'm eager to resolve this issue and fully utilize the capabilities of the mail_to_misp plugin.
I encountered an issue while using the mail_to_misp extension with my newly configured MISP server.
Upon sending an email to the configured address, I noticed the following entries in the server logs:
It appears that the mail successfully reaches the server and the script attempts to parse the message. However, the process crashes with an AttributeError on a specific line of the script, throwing the following error:
Considering the above, I would greatly appreciate any insights or assistance you can provide regarding the possible cause of this error. I'm eager to resolve this issue and fully utilize the capabilities of the mail_to_misp plugin.