Warning: Totally geeky and non-iPhone related post!
With our move to VOIP phones last year, our e-mail and our voice mail became integrated. For most of NAR, this means in their Lotus Notes INBOX they see their voice mail as just another e-mail message with a wav attached. They can listen to the e-mail via their phone, or from their desktop computer.
For various reasons CRT runs its own mail server, and my e-mail is on that server. The nice part is I still get my voice mail as an e-mail with a wav attached. I just lose the ability to listen to my voice mail via a phone. With the way I am from a personality standpoint, even if I could do it via phone, I’d still listen via a computing device.
The wavs are uncompressed so they can get quit large depending on the length of the voice mail left. While disk space on the mail server isn’t really a concern, I’d still like the files to be smaller. The biggest win will be for when I’m on the road for NAR and in a hotel who’s net connection isn’t that hot. (It happens more often than not, sadly.) Also, when checking voice mail on a mobile device a smaller download in a well supported wouldn’t hurt either.
I decided that I’d write a script to convert the wavs in the e-mail to mp3s on the fly. Since I’m using procmail on our mail server to do server-side sorting, its really easy to write a program/script to act as a filter to work with procmail. With what I know about procmail, having done similar things in the past, I knew that I’d receive the mail in raw format via STDIN and that I’d want to write my filtered mail out STDOUT in a similar fashion. Since my current scripting love is ruby, I thought I’d start there.
Last Friday July 6th at about 1 I picked up my 



