Mail time. Mail time! MAIL TIME!!! We just got a letter!
Run server.py
in the background and add the following to your nginx.conf
:
server {
listen 80;
server_name my_server.com;
location / {
proxy_pass http://localhost:8888;
proxy_set_header X-Real-IP $remote_addr;
}
}
Set the forward()
rule in your MailGun preferences:
forward("http://my_server.com/messages/store")
On your server, just run the following and you're good to go:
~/code/steve$ ./server.py
# => [I 130714 21:08:29 pid:11] Checking pidfile '/var/run/steve.8888.pid'
MIT