[GH-ISSUE #776] SMTP server not accepting emails from internet #560

Closed
opened 2026-05-07 00:25:25 +02:00 by BreizhHardware · 4 comments

Originally created by @TheRealAlexV on GitHub (Jun 19, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/776

🐞 Describe the bug
I'm attempting to use ntfy to receive email alerts from outside my private network. I've setup an aname and mx record, however upon sending an email using gmail, I get a bounce back(personal information censored):

Message not delivered
There was a problem delivering your message to test_alerts+mytokengoeshere@notify.mydomain.com. See the technical details below, or try resending in a few minutes.

The response from the remote server was:
554 5.0.0 Error: transaction failed, blame it on the weather: error: {"code":40101,"http":401,"error":"unauthorized","link":"https://ntfy.sh/docs/publish/#authentication"}

If I send a test email using nc, it works fine.

💻 Components impacted
ntfy server

Originally created by @TheRealAlexV on GitHub (Jun 19, 2023). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/776 :lady_beetle: **Describe the bug** I'm attempting to use ntfy to receive email alerts from outside my private network. I've setup an aname and mx record, however upon sending an email using gmail, I get a bounce back(personal information censored): ``` Message not delivered There was a problem delivering your message to test_alerts+mytokengoeshere@notify.mydomain.com. See the technical details below, or try resending in a few minutes. The response from the remote server was: 554 5.0.0 Error: transaction failed, blame it on the weather: error: {"code":40101,"http":401,"error":"unauthorized","link":"https://ntfy.sh/docs/publish/#authentication"} ``` If I send a test email using nc, it works fine. :computer: **Components impacted** ntfy server
BreizhHardware 2026-05-07 00:25:25 +02:00
  • closed this issue
  • added the
    🪲 bug
    label
Author
Owner

@TheRealAlexV commented on GitHub (Jun 19, 2023):

This has something to do with the token authentication when coming from the internet. I changed the topic access to write only and now it works.

<!-- gh-comment-id:1597411528 --> @TheRealAlexV commented on GitHub (Jun 19, 2023): This has something to do with the token authentication when coming from the internet. I changed the topic access to write only and now it works.
Author
Owner

@binwiederhier commented on GitHub (Jun 19, 2023):

This is possibly a dup of https://github.com/binwiederhier/ntfy/issues/773

<!-- gh-comment-id:1597413470 --> @binwiederhier commented on GitHub (Jun 19, 2023): This is possibly a dup of https://github.com/binwiederhier/ntfy/issues/773
Author
Owner

@binwiederhier commented on GitHub (Jun 19, 2023):

You can try to manually modify your token in the sqlite database to be all lowercase and try if that works.

sqlite3 /var/lib/ntfy/user.db
select * from user_token;
update user_token set token='...' where token='...';
<!-- gh-comment-id:1597419238 --> @binwiederhier commented on GitHub (Jun 19, 2023): You can try to manually modify your token in the sqlite database to be all lowercase and try if that works. ``` sqlite3 /var/lib/ntfy/user.db select * from user_token; update user_token set token='...' where token='...'; ```
Author
Owner

@binwiederhier commented on GitHub (Jun 24, 2023):

I'm going to assume this is a dup of https://github.com/binwiederhier/ntfy/issues/773, let me know if you think it is not.

<!-- gh-comment-id:1605667688 --> @binwiederhier commented on GitHub (Jun 24, 2023): I'm going to assume this is a dup of https://github.com/binwiederhier/ntfy/issues/773, let me know if you think it is not.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#560
No description provided.