mail2blosxom

another test … just put together a mail2blosxom script (makes the procmail rule shorter)

#!/bin/bash

# -- Where's blosxom sitting?
BLOSXOM=/home/larcher/public_html/blosxom/blosxom.cgi
# -- Where's the new post go?
post="/home/larcher/blog/emailed/`date +%y-%m-%d.%H-%M.txt`"

# -- strip off email headers and remove first line (which is blank)
formail -I "" 
 | tail +2 
 >> $post

# fix permissions
chmod a+r $post

# bake new pages (optional)
# $BLOSXOM -password=secret 

and this goes in .procmailrc

:0
* ^From.*([email protected])
* ^Subject:.*blogthis
{
    :0 c
        | /home/larcher/.scripts/mail2blosxom
    :0
        blog
}