bartv
(Bart )
17 Maggio 2018, 5:16am
1
I just realised that I’m no longer seeing any bounces being handled. When checking my mail log, I see the following line for each incoming email:
Failed to POST the e-mail to https://blenderartists.org/admin/email/handle_mail: 404
This has been going on for 4 days. I just did a rebuild to latest and I see the same thing happening.
mpalmer
(Matt Palmer)
17 Maggio 2018, 5:29am
2
What changed four days ago? What do the app logs say?
bartv
(Bart )
17 Maggio 2018, 5:30am
3
I then did a rebuild also. It just seems like that /admin/email/handle_email route is gone - I can’t access it from a browser either.
Edit: hang on, I missed your question about app logs. Will dig that up now.
mpalmer
(Matt Palmer)
17 Maggio 2018, 5:32am
4
Could you access it from a browser before?
bartv
(Bart )
17 Maggio 2018, 5:36am
5
Ah that was useful. Apparently nginx is rate-limiting my own IP address:
2018/05/17 04:48:41 [error] 312#312: *5257301 limiting requests, excess: 100.873 by zone "bot", client: xxxxx, server: _, request: "POST /admin/email/handle_mail?api_key=xxxxx&api_username=system HTTP/1.1", host: "blenderartists.org"
This is uncharted area for me; any thoughts on how I can fix this?
1 Mi Piace
bartv
(Bart )
17 Maggio 2018, 6:29am
6
Looking a little deeper, I also see this in production.log:
Started POST "/admin/email/handle_mail?api_key=[FILTERED]&api_username=system" for xxx at 2018-05-17 05:57:37 +0000
ActionController::RoutingError (No route matches [POST] "/admin/email/handle_mail")
Perhaps the rate-limiting was a secondary effect of a missing route, causing many retries?
zogstrip
(Régis Hanol)
17 Maggio 2018, 7:08am
7
Pretty sure that route is still there. We use it here on meta and receive lots of every day.
bartv
(Bart )
17 Maggio 2018, 7:20am
8
Gotcha. Is there a way to print the active routes? I do still see handle_email in config/routes.db, but I’m not sure where to do from there to debug this.
zogstrip
(Régis Hanol)
17 Maggio 2018, 7:28am
9
Is your API key properly working? You might get a 404 because the request isn’t being authenticated to an admin account?
1 Mi Piace
bartv
(Bart )
17 Maggio 2018, 7:34am
10
YES! That was it! My API key had disappeared from the admin, very strange.
Thanks for your help Régis!
And for what it’s worth, wouldn’t an ‘401 unauthorized’ response be better in this case than a ‘404 not found’?
3 Mi Piace
This topic was automatically closed after 2214 days. New replies are no longer allowed.