blosxthis: blosxom blogging via email.

I really like the simplicity of blosxom. But sometimes I'm not able to easily create a file on the blog server. When borrowing a friend's Treo, I started thinking about blogging via Email or SMS messages. So here's the code for mailing in blog entries, deleting them, and a minimal ability to edit blosxom files.


news using blosxthis setup notes security license

news

Well, somebody else got the first published program for emailing to blosxome blog. Blosmail can be found here. Personally I like my paranoid bloated version better, but then I would.

I've also got a beta version of blosxthis that includes support for saving and linking jpeg attachments. That code lives here. It's an ugly perl hack, but should be safe.

Using blosxthis

In order to keep other people from emailing moby dick onto your blog, all actions require a password. If you want more security, read the note below on security

Setting up Blosxthis

The software is here.
To set up the software:
  1. This only works if you are running a mail server such as sendmail, postfix or qmail on your web server. OS X heads who want to use the built in sendmail should look here.
  2. Copy the blosxthis.pl file some place where it can be executed. ( your home directory or /usr/local/bin )
  3. Make sure you have write permission to a blosxom blog directory.
  4. You need to set up your mail delivery system so that mail to a specific mail account gets piped through blosxthis. How this works depends on your email software.

Random notes

If you are blogging via SMS, it makes sense to go with the high security passwords, since they're actually shorter to type.

High security mail blogging

We normally use a unencrypted password to prevent other people from posting mail to our blog. Most people won't worry about the fact that their mail gets stored on dozens of machines, sent over wireless networks and may be accidentally bounced to a mail administrator.

If you are one of the people who do worry, here's the high tech solution. Instead of mailing the password every time, we hash (encrypt) the password 20 times and print out a list of 4 digit hashes. Print out & carry this list or put it on your Palm pilot. The first time you want to send a blog entry, you use the 20th hash and scratch it off the list. The second time you use the 19th and so on. If you forget where you are on the list, jump down to a low number. You can always go to a lower number, but you can never reuse a number or jump back up to a higher number. And neither can an atacker, which is the whole point.

When you've used up your list of 20, just generate a new list of 20 or 200 or however many you want.

You can generate the list of hashes with the buildhash.pl program. This program also asks you for the name of your count file, which keeps track of how many hashes you've generated and how many you've used.

You also need to edit the line in your mail forwarding file to include the path to the count file.
|./blosxthis password /path/to/blogdir /path/to/countfile.

General Warnings, disclaimer & license

This script was written with security in mind. However, if it does fail, it will probably mean that hackers can put files on your web server. This is generally the start of a really bad day.

Blosxthis
Copyright 2002, tenhand.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.