

Create Your Own Posterous with Jekyll, PHP, Mailgun, and S3 - jazzychad
http://blog.jazzychad.net/2012/03/12/create-your-own-posterous.html

======
twakefield
Very cool Chad. Appreciate the post. I'll also add that you could create the
Route using the Mailgun Routes API: <http://documentation.mailgun.net/api-
routes.html>

------
andrewjshults
To validate that the mailgun response actually came from mailgun add this at
line 17:

if($_POST['signature'] !== hash_hmac('sha256', $_POST['timestamp'] .
$_POST['token'], MAILGUN_KEY)) { exit; }

------
blakeperdue
Also possible with Postmarkapp's Inbound hook, and they support image
attachments. They even provide PHP, Ruby, Python libraries for saving
attachments.

------
toomuchtodo
Could you not have used Cloudmine instead of a virtual machine slice to handle
the email webhooks/content conversion?

~~~
jazzychad
I don't think so (though I'm not sure). Cloudmine looks like it is aimed at
mobile app backends, and the amount of code used for this project would be too
custom for what is afforded on those types of services.

------
mrothe
chmod u+w /etc/sudoers # edit file to add new user

This is _not_ how you do this! I stopped reading once I read that line. I
can't take anyone serious who does this.

~~~
siculars
show us the way, o wise one.

~~~
newsoundwave
Not the original commenter, but I'm guessing they meant two things:

1) You should technically only be editing /etc/sudoers through visudo.

2) You should also have an admin/root group. All you would need to do then is
"sudo adduser <blah> admin/root". This group is the one you specified in
/etc/sudoers to have root permissions.

