MISP / mail_to_misp

Connect your mail client/infrastructure to MISP in order to create events based on the information contained within mails.
GNU Affero General Public License v3.0
69 stars 25 forks source link

Python 3.6 unsupported? (fake smtp server) #13

Closed c-goes closed 6 years ago

c-goes commented 6 years ago

I try running the fake smtp server but this error occurs

Starting Fake-SMTP-to-MISP server error: uncaptured python exception, closing channel <smtpd.SMTPChannel connected 10.56.207.1:58874 at 0x7f6df2b9b320> (<class 'TypeError'>:process_message() got an unexpected keyword argument 'mail_options' [/usr/lib/python3.6/asyncore.py|read|83] [/usr/lib/python3.6/asyncore.py|handle_read_event|423] [/usr/lib/python3.6/asynchat.py|handle_read|171] [/usr/lib/python3.6/smtpd.py|found_terminator|386])

rommelfs commented 6 years ago

Looks like this mail_options argument is new in 3.5, I've tested on 3.4. Can you provide more info? Full stack trace?

Thanks!

c-goes commented 6 years ago

This was the full output. I enabled debug in config, still no stack trace. Could you tell me how to enable stack traces so I can help?

OS: Ubuntu 17.10 with python3 package (Python 3.6) MUA: Thunderbird with Outgoing SMTP set to Fake SMTP's IP

rommelfs commented 6 years ago

Seems to be a bug related to python 3.6: https://bitbucket.org/pytest-dev/pytest-localserver/issues/15/python-36-compatibility

Could you apply the referenced patch and see if it works? Thanks, Sascha

rommelfs commented 6 years ago

feel free to re-open if you had the possibility to try the proposed patch.

soap1337 commented 4 years ago

i know its 2 years later but i ran into this identical scenario with near identical symptoms and the patch, specifically the part below was the fix:

` def process_message(self, peer, mailfrom, rcpttos, data): CHANGE TO: def process_message(self, peer, mailfrom, rcpttos, data, mail_options=None,rcpt_options=None):

` I am running Py3.7.5 and i still had to apply this. I commented because this was a 'diamond in the rough' comment for me thanks for linking the 3.6 bug, I never would have found this otherwise!

niruvn commented 4 years ago

thanks @soap1337 , this works for me

kirac-tr commented 4 years ago

Hi, I wonder where you added this, I added it to my server file, I get the same error. @soap1337 thanks