Port of mailgun/talon (signature detection in mails) from Python to JavaScript