Reputation: 16328
I have created a simple ASP.NET Web API app that receives parsed emails from SendGrid. Works well on my machine using a secure tunnel with ngrok. The parsed content of emails is posted to the locally hosted app.
However, when I deploy this app to Azure it does not work. I tried to use both HTTP and HTTPS for the callback URL in SendGrid, but emails are not processed. In the Activity page in SendGrid there is no entry for a Parsed email. And I get back a delivery failure email, for the email that should have been handled by SendGrid.
The response was: 550 no mailbox by that name is currently available
I know the app is reachable because I can do successful HTTP requests to other resources, from the browser or other tools.
Is there something that I might have missed? Some additional configuration, either for the app or in SendGrid?
Upvotes: 2
Views: 415
Reputation: 801
The short answer is this:
If you use CloudFlare for your DNS, it is highly likely that CloudFlare is stopping the inbound parse posts from SendGrid.
Review your Firewall Event Log in CloudFlare (under the Firewall Tab) and see if your Web API "Host" is appearing there.
If so, what you'll need to do is whitelist the IP Address range that SendGrid uses to send posts for the inbound parse.
Their current IP range for the inbound parse as of today is 167.89.117.0/24 (basically of the IP address from 167.89.117.0 to 167.89.117.255).
Hope this helps you or someone else with this same issue/root cause.
Upvotes: 2