News for hackers. Stuff that matters.
Re:Create Your Own Posterous with Jekyll, PHP, Mailgun, and S3 by twakefield on Monday March 12, 2012 @01:27PM (#3694453)
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
Re:Create Your Own Posterous with Jekyll, PHP, Mailgun, and S3 by andrewjshults on Monday March 12, 2012 @01:30PM (#3694463)
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; }

Re:Create Your Own Posterous with Jekyll, PHP, Mailgun, and S3 by blakeperdue on Monday March 12, 2012 @01:48PM (#3694539)
Also possible with Postmarkapp's Inbound hook, and they support image attachments. They even provide PHP, Ruby, Python libraries for saving attachments.
Re:Create Your Own Posterous with Jekyll, PHP, Mailgun, and S3 by toomuchtodo on Monday March 12, 2012 @04:26PM (#3695305)
Could you not have used Cloudmine instead of a virtual machine slice to handle the email webhooks/content conversion?
Re:Create Your Own Posterous with Jekyll, PHP, Mailgun, and S3 by jazzychad on Monday March 12, 2012 @05:49PM (#3695774)
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.
Re:Create Your Own Posterous with Jekyll, PHP, Mailgun, and S3 by mrothe on Monday March 12, 2012 @04:10PM (#3695213)
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.

Re:Create Your Own Posterous with Jekyll, PHP, Mailgun, and S3 by beaumartinez on Monday March 12, 2012 @04:28PM (#3695323)
Well, thanks for educating us as to how it should be done.
Re:Create Your Own Posterous with Jekyll, PHP, Mailgun, and S3 by mrothe on Tuesday March 13, 2012 @10:21AM (#3698531)
Sorry, I was in a bad mood. I should have written:

This is now how you edit that file. You should edit this file using `visudo`, which "locks the sudoers file against multiple simultaneous edits, provides basic sanity checks, and checks for parse errors" (quotes text from man page).

Re:Create Your Own Posterous with Jekyll, PHP, Mailgun, and S3 by jazzychad on Monday March 12, 2012 @04:58PM (#3695485)
My apologies, please let me know how it should be done? You're right, though, all of my other technical knowledge has become null and void because I goofed this part up.
Re:Create Your Own Posterous with Jekyll, PHP, Mailgun, and S3 by siculars on Monday March 12, 2012 @04:23PM (#3695289)
show us the way, o wise one.
Re:Create Your Own Posterous with Jekyll, PHP, Mailgun, and S3 by newsoundwave on Monday March 12, 2012 @04:33PM (#3695348)
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.