New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing attachment when email is not multipart and only contains an attachment #2727
Comments
Oh and for some context at first we though the bug was #1624 |
I presume you're sending this message with SMTP and not the API? And also that the message arrives at its destination okay with the attachment intact? |
Indeed the message is an incoming email into postal that should then trigger an HTTP endpoint that forwards the mails to our application. To the best of my knowledge, the message does not include the attachment in the HTTP endpoint json call. (oh and happy new year by the way !) |
Haha happy new year indeed! Whatever sends the message with Amazon SES to Postal doesn't construct it with parts, Postal won't identify the attachment at all. Even the scanners I've seen use message parts, are you constructing this message yourself or do you have another device involved? |
I was indeed surprised to see the absence of parts in the email. The email is generated by a company that sends it to our company, we're looking into the possibility of ask them to change the way it is generated. But some mail clients seems to think the email is valid, I haven't found a tool that says the email is invalid. |
Yeah its definitely Postal being very strict in this context but I'm not sure how extensive the changes would need to be in order to parse it. I can't immediately see where the attachments are parsed out in either lib/postal/smtp_server/client.rb or lib/postal/message_db/database.rb or lib/postal/message_db/message.rb |
This is definitely a bug. I never thought to look for attachments in a non-multipart email. I will see if we can fix it. |
As a note, Ive encountered this before from gmail DMARC report emails. They also only send the attachment with the report, and no body text/html. I was hoping to use postal to assist in parsing and reporting of these DMARC emails, as opposed to grabbing the data by hand, but with this bug, its not yet possible. |
Describe the bug
When an email has no text or html content and is not multipart and only contains an attachment, postal doesn't show the attachment in the webUI.
To Reproduce
Expected behaviour
For the attachment to be displayed and downloadable in the webUI
Environment details
Additional information/context
postal_example.eml.gz
The text was updated successfully, but these errors were encountered: