I was wondering that, since this is almost a year old, if anything has become of this?
If it has then I've probably written all this for nothing (which is good!) and hopefully I can be pointed in the right direction. Maybe I even have some thoughts here to help improve it.
Next, I don't know about the whole argument of if this should be core or extension, I imagine that we can start as the latter and become the former (if that's even possible, IDK).
I'd like to help put something like this into place. However, although I can write most of the actual code, I'm none familiar with the codebase of phpbb, so I'll eventually need some help when it comes to integration.
Anyway I wanted to share what I had in mind for how this might work. I'm open to ideas, suggestions, criticisms, gotcha's in the phpbb codebase I'm not be aware of (which as I stated, I'm not familiar with outside of being a user), etc. Please try to keep the comments constructive.
mail server:
- Catch all email address receives all incoming email
- Each user has a hash associated with them (like a git commit). We can use something like the first six or so of a sha1 of their email address.
- Each board then has an associated hash, as do the topics and posts.
- When you receive and email, it's 'reply-to' address is a combination of these hashes user+board+topic+comment (up to 64 characters total, as by spec)
- To create a topic, a user must post the board name and the user's own hash (coming from their own email address). The system would then send another confirmation back to the user's address on file just to be sure (this could be optional). If they reply to that then it's posted.
- Collection of emails headers could also happen and if the headers appear the same over time, the reply method could be deemed unnecessary by the system (later version)
- Run as both a pass to script (mail server to forward the mail directly to it) or as a cron jon that runs every minute or so.
- As Cron, this script grabs all the emails form the catch all account.
- For each email, the address is split into it's parts, and the hash's matched.
- The user hash is matched to the user and the from address much match also.
- If the parts don't match or add up then the message is discarded.
- Otherwise, everything is posted and the view count increased.
- As mention earlier, if a post is deemed valid, headers could be saved in a per user basis (probably a later version).
- Option to never use email in user settings (this will ignore anything sent in via this user, basically discard their hash)
- A general setting to auto opt-in to everything you comment on. Maybe prefill an opt-in checkbox in the post options at the bottom, would this maybe be tied to the 'Notify of reply' checkbox?
- If following a topic via email, sending 'unsubscribe' as the subject opts out.
- 'opt-in' button/checkbox at top of topic pages.
- Hash's are sent via the digest emails as well.
- If you post via email to a board, you're auto-opted in.
- Obviously as an admin, whether to enable any of this is optional.
- Sending mails as a separate process (via system call to script) or even another cron job.
- The email server should probably be just for the board, otherwise the catchall can quickly get filled with junk that would require more processing.
- The would need to be db enhancements to hold the hash's.
- How are emails sent (multipart HTML Vs PlainText Vs HTML as PlainText), probably user optional
- Parsing/stripping the HTML from emails
- Looking into mail headers and see what can be used, such as RFC-2369, etc.
- To hold the downloaded mail while processing (mostly for cron), a temp table might need to be created (it will be emptied at end of job).
- Attachments, whether to allow them or not (in a later version).
Thanks!