posting to blog via email part iii

Well all fine and dandy, but… …I can’t send mail to my "spare server" when off campus because of the stupid firewall. But for all practical purposes, my laptop is a "spare server." It has php, it has cron, it has mail, I have root access. So, step one, create a blog account (from the terminal)

sudo niutil -create / /users/blogstuff   
sudo niutil -createprop / /users/blogstuff uid 505   
sudo niutil -createprop / /users/blogstuff realname "Blog User"   
sudo niutil -createprop / /users/blogstuff home "/Users/blogstuff"   
sudo niutil -createprop / /users/blogstuff shell "/dev/null"   
sudo niutil -createprop / /users/blogstuff gid 20   
sudo niutil -createprop / /users/blogstuff passwd "*"    
sudo passwd blogstuff  

Set up the alias sudo pico /etc/postfix/aliases add a line like this

blogstuff:"|/Users/blogmail/wordpress/wp-mail.php"

Edit /etc/hostconfig set

MAILSERVER=-YES-

restart postfix

sudo /System/Library/StartupItems/Postfix/Postfix stop 
sudo /System/Library/StartupItems/Postfix/Postfix start   

Edit the wp-mail.php script and send mail to blogstuff@localhost

About Wesley Wright

Born on a mountain top near New York City, Craziest state in the land of the pretty. Raised in the woods so's he knew every tree, Killed him a bear when he was only three.
This entry was posted in Blogs, Projects. Bookmark the permalink.

Leave a Reply