[GH-ISSUE #610] TrueNAS Core Email Alerts to Ntfy SMTP Server #457

Closed
opened 2026-05-07 00:24:23 +02:00 by BreizhHardware · 1 comment

Originally created by @Robert-litts on GitHub (Feb 16, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/610

Good Evening,

Thank you for all the help on Discord on 2/15/23 as we worked through the config of the SMTP server and attempts to get TrueNAS Core E-Mail alerts to publish to Ntfy.

I was able to successfully setup the Ntfy SMTP server and publish an e-mail to it using the command line instructions provided in the configuration documents, to confirm that ports were configured correctly and that Ntfy would receive the message properly. Then, I went to my TrueNAS Core server and ran the same e-mail test from the command line and Ntfy received the e-mail properly. Using the same configuration as the command line, I went to the automatic settings within TrueNAS (System --> Email && System --> Alert Services) and setup my e-mail server to point to Ntfy, but would not receive a notification on Ntfy.

After turning on debugging in the logs, I found the following multi-part messages being received by Ntfy in the logs, but not showing up in my Ntfy app on the Android or Web app. Here is the relevant section of the log which shows the start of the incoming SMTP mail of the failed TrueNAS notification.

Feb 16 01:04:00 notification ntfy[661]: DEBUG truenas.local/192.168.5.202:40404 SMTP Incoming mail, anonymous login
Feb 16 01:04:00 notification ntfy[661]: DEBUG truenas.local/192.168.5.202:40404 SMTP MAIL FROM: test@mydomain.me (with options: smtp.MailOptions{Body:"", Size:1113, RequireTLS:false, UTF8:false, Auth:(*string)(nil)})
Feb 16 01:04:00 notification ntfy[661]: DEBUG truenas.local/192.168.5.202:40404 SMTP RCPT TO: test@mydomain.me
Feb 16 01:04:00 notification ntfy[661]: TRACE truenas.local/192.168.5.202:40404 SMTP DATA: Content-Type: multipart/mixed; boundary="===============2138658284696597373=="
Feb 16 01:04:00 notification ntfy[661]: MIME-Version: 1.0
Feb 16 01:04:00 notification ntfy[661]: Subject: TrueNAS truenas.local: TrueNAS Test Message hostname: truenas.local
Feb 16 01:04:00 notification ntfy[661]: From: =?utf-8?q?Robbie?= <test@mydomain.me>
Feb 16 01:04:00 notification ntfy[661]: To: test@mydomain.me
Feb 16 01:04:00 notification ntfy[661]: Date: Thu, 16 Feb 2023 01:04:00 -0000
Feb 16 01:04:00 notification ntfy[661]: Message-ID: <truenas-20230216.010400.344514.b'8jfL'@truenas.local>
Feb 16 01:04:00 notification ntfy[661]: 
Feb 16 01:04:00 notification ntfy[661]: This is a multi-part message in MIME format.
Feb 16 01:04:00 notification ntfy[661]: --===============2138658284696597373==
Feb 16 01:04:00 notification ntfy[661]: Content-Type: multipart/alternative; boundary="===============2233989480071754745=="
Feb 16 01:04:00 notification ntfy[661]: MIME-Version: 1.0
Feb 16 01:04:00 notification ntfy[661]: 
Feb 16 01:04:00 notification ntfy[661]: --===============2233989480071754745==
Feb 16 01:04:00 notification ntfy[661]: Content-Type: text/plain; charset="utf-8"
Feb 16 01:04:00 notification ntfy[661]: MIME-Version: 1.0
Feb 16 01:04:00 notification ntfy[661]: Content-Transfer-Encoding: base64
Feb 16 01:04:00 notification ntfy[661]: 
Feb 16 01:04:00 notification ntfy[661]: VGhpcyBpcyBhIHRlc3QgbWVzc2FnZSBmcm9tIFRydWVOQVMgQ09SRS4=
Feb 16 01:04:00 notification ntfy[661]: 
Feb 16 01:04:00 notification ntfy[661]: --===============2233989480071754745==
Feb 16 01:04:00 notification ntfy[661]: Content-Type: text/html; charset="utf-8"
Feb 16 01:04:00 notification ntfy[661]: MIME-Version: 1.0
Feb 16 01:04:00 notification ntfy[661]: Content-Transfer-Encoding: base64
Feb 16 01:04:00 notification ntfy[661]: 
Feb 16 01:04:00 notification ntfy[661]: PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv
Feb 16 01:04:00 notification ntfy[661]: L0VOIj4KClRoaXMgaXMgYSB0ZXN0IG1lc3NhZ2UgZnJvbSBUcnVlTkFTIENPUkUuCg==
Feb 16 01:04:00 notification ntfy[661]: 
Feb 16 01:04:00 notification ntfy[661]: --===============2233989480071754745==--
Feb 16 01:04:00 notification ntfy[661]: 
Feb 16 01:04:00 notification ntfy[661]: --===============2138658284696597373==--
Feb 16 01:04:00 notification ntfy[661]: DEBUG truenas.local/192.168.5.202:40404 SMTP Incoming mail error: EOF
Originally created by @Robert-litts on GitHub (Feb 16, 2023). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/610 Good Evening, Thank you for all the help on Discord on 2/15/23 as we worked through the config of the SMTP server and attempts to get TrueNAS Core E-Mail alerts to publish to Ntfy. I was able to successfully setup the Ntfy SMTP server and publish an e-mail to it using the command line instructions provided in the configuration documents, to confirm that ports were configured correctly and that Ntfy would receive the message properly. Then, I went to my TrueNAS Core server and ran the same e-mail test from the command line and Ntfy received the e-mail properly. Using the same configuration as the command line, I went to the automatic settings within TrueNAS (System --> Email && System --> Alert Services) and setup my e-mail server to point to Ntfy, but would not receive a notification on Ntfy. After turning on debugging in the logs, I found the following multi-part messages being received by Ntfy in the logs, but not showing up in my Ntfy app on the Android or Web app. Here is the relevant section of the log which shows the start of the incoming SMTP mail of the failed TrueNAS notification. ``` Feb 16 01:04:00 notification ntfy[661]: DEBUG truenas.local/192.168.5.202:40404 SMTP Incoming mail, anonymous login Feb 16 01:04:00 notification ntfy[661]: DEBUG truenas.local/192.168.5.202:40404 SMTP MAIL FROM: test@mydomain.me (with options: smtp.MailOptions{Body:"", Size:1113, RequireTLS:false, UTF8:false, Auth:(*string)(nil)}) Feb 16 01:04:00 notification ntfy[661]: DEBUG truenas.local/192.168.5.202:40404 SMTP RCPT TO: test@mydomain.me Feb 16 01:04:00 notification ntfy[661]: TRACE truenas.local/192.168.5.202:40404 SMTP DATA: Content-Type: multipart/mixed; boundary="===============2138658284696597373==" Feb 16 01:04:00 notification ntfy[661]: MIME-Version: 1.0 Feb 16 01:04:00 notification ntfy[661]: Subject: TrueNAS truenas.local: TrueNAS Test Message hostname: truenas.local Feb 16 01:04:00 notification ntfy[661]: From: =?utf-8?q?Robbie?= <test@mydomain.me> Feb 16 01:04:00 notification ntfy[661]: To: test@mydomain.me Feb 16 01:04:00 notification ntfy[661]: Date: Thu, 16 Feb 2023 01:04:00 -0000 Feb 16 01:04:00 notification ntfy[661]: Message-ID: <truenas-20230216.010400.344514.b'8jfL'@truenas.local> Feb 16 01:04:00 notification ntfy[661]: Feb 16 01:04:00 notification ntfy[661]: This is a multi-part message in MIME format. Feb 16 01:04:00 notification ntfy[661]: --===============2138658284696597373== Feb 16 01:04:00 notification ntfy[661]: Content-Type: multipart/alternative; boundary="===============2233989480071754745==" Feb 16 01:04:00 notification ntfy[661]: MIME-Version: 1.0 Feb 16 01:04:00 notification ntfy[661]: Feb 16 01:04:00 notification ntfy[661]: --===============2233989480071754745== Feb 16 01:04:00 notification ntfy[661]: Content-Type: text/plain; charset="utf-8" Feb 16 01:04:00 notification ntfy[661]: MIME-Version: 1.0 Feb 16 01:04:00 notification ntfy[661]: Content-Transfer-Encoding: base64 Feb 16 01:04:00 notification ntfy[661]: Feb 16 01:04:00 notification ntfy[661]: VGhpcyBpcyBhIHRlc3QgbWVzc2FnZSBmcm9tIFRydWVOQVMgQ09SRS4= Feb 16 01:04:00 notification ntfy[661]: Feb 16 01:04:00 notification ntfy[661]: --===============2233989480071754745== Feb 16 01:04:00 notification ntfy[661]: Content-Type: text/html; charset="utf-8" Feb 16 01:04:00 notification ntfy[661]: MIME-Version: 1.0 Feb 16 01:04:00 notification ntfy[661]: Content-Transfer-Encoding: base64 Feb 16 01:04:00 notification ntfy[661]: Feb 16 01:04:00 notification ntfy[661]: PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv Feb 16 01:04:00 notification ntfy[661]: L0VOIj4KClRoaXMgaXMgYSB0ZXN0IG1lc3NhZ2UgZnJvbSBUcnVlTkFTIENPUkUuCg== Feb 16 01:04:00 notification ntfy[661]: Feb 16 01:04:00 notification ntfy[661]: --===============2233989480071754745==-- Feb 16 01:04:00 notification ntfy[661]: Feb 16 01:04:00 notification ntfy[661]: --===============2138658284696597373==-- Feb 16 01:04:00 notification ntfy[661]: DEBUG truenas.local/192.168.5.202:40404 SMTP Incoming mail error: EOF ```
Author
Owner

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

Fixed in github.com/binwiederhier/ntfy@e9b05e8ed7 and github.com/binwiederhier/ntfy@5f75e98861.

This was fun!

<!-- gh-comment-id:1436014661 --> @binwiederhier commented on GitHub (Feb 19, 2023): Fixed in https://github.com/binwiederhier/ntfy/commit/e9b05e8ed7aaf1b66dcfdff5a6f5f66b256604af and https://github.com/binwiederhier/ntfy/commit/5f75e98861702c662d97f97ff65cf99f63e85ae0. This was fun!
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#457
No description provided.