Event Invites through SourceHut

Note: It turns out the premise this post was based on is incorrect. It turns out that, although poorly documented, SourceHut does have a reasonable configuration of default allowed mime types.

Some people claim text/html does not belong in email. I'll avoid arguing for or against that standpoint, but will mention that I have been playing around a bit with generating multipart/alternative emails where the main content was encoded primarily as application/pdf, with a text/plain fall-back. Please understand any such creative expressions by me to be art pieces, illustrating how text rendered for hard copy paper might be the preferred presentation format for emails – thus showing the way for a possible better world. As of yet I have never forced such messages on any innocent recipient not fully understanding how to handle them.

I've recently encountered a problem with a service straight out blocking all emails containing other content-types than text/plain. To be specific, it is lists.sr.ht which actively refuses to pass on everything but that subset of emails by default. Definitely a sane default for text/html, and arguably it kind of is reasonable to also reject any of my emails using application/pdf for the main body. However that was not what I intended to send, but rather plain/text with a text/calendar icalendar (rfc5545) invite attached. A totally valid email, for which no part of their criticism is relevant.

Lets back up a bit and clarify the context; Those who read the very first post of this blog know that I frequent Copenhagen Rust Group's monthly meetings. As an attempt at easing and improving one of the administrative steps in organizing these events (work that never has been performed by me, I might add), I coded up an invitation mailer. A script aimed at requiring event information to be entered only once, and then automatically get reused also for the invitation email. Wishing to make scheduling convenient, a rfc5545 meeting request gets attached as mentioned above, bringing us full circle right back there. The popular belief seems to be that nothing can be done about the problems of posting non-text/plain messages to sourcehut-lists, and it frankly seems to be fairly poorly documented. After investigating the sr.ht's source code, I believe to have understood that there should be a settings page, at https://lists.sr.ht/<owner_name>/<list_name>/settings/content, allowing to open up for specific content-types. I've urged my list admin to add text/calendar, for a more sensible configuration. Maybe you would want to do the same, having for some reason found your way to this post?

Edit: factual correction:
After publishing this post I finally learnt that the list of allowed mime types by default supposedly is: (permitting text/calendar attachments)


Unless being a customer with them, there is not really any convenient way to figure that out though.

2022-07-10 19:46:00 +0000
Thoughts and feedback may be directed at me using the channel listed on my contact page.

Previous post Next post