Phrendo Posted December 15, 2021 Share Posted December 15, 2021 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! Quote Link to comment
trurl Posted December 16, 2021 Share Posted December 16, 2021 4 hours ago, Phrendo said: ran Diagnostics attach to NEXT post Quote Link to comment
Phrendo Posted December 16, 2021 Author Share Posted December 16, 2021 @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 Quote Link to comment
Phrendo Posted December 16, 2021 Author Share Posted December 16, 2021 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 Quote Link to comment
trurl Posted December 16, 2021 Share Posted December 16, 2021 Probably a plugin or docker you have installed is doing it wrong. Quote Link to comment
Phrendo Posted December 16, 2021 Author Share Posted December 16, 2021 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. Quote Link to comment
trurl Posted December 16, 2021 Share Posted December 16, 2021 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. Quote Link to comment
trurl Posted December 16, 2021 Share Posted December 16, 2021 I just ran diagnostics from the command line. It didn't even make a syslog entry. Quote Link to comment
Phrendo Posted December 16, 2021 Author Share Posted December 16, 2021 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). Quote Link to comment
trurl Posted December 16, 2021 Share Posted December 16, 2021 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 Quote Link to comment
trurl Posted December 16, 2021 Share Posted December 16, 2021 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? Quote Link to comment
Phrendo Posted December 16, 2021 Author Share Posted December 16, 2021 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. Quote Link to comment
Phrendo Posted December 16, 2021 Author Share Posted December 16, 2021 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 Quote Link to comment
trurl Posted December 16, 2021 Share Posted December 16, 2021 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. Quote Link to comment
trurl Posted December 16, 2021 Share Posted December 16, 2021 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. Quote Link to comment
Phrendo Posted December 16, 2021 Author Share Posted December 16, 2021 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? Quote Link to comment
Phrendo Posted December 16, 2021 Author Share Posted December 16, 2021 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 Quote Link to comment
Phrendo Posted December 16, 2021 Author Share Posted December 16, 2021 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. Quote Link to comment
sunbear Posted January 5, 2023 Share Posted January 5, 2023 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] Quote Link to comment
trurl Posted January 6, 2023 Share Posted January 6, 2023 Did you use the Test button in SMTP Settings? Quote Link to comment
Phrendo Posted January 6, 2023 Author Share Posted January 6, 2023 (edited) 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 January 6, 2023 by Phrendo Quote Link to comment
ljm42 Posted January 6, 2023 Share Posted January 6, 2023 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. Quote Link to comment
Phrendo Posted January 6, 2023 Author Share Posted January 6, 2023 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 Quote Link to comment
JonathanM Posted January 7, 2023 Share Posted January 7, 2023 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. Quote Link to comment
Phrendo Posted January 7, 2023 Author Share Posted January 7, 2023 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. Quote Link to comment
Recommended Posts
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.