top | item 3694074

Create Your Own Posterous with Jekyll, PHP, Mailgun, and S3

48 points| jazzychad | 14 years ago |blog.jazzychad.net | reply

11 comments

order
[+] andrewjshults|14 years ago|reply
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|14 years ago|reply
Also possible with Postmarkapp's Inbound hook, and they support image attachments. They even provide PHP, Ruby, Python libraries for saving attachments.
[+] toomuchtodo|14 years ago|reply
Could you not have used Cloudmine instead of a virtual machine slice to handle the email webhooks/content conversion?
[+] jazzychad|14 years ago|reply
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|14 years ago|reply
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.

[+] beaumartinez|14 years ago|reply
Well, thanks for educating us as to how it should be done.
[+] mrothe|14 years ago|reply
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).

[+] jazzychad|14 years ago|reply
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.
[+] siculars|14 years ago|reply
show us the way, o wise one.