Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Diagnostics exception email sent to wrong email address

Featured Replies

Hello, I happened to have the logging window opened when I ran Diagnostics and noticed these lines show up in logging.

 

Dec 15 13:38:53 NAS sSMTP[23610]: Creating SSL connection to host
Dec 15 13:38:53 NAS sSMTP[23610]: SSL connection using TLS_AES_256_GCM_SHA384
Dec 15 13:38:55 NAS sSMTP[23610]: Sent mail for root@gmail.com (221 2.0.0 closing connection y16sm3292836pfl.69 - gsmtp) uid=0 username=root outbytes=556

 

Sending to [email protected] is odd, but also I did not receive any emails about it on the recipient address that I have configured in Unraid.  I checked the smtp account (which is not the same as my recipient address), to find an email about a missing diagnostic file "Output from your job 16".

 

The email shows TO: root, BCC: my smtp account address.

 

So there seems to be two issues/bugs here.

1) the [email protected] send  (this may only appear to be happening)

2) is the fact that it sent it to my smtp account rather than my recipient account (like all other unraid emails do).

 

Thanks!

  • Community Expert
4 hours ago, Phrendo said:

attach to NEXT post

  • Author

@trurl  I appreciate the response.  Right now Diagnostics shows every detail about my shares since I just moved everything to the array so that I can replace my cache NVME.


To be clear though, I am not asking for help here.  Just unofficially reporting a bug, I guess.

Here is what was in the email sent to my SMTP account.  My point is that it sent it to the wrong email address.  Is email config contained within the diagnostics?

Warning: copy(/boot/logs/nas-diagnostics-20211215-1338.zip): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/dynamix/scripts/diagnostics on line 335

 

 

  • Author

Here is a snip from my SMTP settings.  The email was sent to the Sending email address/SMTP account, rather than the Email Recipient. 

All other Unraid emails have gone to the Email Recipient account.  Hope this helps. Thanks

 

image.png.6038e29283ac779dbb85a3e7ca2a0485.png

  • Community Expert

Probably a plugin or docker you have installed is doing it wrong.

  • Author

You think a docker or plugin I have installed is sending an email to the wrong address when I run the built in diagnostics tool?

 

At any rate, I found the actual reason for the error in the diagnostics script. 

 

Line 89 of the diagnostics file runs 'mkdir -p /boot/logs' but only if running diagnostics from cli (which I am not).  It then attempts to copy files to that folder, but only if NOT running from cli on line 335.  I would assume that if a dev has previously ran from CLI, this would not show up as an error, since the folder would exist.  Mine is a new install.  This is a bug in the script.

LINE 89
if ($cli) {
// script is called from CLI
  echo "Starting diagnostics collection... ";
  exert("mkdir -p /boot/logs");
  $server = isset($var['NAME']) ? str_replace(' ','_',strtolower($var['NAME'])) : 'tower';
  $date = date('Ymd-Hi');
  $diag = "$server-diagnostics-$date";
  $zip = "/boot/logs/$diag.zip";
} else {
// script is called from GUI
  $diag = basename($zip, '.zip');
  $split = explode('-', $diag);
  $date = "{$split[2]}-{$split[3]}";
}

 

LINE 335
if ($cli) {
  echo "done.\nZIP file '$zip' created.\n";
} else {
  copy($zip,"/boot/logs/".basename($zip));
}

 

But it still doesn't solve the issue of the diagnostics script sending to the wrong email address.

  • Community Expert
2 minutes ago, Phrendo said:

sending an email to the wrong address when I run the built in diagnostics tool

As far as I know diagnostics doesn't send any email. Still seems like something non-standard you (or a hacker?) have installed.

  • Community Expert

I just ran diagnostics from the command line. It didn't even make a syslog entry.

  • Author
Just now, trurl said:

I just ran diagnostics from the command line. It didn't even make a syslog entry.

I am not sure what the syslog entry has to do with it.  How about remove/rename the /boot/logs folder (like my fresh install), then run diagnostics from the GUI (Like I did).  It will email the smtp account (not the recipient).

  • Community Expert
8 minutes ago, Phrendo said:

I am not sure what the syslog entry has to do with it.  How about remove/rename the /boot/logs folder (like my fresh install), then run diagnostics from the GUI (Like I did).  It will email the smtp account (not the recipient).

Just tried that. No email sent and no syslog entry

  • Community Expert
15 hours ago, Phrendo said:
Warning: copy(/boot/logs/nas-diagnostics-20211215-1338.zip): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/dynamix/scripts/diagnostics on line 335

Are you sure you don't have a flash drive problem?

 

  • Author
4 minutes ago, trurl said:

Are you sure you don't have a flash drive problem?

 

 

What would indicate this being a flash drive problem? Perhaps you need to test it on a fresh install.

 

I have Docker service disabled, VM service disabled, my plugins are CA or Dynamix owned.  I installed Unraid just a few days ago on a brand new thumb drive.  I just ran it again, same syslog entry.  With the same email sent to my SMTP account.

Dec 16 10:33:55 NAS sSMTP[32004]: Creating SSL connection to host
Dec 16 10:33:55 NAS sSMTP[32004]: SSL connection using TLS_AES_256_GCM_SHA384
Dec 16 10:33:57 NAS sSMTP[32004]: Sent mail for root@gmail.com (221 2.0.0 closing connection p20sm6855462pfw.96 - gsmtp) uid=0 username=root outbytes=556

 

You seem pretty dismissive about this, I guess it doesn't really matter.  From my perspective it is clearly 2 bugs.

Thanks for the help anyway.

 

  • Author

One last clue. Here is the original message in my gmail smtp account.  It is sending to root, BCC to my SMTP account.

 

Bcc: [email protected]
Return-Path: <XXXXXXbot@gmail.com>
Received: from NAS (ipx-x-x-x.lv.lv.cox.net. [x.x.x.x])
        by smtp.gmail.com with ESMTPSA id p20sm6855462pfw.96.2021.12.16.10.33.55
        for <XXXXXXBot@gmail.com>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 16 Dec 2021 10:33:57 -0800 (PST)
Message-ID: <[email protected]>
From: Console and webGui login account <XXXXXXbot@gmail.com>
X-Google-Original-From: "Console and webGui login account" <root@gmail.com>
Received: by NAS (sSMTP sendmail emulation); Thu, 16 Dec 2021 10:33:55 -0800
Date: Thu, 16 Dec 2021 10:33:55 -0800
Subject: Output from your job
       13
To: root


Warning: copy(/boot/logs/nas-diagnostics-20211216-1033.zip): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/dynamix/scripts/diagnostics on line 335

 

  • Community Expert
6 minutes ago, Phrendo said:

What would indicate this being a flash drive problem?

because /boot is the flash drive.

 

Since you never posted diagnostics this is all just speculation with not much to go on.

 

Did it even succeed in creating diagnostics?

 

Other speculations are not enough flash space or not enough RAM, which I wouldn't need to speculate about if I had diagnostics.

  • Community Expert
22 minutes ago, Phrendo said:

my plugins are CA or Dynamix owned.

Over the years, I seem to recall some spurious emails caused by plugin updates. They are always works in progress. I have always had my sending and recipient email the same for notifications so wouldn't have noticed if it sent to the sending email.

 

You might try booting in SAFE mode to see if it happens without any plugins.

  • Author

I can send you the diagnostics file privately if you tell me how.  I just dont want it public.

 

Regarding booting into safe mode, I can try that.  Can you tell me if there is a way to boot into safe mode without using a keyboard and monitor? ;-)

  • Author

Scratch that. I found a way to boot into safe mode without attaching a vid card etc.. 
Just let me know how to send you my diag file privately. Thanks

  • Author

I rebooted into safe mode, ran diagnostics and the same thing happens.

 

I bet it's a default php.ini error email, rather than the more robust unraid notify system.  Meaning, php is not seeing a certain file and the default error email goes out.

 

  • 1 year later...

Did you ever solve this?

 

I'm getting the same errors.

 

<22>Jan  4 09:00:06 SERVER  sSMTP[16696]: Creating SSL connection to host
<22>Jan  4 09:00:07 SERVER  sSMTP[16696]: SSL connection using TLS_AES_256_GCM_SHA384
<19>Jan  4 09:00:11 SERVER  sSMTP[16696]: 550 5.2.254 InvalidRecipientsException; Sender throttled due to continuous invalid recipients errors.; STOREDRV.Submission.Exception:InvalidRecipientsException; Failed to process message due to a permanent exception with message [BeginDiagnosticData]Recipient 'root' is not resolved. All recipients must be resolved before a message can be submitted. InvalidRecipientsException: Recipient 'root' is not resolved. All recipients must be resolved before a message can be submitted.[EndDiagnosticData] [Hostname=REDACTED.namprd14.prod.outlook.com]

  • Community Expert

Did you use the Test button in SMTP Settings?

  • Author

Sunbear,

It's not solved for me. I just tested it again.

1) Running Test from SMPT Settings works fine and the email goes to the correct recipient address.
2) Running Diagnostics Sends email to my smtp account at gmail, but not to my recipient address.
3) Running Diagnostics also tries to send to [email protected] still.

I am on 6.9.2.

 



 

Edited by Phrendo

In certain conditions (usually when there is unexpected output from a cron job or the 'at' command), Linux will send an email to root of the local server.  If you have email notifications configured that message will get forwarded to your notification email account. It may look like it went to '[email protected]' but clearly it didn't, as it ended up in your account. The fact that the email was sent is not a bug, but ideally the cron job or at command would be fixed to not have unexpected output.

 

It looks like something in the 6.9.2 diagnostics is triggering this for you. There have been many improvements to the diagnostics script in the nearly two years since Unraid 6.9.2 was released. To get them you simply need to upgrade to the latest release of Unraid.

  • Author

ljm42,

 

I have not really worried about it for over a year, I was just responding to Sunbear asking me out of the blue.  Yes, I can see that it's sending to "root" in the sent folder of my smtp account.  It's still sending the email to wrong recipient address (it's sending it to the smtp account).  Either way, I took your advice and "simply" upgraded to the latest release and now Im wondering why the heck I did that.  It never returned, no ping and the box is just beeping randomly now for 10 minutes. 

Thanks
 

1 hour ago, Phrendo said:

It never returned, no ping and the box is just beeping randomly now for 10 minutes. 

Attach a monitor and see what's on the local console.

  • Author
3 minutes ago, JonathanM said:

Attach a monitor and see what's on the local console.

 

 

See the attached, it seems to be cycling through FSCK.  Right now its at FSCK0013.204.  It's still beeps every once in a while, but not as often as when it started.

 

 

PXL_20230107_000728802.jpg

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.