mmspulautin.pl

Summary

mmspulautin.pl is your solution for moblogging (mobile blogging) with Blosxom. It takes email messages or multimedia messages (MMSes) sent to email addresses as input, and outputs a Blosxom entry with thumbnails and content that has been converted to various formats.

Current version is 0.3 (2005-09-18). Changelog

mmspulautin.pl was written by Antti Vähä-Sipilä <avs@iki.fi>.

If you link here, use http://www.iki.fi/avs/mmspulautin.

Word of warning

This is an early alpha release, and the script probably contains more bugs that I can count. Use at your own risk: I take no responsibility for anything that happens, or does not happen, when using this software. Please report all bugs. Also, the code makes your eyes hurt, probably I will clean that up in later versions as well. See known bugs.

Requirements

First of all, you need some basic knowledge of Unix-style machines, Perl, and compiling things. I may have more time to write more detailed install instructions here in the future, but for the time being, you need to be adventurous.

Installation

First, make sure you got a working Blosxom setup. Then, take mmspulautin.pl and stick it to some directory that you can run it from. Take a look at the configuration items in the start of mmspulautin.pl. The meaning of configuration items is explained there.

Having configured the script, you now need to make sure you have a proper support of codecs in ffmpeg. Type "ffmpeg -formats" and see if the amr codec is present. If not, you need to compile ffmpeg with AMR support. At the time of writing, this involves obtaining AMR source from 3GPP. See libavcodec/amr.c in the ffmpeg distribution for details. The URL given in the amr.c file has probably changed because 3GPP keeps releasing new versions of the AMR codec. Also note that if you are compiling on non-Intel platform, the AMR codec source typedefs need to be fixed. If you want MP3 support, you also need to compile ffmpeg with lame.

Now that everything is set, you need to send yourself some test MMS or email messages. Save them to files from your mail client (with full headers; an 'mbox' style file with one message is what I mean) and run mmspulautin.pl by piping the mail message to it. Be sure to set $reporting to get debug output. Note: I was told that the MIME decoding module that I am using uses your environment variable LC_CTYPE for something and fails if it contains something exotic. Therefore, just stick to the 'C' locale when doing the tests (or unset LC_CTYPE). When you run the script through Procmail, this is unlikely to matter. And: never ever skip this command line testing part. Use some dummy directories and check that the script actually creates the files as it's supposed to. Only after you've satisfied with the script on the command line, put it in real use.

When you have determined that everything works, you can put the necessary recipe in your .procmailrc to pipe mails to mmspulautin.pl. This looks something like this:


:0
* ^TOyour@blog.address
| /home/youracct/bin/mmspulautin.pl

Now, send a test message to yourself and it should appear in the blog.

Help me to test this thing

After you have made it this far, please send me an MMS from your phone. I use those MMSes to debug this script and to find out whether there are any mystical problems with some MMSCs that need special attention. Please send your MMS to avs+mms@iki.fi, and include some multimedia content (image, video, audio) and some text, preferably using weird letters (like, if you have an Arabic character set in your phone, send me some Arabic).

Please include the following information in your message: your phone make and model, your operator, and if possible, your email address.

Noteworthy items (and hints on usage)

Known bugs

All .3g2 and .awb files are stored as .3gp and .amr, respectively. This should not cause any problems as web browsers detect the right plugin by MIME type anyway, and these are the same (video/3gpp and audio/3gpp) for all of these file types.

Security

The script should not be using any user-supplied data in dangerous ways. All content is renamed before writing to the filesystem. However, as the script relies on other software, any security holes in those packages may expose vulnerabilities.

The authentication of the messages depends only on the password. As email is not secure, you should be using a disposable password that you do not use elsewhere.

If you encounter any security vulnerabilities in this software, please let me know immediately: avs@iki.fi.

Changelog

License

Copyright (C) 2003-2005 Antti Vähä-Sipilä

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

See GNU GPL here.