Jeremy Smith's blog

Entry Is Labelled

Post to Your Blog@Case Blog Via Email

Keith mentions that posting to your blog via email would be a nice feature.

I would have to agree.

What would, also, be nice would be the ability to post via SMS... and IM (XMPP)... and any WAP-enabled device.

But, let's move in baby steps. First, blog via email.

What's the best way to go about that?

The easy answer would be to setup an email server on the Blog@Case machine. Then, a user merely sends an email to <user>@blog.case.edu; and the content of that email gets posted. But, what about spam? And, I am really not in love with the idea of having to administrate Yet Another Mail Server (YAMS) on the blog machine. So, we'll call this one plan B (or plan Z).

There's also scripts/plugins like pop3-to-blog.pl and pop2blog, which will check any arbitrary POP3 email account and post whatever emails are in that account to a specified blog. It would be "easy enough" to modify either one of those to be multi-user. And, modify them to only post emails whose subject line contains [Post This To Blog] or some other identifier. But, again, this seems kind of hackish.

There's also MT-Email. This one would work where any user wishing to post to his or her blog via email would have to setup a forwarding filter that would redirect all email of a specific type to a specific place that would be monitored.

Hmmm... I am still not sure. It may just end up being that I will need to install a mail server on the blog server.

*shudder*

We'll see. I think I need to sub-categorize the Blog@Case ToDo List over on the left.

Comments

  1. gravatar

    One option on message addressing:

    The folks over at Blogger.com have a system set up where you address plain text messages to [user].[secretword]@blogger.com or some such thing where [user] is your login name and [secretword] is NOT your blogging account password. So, in our case, [secretword] is NOT your Case network password.

    At any rate, it is something to include in the considerations.

    The WordPress package can be configured to check a specific POP account for messages. You have to schedule a job that periodically hits the /includes/mail.php file via http but that's not such a difficult thing to do. The drawback here is that it still requires a dedicated POP account. One way around that would be to modify the logic so it only pulls messages with a pre-defined tag in the subject, or some other header data that can be read without downloading all messages, or marking them all as read. It would then be a simple thing to strip the flag from the subject line and process the message as a post. This doesn't address the spam issue but, again, it's a starting point.

  2. gravatar

    Yea, I was thinking about it last night. The [user].[secretword] variant is probably something I would use such that only so-called "authorized" users could make an email post. However, to save some email namespace pollution, I would probably encode the secret word in the subject something like:

    From: jms18@case.edu
    To: jms18@blog.case.edu
    Subject: [Secret Word] Check Out the Digs
    Body: Yada yada yada

    Obviously, the secret word would be configurable by the user.

    This all still means I need to run an email server on the blog machine. *sigh*

  3. gravatar

    I bet we could come up with something involving program delivery. It would be kinda hackish- you would probably need to do something like


    From: jms18@case.edu

    To: jms18@blog.case.edu

    Subject: [blog][Secret Word] Check Out the Digs

    Body: Yada yada yada


    where the program delivery script would note that [blog] was set, and then check [Secret Word] against wherever the Secret Word is set (LDAP, MT DB, etc.) - if [blog] isn't set, the program delivery script would drop the message and let whatever other delivery method deal with it

    i.e. an ldap entry would have:

    maildeliveryoption: mailbox

    maildeliveryoption: program

    mailprogramdeliveryinfo: bloghandler


    we would have to have a way of getting the mail server to get access to the blog stuff, but I don't think that's insurmountable. We would probably also need to make a change or two to the script that checks for people that have vacation but not mailbox set in maildeliveryoption to check for program but not mailbox too.

  4. gravatar

    Ooh, that's a good one, Sam. I am assuming that the server will, then, pass the text of the email via STDOUT to the program specified in mailprogramdeliveryinfo.

    If that's the case, MT has an XML-RPC interface. We could have the script on the mail server use that API to perform the posting of the message.

    Hmmm... wait, no. The XML-RPC interface requires the user's credentials. We would have to make a superuser and give that superuser "create an entry" permission on everyone's blog. I don't like that.

    If we did some NFS mount magic, it might be easier.

  5. gravatar

    I am using v2evolution and find the system there too complicated for me to setup blogging via e-mail. i am yet to get used to WP though I would love the feature.