A true static comment system with emails?

By reading this post on staticman I was thinking this morning of an email-based commenting system. You would still have a form but it posts to mailto:youradresshere@yourdomain.com. With a well made frontmatter inside the mail, that could generate some content that you would only have to copy/paste inside a post inside a comments/ directory for instance. We would obviously have to aggregate the content inside the produced html page.

Technically the frontmatter should link to a unique identifier, wich could be a true post or a comment.

For example, we would generate the following email that would be sent by the end user:

---
date: blahblah
respondto: 987cef4d71a
sender: 
---
The comment here.

Pros

  • Spam is managed by the spam mail system
  • This is truely static
  • It only uses standard technologies (you don’t even need to use Javascript unless you want form validation)
  • The site maintainer validates comments by actually putting them into the comments/ directory.

Cons

  • The site maintainer would have to manage comments by hand by copying and pasting (what about creating a filter/backend lib ? but I don’t like that)
  • For now the uniqueID is not human-readable, so an attack of the comment system would be to set the respondto frontmatter field to another page, and it could end on comments on page that you have not chosen. You would have to verify where the comments link to. This could lead in the end to a hugo command like hugo comment comments/my-new-comment.md, which would bring information on what post/comment it links to.
  • Deployment and manual action required on each comment. What if some post creates a buzz?
1 Like

There was a trope about all applications evolving to be a mail server.

You can do all of this outside of your web server