Skip to content

Anymail Mailgun: How to block a suspicious recipient? #324

Closed Answered by medmunds
Eraldo asked this question in Q&A
Discussion options

You must be logged in to vote

That IP is probably Mailgun (which uses GCP), so this is probably a legitimate webhook post from Mailgun to your server.

Is it possible you have Mailgun inbound routing set up? (That would generate the same error message, if the webhook secret was missing from the "receiving route forward url". Mailgun inbound is configured on a different dashboard page from their delivery tracking webhooks. Inbound spam with a spoofed recipient seems consistent with what you've described.)

If you remove the ANYMAIL_WEBHOOK_SECRET setting (and/or ANYMAIL = {..., "WEBHOOK_SECRET": ...} setting), it should not be possible to get "Missing or invalid basic auth" errors. Anymail doesn't even look at the HTTP_A…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Eraldo
Comment options

@medmunds
Comment options

Answer selected by Eraldo
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@medmunds
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants