The MU forums have moved to

Posting by email (9 posts)

  1. SteveAtty
    Posted 13 years ago #

    Well I was bored today so I've been coding.

    Although there are lots of clients to allow posting to your blog with out using the web back end sometimes there will be cases where you'd rather not do that for security reasons (for example accessing it from an internet cafe)

    WPMU "supports" a post by email but it involves going out to different pop3 email boxes to get the posts.

    I've written a new version which uses a local virtual domain and a single pop3 box.

    So the user emails which ends up in a pop3 mail box on a server somewhere (preferably the same server as WPMU)

    My process then opens that pop3 account and reads each email in turn.

    It will only post if the sender email ID matches the username it is associated with (from the user table).

    users can specify some "options" in the email:

    wppbm-tags: comma separated list of tags for this post
    wppbm-status: publish [default] | draft | pending
    wppbm-type: post [default] | page
    wppbm-comments: open [default] | closed

    It currently accepts basic html marked up (bold, italic, underline) messages (either manually coded or from the rich text editor in google mail). Yahoo marks its html messages up differently so its not working if you try to use their Rich Text Editor.

    Things that need adding are:

    A PID field (so that people can't just "fake" the sender email address).
    Ability to support posting to different blogs (rather than just primary).
    Ability to support posting from more than one email account.

    To use this modification (one single file which you need to drop into the ROOT of your WPMU install) you have to be able to edit your postfix server configuration.

    I've only tested this on Linux so you've been warned.

    This is the first pass at it and I'm wondering if anyone is interested in it?

    If people are then I'll wrap the code up and put a post up at my blog with details on how to configure it.

  2. tdjcbe
    Posted 13 years ago #

    +1 for that.

    The problem I see with what you have (and actually with wpmu doing this as well.) is that the email account is still going to have to be created on the server. (edit: And that's going to be an issue as every platform is different and may or many not allow php script to issue command line scripts) You can get around that with reading a generic account and add in an option like you have but then you'll have to deal with users who forget or put the wrong one.

    +1 though. I'd like to see it.

  3. SteveAtty
    Posted 13 years ago #

    You create one single email account on the server and use virtual domains inside postfix with a catch all to route anyemailaddress@my.virtual.domain to oneaccount@my.real.domain and then you read that.

    So as long as the users email theirwpmulogon@my.virtual.domain and the email from the email account associated with that account it will allow them to post to their primary logs.

    I've got an interview at 9am tomorrow morning but I'll try to document it all in a blog post after that.

  4. andrea_r
    Posted 13 years ago #

    +1 for me too. Holla at me when the post is up, I'll send peeps your way.

    (yes, I am down with my bad self tonight)

  5. tdjcbe
    Posted 13 years ago #

    I wonder if I can do that with Exim. Have to go look at it.

  6. kgraeme
    Posted 13 years ago #

    So how do you protect against spam?

  7. SteveAtty
    Posted 13 years ago #

    At the moment if the sender email isn't in the user's table then it just dumps it.

    It also wont post if the sender email doesn't match the registered email for that user. So if you and I are both registered on the same blog site you can't submit posts pretending to be me unless you know my registered email address.

    That is not really enough security which is why I'm going to work on adding a PID which has to be provided when posting.

    I don't know if exim supports virtual domains but the real thing this relies on is a catch all account. As long as you have some way (even using an external domain company who support catch all accounts) to funnel all the emails to the various users into one single pop3 account then this should work.

  8. SteveAtty
    Posted 13 years ago #

    And here it is, in all the gory details.

    As I've said - this is a work in progress. I really want to be able to get at the user meta data to add a PID and then I'll add into the blog data so that the owner of a blog can add additional emails/PIDs to open access up.

  9. SteveAtty
    Posted 13 years ago #

    Configuration screens added and a couple of other features (like categories and security PIDs)

About this Topic

  • Started 13 years ago by SteveAtty
  • Latest reply from SteveAtty