Member subscribing fails with "Too many login attempts." message

Hello,

I am using ghost 4.47.4 (self-hosted, docker), and the member subscribing fails.

The message displayed to the user is “Oops! There was an error sending the email, please try later.”

When looking at the logs I see:

2022-05-21T09:03:35.063203513Z [2022-05-21 09:03:35] ERROR "POST /members/api/send-magic-link/" 429 18ms
2022-05-21T09:03:35.063238589Z
2022-05-21T09:03:35.063243107Z Too many sign-in attempts try again in an hour
2022-05-21T09:03:35.063246333Z
2022-05-21T09:03:35.063249760Z "Too many login attempts."
2022-05-21T09:03:35.063252955Z "Too many login attempts."
2022-05-21T09:03:35.063256120Z
2022-05-21T09:03:35.063258715Z Error ID:
2022-05-21T09:03:35.063262082Z e52ae720-d8e4-11ec-a0db-89a8248d5688
2022-05-21T09:03:35.063265118Z
2022-05-21T09:03:35.063267902Z ----------------------------------------
2022-05-21T09:03:35.063270919Z
2022-05-21T09:03:35.063273573Z TooManyRequestsError: Too many sign-in attempts try again in an hour
2022-05-21T09:03:35.063276409Z at failCallback (/var/lib/ghost/versions/4.47.4/core/server/web/shared/middleware/api/spam-prevention.js:143:29)
2022-05-21T09:03:35.063279404Z at module.exports.<anonymous> (/var/lib/ghost/versions/4.47.4/node_modules/express-brute/index.js:146:44)
2022-05-21T09:03:35.063283342Z at tryCatcher (/var/lib/ghost/versions/4.47.4/node_modules/bluebird/js/release/util.js:16:23)
2022-05-21T09:03:35.063286848Z at Promise.successAdapter [as _fulfillmentHandler0] (/var/lib/ghost/versions/4.47.4/node_modules/bluebird/js/release/nodeify.js:23:30)
2022-05-21T09:03:35.063290505Z at Promise._settlePromise (/var/lib/ghost/versions/4.47.4/node_modules/bluebird/js/release/promise.js:601:21)
2022-05-21T09:03:35.063293531Z at Promise._settlePromise0 (/var/lib/ghost/versions/4.47.4/node_modules/bluebird/js/release/promise.js:649:10)
2022-05-21T09:03:35.063296306Z at Promise._settlePromises (/var/lib/ghost/versions/4.47.4/node_modules/bluebird/js/release/promise.js:729:18)
2022-05-21T09:03:35.063299071Z at _drainQueueStep (/var/lib/ghost/versions/4.47.4/node_modules/bluebird/js/release/async.js:93:12)
2022-05-21T09:03:35.063302387Z at _drainQueue (/var/lib/ghost/versions/4.47.4/node_modules/bluebird/js/release/async.js:86:9)
2022-05-21T09:03:35.063321032Z at Async._drainQueues (/var/lib/ghost/versions/4.47.4/node_modules/bluebird/js/release/async.js:102:5)
2022-05-21T09:03:35.063323988Z at Immediate.Async.drainQueues [as _onImmediate] (/var/lib/ghost/versions/4.47.4/node_modules/bluebird/js/release/async.js:15:14)
2022-05-21T09:03:35.063327334Z at processImmediate (internal/timers.js:464:21)
2022-05-21T09:03:35.063330070Z

I am using EU Mailgun for email sending. I have whitelisted my server’s IP just in case. The newsletter for the existing members is sent just fine (stats also work just fine). The only issue is with new members that are trying to sign-up.

Any suggestions?

Thank you!

It turned out to be my cloud provider that was blocking the SMTP (port 465). I had to open a ticket with my cloud provider to open these ports.

Also, check the OS-level firewall: Using Mailgun for SFTP times out - #2 by Southpaw1496

Hey, thanks for the answer. I have the same issue. With cloud provider, you mean the email service for transactional mails?

In my case, I use

  • Brevo for transactional emails
  • Mailgun EU for newsletters
  • Hetzner for hosting

Just the signup for news users causes issues (sometimes)

Hey! Hetzner has blocked port 465 which is used for email sending. You need to contact support and they will unblock it for you. There’s literally an option to unlock the mailing port when you try to open a support ticket.

Found it, thanks! I’ve sent a request to Hetzner to unblock 465. However, what I don’t understand is that these E-Mails are sent via Brevo from my understanding, using the port 587.

And if these E-Mails are sent via Hetzner somehow, how is it possible to sent some, but not all (if the port is blocked completely)? Quite confusing for me.