[Answered ]-Debugging 500 on incoming Mail on Heroku from Mailgun

2πŸ‘

βœ…

I finally figured out what the problem was:

1) in the Mailgun tutorial, the route you create doesn’t have a β€˜/’ at the end (example is: http://myhost.com/messages) – however, APPEND_SLASH caused problems for the POST redirect then. The solution is to simply append the ”/’ at the end for the redirect

2) (potential further issue later in production) – do note that in Django 1.5 the allowed_host value was introduced which restricts the domains which are allowed to make POST requests. I believe this is only used in production environments (debug = false) but could cause problems later so make sure that you set these accordingly as well (I believe to allow mailgun.org as host).

Thanks to everybody who tried to help out!

πŸ‘€Jonas

Leave a comment