Skip to content
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

SMTP output bot: add Content-Disposition MIME header #2018

Closed
ghost opened this issue Jul 12, 2021 · 0 comments
Closed

SMTP output bot: add Content-Disposition MIME header #2018

ghost opened this issue Jul 12, 2021 · 0 comments
Labels
bug Indicates an unexpected problem or unintended behavior component: bots
Milestone

Comments

@ghost
Copy link

ghost commented Jul 12, 2021

The CSV attachments sent by the SMTP output bot are not recognized as CSV by MS Outlook.

Probably the SMTP output needs to add an additional MIME header to the attachment in the mail, so that Microsoft Outlook interprets the attachment as CSV-file.

So this:
Content-Disposition: attachment; filename="somefeed.csv"
needs to be added using
https://docs.python.org/3/library/email.compat32-message.html#email.message.Message.add_header
at about this place in the IntelMQ code:

msg.attach(MIMEText(attachment, 'csv'))

(assumptions only, needs to be verified)

@ghost ghost added bug Indicates an unexpected problem or unintended behavior component: bots labels Jul 12, 2021
@ghost ghost added this to the 3.0.1 milestone Jul 12, 2021
@ghost ghost self-assigned this Aug 16, 2021
ghost pushed a commit that referenced this issue Aug 18, 2021
fixes display of the attachment in mail clients

fixes #2018
@ghost ghost closed this as completed in d87ec6a Aug 19, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: bots
Projects
None yet
Development

No branches or pull requests

0 participants