Here's a set of instructions for how to configure Movable Type to work with your server so that you can post images to your blog directly from your phone. It's fairly complicated (though hopefully not as complicated as if you had to figure it out on your own) so it's probably only meant for people who really want a moblog (though I prefer the term mopho) and who don't want to have it hosted by a moblog site like textamerica.com or fotolog.net. That's probably a very thin slice of the early adopter crowd, I'm realizing now... even smaller if I factor out all the early adopters who are also geeks and don't need instructions like these. Oh well... I spent an hour writing these instructions so I might as well post them. Maybe 1 person will find them useful.
Requirements:
- A phone: buy a phone with a digital camera, and make sure your plan allows you to send email directly from the phone. (I have a
but there are a couple other phones that'll work just as well. There's a good listing of camera phones, with reviews, at textamerica.com.) - Access to a server's email configuration. My server uses a combination of qmail, procmail, and vpopmail... your settings may vary slightly and require slightly different instructions. I'll try to cover as many of the slight variations below as possible. If you'd rather not have complete control over your moblog, and instead get this set up with as few headaches as possible, you should check out fotolog.net and textamerica.com... they both have easy ways to get a moblog set up without all the hassle of messing with servers.
- The following perl modules need to be installed on your server: Getopt::Long, Image::Magick, MIME::Base64, MIME::Entity, MIME::Parser, and XMLRPC::Lite (though most if not all of them should already by there... the only tricky on might be Image::Magick).
Server Configuration for incoming emails from your phone:
- Download and save mt-moblog to your server. Chmod the file to 755, and remember where you saved it (since we'll have to point to it later).
- If you're using qmail, make sure that qmail knows to send messages to procmail instead of normally handling them. You may have a .qmail-default file in your home directory, or it might be somewhere like /var/qmail/vpopmail/domains/erikbenson.com/.qmail-default (where erikbenson.com would be replaced by your domain name). In either case, wherever it is, you should change the contents of the file to be this:
| preline procmail -t ./erik/Maildir/procmailrc
Where "./erik/Maildir/procmailrc" is the path to your procmailrc file. - Configure procmail to send messages from a particular email address to this script. Your procmail file may be in your home directory, somewhere like this: /home/eben/.procmailrc, or it may be somewhere else. In my case, since I'm using vpopmail, it's in a directory like this "/var/qmail/vpopmail/domains/erikbenson.com/erik/Maildir/".
- The toughest part about setting this up was figuring out how email was handled on my server (even though I was the one that set it up). Basically, qmail's job is normally to deliver the mail to the right Maildir. We want to make it deliver the mail to a script instead, and so have to use procmail, which makes a copy of the email and passes it to a script and then delivers the original email as per usual to the right Maildir.
Movable Type Configurations:
- Create a movable type blog for your moblog.
- Edit your movable type template to display this new type of content (here are the templates that I'm using: main index, date-based archive, individual entry, stylesheet.
- Create a directory for temporarily uploaded images (something like /home/eben/erikbenson.com/mophos/tmp), chmod to 777
- Create a directory for your images and thumbnails to be saved (something like /home/eben/erikbenson.com/mophos/images/), chmod to 777. Make sure that this directory is a subdirectory of the blog you set up in movable type. For example, if your moblog's main directory is /home/eben/erikbenson.com/mophos/, then make sure that your image directory is somewhere in the "mophos" directory. This will be important later on.
- You'll need to make a small change to one of Movable Types perl modules, to allow it to handle some encoding. Change your (mtroot)/lib/MT/XMLRPCServer.pm file in the following ways:
- Add at the top:
use MIME::Base64; - Change the line:
defined(my $bytes = $fmgr->put_data($file->{bits}, $local_file, 'upload'))
TO
defined(my $bytes = $fmgr->put_data(MIME::Base64::decode($file->{bits}), $local_file, 'upload'))
(I took these instructions from Ben Compton's original instructions for the script that I modified.)
- Add at the top:
Tying Movable Type and Server Together:
- Create a file called "mt-moblog.cfg" in your home directory with all of your server and movable type configurations.
- Here's an excerpt from the mt-moblog file describing how to set up the configuration file:
example .mt-moblog.cfg:
blogxmlrpc = http://www.randomlyhumming.com/mt/mt-xmlrpc.cgi
attachmentdir = images/moblog
tempdir = /home/ben/tmp/moblog
bloguser = yourusername
blogpass = yourpassword
blogid = 1
thumbnailsize = 150x150
removenewlines = 1
removebottomnewlines = 1Description of configuration values:
blogxmlrpc: path to your xmlrpc script.
attachmentdir: subpath from your blog's root directory where you want your images stored
tempdir: a directory suitable for dumping temporary files during processing
bloguser: your MovableType username
blogpass: your MovableType password
blogid: the MovableType ID for the blog you want to post on via this script
thumbnailsize: the dimensions of the thumbnails to be made. Thumbnailing will keep the same aspect ratio but limit the largest size to the dimensions you specify. So if you want your thumbnail to be 100 pixels wide or tall at most specify 100x100 here.
removenewlines: nuke all of the newlines out of the email body
removebottomnewlines: remove only the newlines at the bottom of the body - If you are using qmail, restart qmail at this point (if you have root privileges, and have qmailctl, you can do this by running the commands: qmailctl stop; qmailctl start;)
Test it:
- Send an email with photo attachment to the email address you set in your procmail file. I did a lot of this testing by sending emails from my regular email account rather than from the phone since I only get to send a couple dozen emails a month from the phone and didn't want to waste them. Unless you have an unlimited account, I would suggest the same for you.
- If it doesn't work on the first try, the fun part starts: debugging. If someone gets this far and has trouble getting it to work, feel free to contact me. I'm not an expert in these matters, but I'll try to help however I can.
- If it all works, you should be able to now have a moblog something like my own.
Good luck. I can say that after putting this together my thinking about weblogs and the future of them has changed quite a bit. Not being tied to a computer really opens up some possibilities like event blogging, and community moblogs organized by proximity in time and space.
thats a lot of instructions
i think i would rather use a service like textamerica that i don't have to spend time setting up and managing - it would seem that most would prefer that wouldn't they?
Posted by: Patrick | Wednesday, 27 August 2003 at 02:47 PM
Yeah.
That's why I put the instructions up... because it was a lot more difficult than it should've been. I definitely suggest using a community site if you really just want to get something up and running with the minimum amount of hassle. The only thing that doing it yourself will allow is to have more control over the final product, and to satisfy the curiosity of geeks like me.
Posted by: Erik Benson | Wednesday, 27 August 2003 at 03:03 PM
sdf
sadf
Posted by: asff | Tuesday, 23 September 2003 at 11:38 PM
COM ports
Hi ..
My name is Arun and I have a lil problem that I need some help with.
I recently bought a phone and a Hawking Bluetooth Adapter. It worked just fine on day one... and has not worked since then. Neither the Phone's User help nor the Hawking Help was of any help. Is there any place where I could read and understand the "technology" of connecting the Phone to the Computer via Bluetooth?
Pls Advice...
Arun.
Posted by: Arun | Thursday, 06 November 2003 at 06:33 AM
Wow! Thanks!
Thanks for the great instructions! I'll DEFINITELY give this a spin - I really really like the idea of automatic thumbnailing!
(further details on my quest for a proper moblog solution here)
Posted by: Anders | Wednesday, 14 January 2004 at 05:48 AM
Any nice way to get mt-moblog to strip out the T-Mobile headers? I see there's a section in the code for Cingular, but I'm not 100% as to how to modify that for T-Mobile...
Thanks!
Posted by: Adam Lynch | Monday, 11 October 2004 at 06:53 AM
How does this approach handle "unique" e-mails from carriers like Sprint. Basically, Sprint doesn't attach the picture to the e-mail. Instead, they send you an HTML e-mail with links to view a page that has the original picture. Textamerica handles this...somehow. Any ideas? Thanks!
Posted by: jeff | Thursday, 10 November 2005 at 06:53 AM
un peu court mais pas mal du tout
;)
Posted by: Urban | Friday, 29 June 2007 at 03:23 PM
nice project with good design and pictures...best wishes...;-))
;)
Posted by: Susan | Sunday, 08 July 2007 at 09:43 PM
Let it be, let it be... What a strange place here.
;)
Posted by: Lucas | Saturday, 14 July 2007 at 03:32 PM
Very interesting website. Keep up the outstanding work and thank you...
;)
Posted by: Cantius | Sunday, 15 July 2007 at 05:36 PM
You are the best! Im glad...
;)
Posted by: Bibiana | Friday, 20 July 2007 at 08:08 AM
I want to say - thank you for this!
;)
Posted by: Urban | Sunday, 22 July 2007 at 07:09 AM
How many people, are so much and opinions. Personally I like the http://bransonmo.150m.com/branson-missouri-bed-and-breakfast.html ">branson missouri bed and breakfast [url=http://bransonmo.150m.com/branson-missouri-bed-and-breakfast.html]branson missouri bed and breakfast[/url]
. How about you? ;)
Posted by: Theodosia | Thursday, 26 July 2007 at 04:23 AM
It is interesting, what has pushed you on this thought? Here I think only about http://healthy-choice-foods.iranfreehost.info/healthy-fast-food-choice.html > healthy fast food choice
.
Posted by: Aniela | Sunday, 29 July 2007 at 08:40 PM
I look here many clever people have gathered, who can will prompt as the http://bassett-furnature.bestnewsguide.info/bassett-furniture-houston.html> bassett furniture houston
looks?
Posted by: Feliks | Tuesday, 31 July 2007 at 10:34 AM
It is surprising, how you have guessed before? Remember a proverb? 7 times measure, 1 time cut off. You should think about http://chiuahua-dogs.thesouthplace.info/chihuahua-dog-mix-pekingese.html> chihuahua dog mix pekingese
.
Posted by: Malgorzata | Thursday, 02 August 2007 at 03:36 AM
Excuse me, that without knock has entered into your possession. I simply wish to make your site better. A ferrari kit car
, that is necessary for us. Once again thanks for understanding. Good luck.
Posted by: Leonard | Saturday, 04 August 2007 at 10:09 AM
Your site has very much liked me. I shall necessarily tell about him to the friends.
Posted by: Martyna | Monday, 13 August 2007 at 01:22 PM
Very interesting website. Keep up the outstanding work and thank you...
Posted by: Anastasia | Wednesday, 15 August 2007 at 12:54 AM
You guys do a wonderful job! Keep up the good work!!!
Posted by: Wanda | Wednesday, 15 August 2007 at 08:16 PM
Well well well... Not bad, not bad... Can better? ;)
Posted by: Leokadia | Thursday, 16 August 2007 at 01:25 PM
Very doll!
Posted by: Bazyli | Tuesday, 16 October 2007 at 04:37 PM