Stories
Slash Boxes
Comments

Slash Open Source Project

This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • by peloy (2936) on Monday November 19 2001, @10:24AM (#3699) Journal
    Hi,

    I guess I don't completely understand the problem. Do we want to submit e-mails we receive from a mailing list as stories, or as discussions?

    Submitting the mails from mailing lists as stories should be trivial, but I think the problem is that when there is a discussion on a mailing list you don't want to see all messages in the thread as separate stories; you want to see all messages going as comments to the story (or discussion, if the first message in the thread was posted as a discussion.)

    So, the problem seems to be: how de we map incoming messages to an existing discussion or story? Perhaps we would need to use the "In-Reply-To:" field of incoming messages and map that to the parent id in the comments table? In this case the message ID should probably be stored somewhere in the DB, probably in the comments table.

    This particular feature would make Slash a very powerful system because it would allow to use a Slash site as archive for mailing lists.
  • ok, this is a short desc. of a maillist2slash gateway I started to work on some time ago.
    1. Concepts (Slash / Maillist)
    • authors = maillist moderators/owners
    • section = maillist name
    • story = moderated message/message sent direct by an owner
    • submission = unmoderated message
    • comments = RE: to a slash story or comment
    • bidirectional, please :-)

    2. Process (mail to slash)

    • In the backgroud, have a deamon check for mail (by POP ?).
    • Get one mail at a time, and begin parsing.
    • Use the "real email" field and find out who is sending the message (From: ), in slash terms.
    • If it matches an author, chances are we format a story. If it matches a user, this has to be a reply to some story or comment, or a submission. Otherwise, reject the post.
    • If this is an ok post, work on it (w/ MIME::Tools ?) to get all bodyparts handy. We need to authenticate the user, understand his goal, translate the message(s) and store in DB.
    • Parse the textual body parts, and look for (XML-like?) directives in the text placed to govern topic, date, display, etc. (normally, Author is given to us by the email address, and section by the maillist name). Look at the Subject field and so forth to find out a reference to a story/comment in case the message is in fact a comment.
    • Fallback to defaut topic, section, author... if needed. Now we have all bits of information, process this to see if we should post a story or comment, submit, reject, etc. with a reason. Example: this msg is from Author X; The text included a <DISPLAY = "all"> directive; Does this author has posting rights to index section ?
    • Inline all textual parts as a story (a comment/a submission) and generate an intro if needed.
    • Apply filters. Save in DB.
    For Slash to mail, use another set of filters and process logic to output stories and comments by mail to maillists. I feel this direction is easier.

    Hum. This message is a mess; now you understand why I dropped. Hope it helps anyway.