On the way. My feeling is that it tries sending the mail two times, possibly with different ways (new, broken on CORE, way first and then the old way).
Actually, in the script folder there are some files that I don’t believe are supposed to be there.
root@truenas[~/scripts]# ls
changelog.txt
Drive ZDHB4PRB actual Power On Hours = 21520<br>
Drive ZDHB4PRB actual Power On Hours = 21520<br>Drive ZDHB53NK actual Power On Hours = 21520<br>
Drive ZDHB4PRB actual Power On Hours = 21520<br>Drive ZDHB53NK actual Power On Hours = 21520<br>Drive ZGY6MRQ6 actual Power On Hours = 13005<br>
Drive ZDHB4PRB actual Power On Hours = 21520<br>Drive ZDHB53NK actual Power On Hours = 21520<br>Drive ZGY6MRQ6 actual Power On Hours = 13005<br>Drive ZGY9ZN0G actual Power On Hours = 13006<br>
Drive ZDHB4PRB actual Power On Hours = 21520<br>Drive ZDHB53NK actual Power On Hours = 21520<br>Drive ZGY6MRQ6 actual Power On Hours = 13005<br>Drive ZGY9ZN0G actual Power On Hours = 13006<br>Drive 70S00214 actual Power On Hours = 11279<br>
Drive_Selftest_User_Guide.pdf
drive_selftest.sh
DS_Logs
mr_sendemail.py
multi_report_config.txt
Multi_Report_User_Guide.pdf
multi_report_v3.0.7_2024_06_08_config.txt
multi_report_v3.0.7_2024_06_08.txt
multi_report.sh
scripts
smr-check.sh
Statistical_Data.csv
statisticalsmartdata.csv
root@truenas[~/scripts]#
Also, I am not sure you received my data dump as I get the following.
root@truenas[~/scripts]# ./multi_report.sh -dump emailextra
Multi-Report v3.1 dtd:2025-01-17 (TrueNAS Core 13.3-U1)
emailing to Joe Schmuck & Attaching Drive Data and Multi-Report Configuration.
Processing...
Collecting the data and sending to Joe Schmuck for analysis.
Please enter a comment to Joe or just press Return to continue.
Example: "Hey Joe, ada2 last test age should be zero value. Could you
please take a look at it and let me know if it is okay? Thanks, Jimmy"
Enter your message: Hey Joe, Davvo here. The script created a bunch of files with the code's output as names, see the forum for more details.
Working...
Running Drive Self-test Script: /root/scripts/drive_selftest.sh
Joe's SMART Drive Self-test Script - Run: 18 January 10:48:20 PM
Script Version: 1.02 (17 January 2025), TrueNAS Core 13.3-U1
Logging Enabled
Using External Configuration File
Saving Dump Data
Short Test Mode:(3) "No SMART Testing Selected", Short Testing will not be executed.
Long Test Mode:(3) "No SMART Testing Selected", Long Testing will not be executed.
NO SHORT TESTS TO RUN
NO LONG TESTS TO RUN
22:48:20: Drive-Selftest Wrapping things up...
Elapsed Time: Program 0 minutes and 0 seconds elapsed.
Saving Log (file name: /root/scripts/DS_Logs/drive_test_18.txt)
Exiting Joe's SMART Drive Self-test Script
Collecting Report Data...
./multi_report.sh: line 4434: Drive ZDHB4PRB actual Power On Hours = 21520<br>Drive ZDHB53NK actual Power On Hours = 21520<br>Drive ZGY6MRQ6 actual Power On Hours = 13006<br>Drive ZGY9ZN0G actual Power On Hours = 13006<br>Drive 70S00214 actual Power On Hours = 11279<br>Drive 7TA007BL actual Power On Hours = 21702<br>: File name too long
root@truenas[~/scripts]#
Now I feel like it’s trying to run from one of those freshly created files. Issue looks very similar to Multi-Report - #293 by MikeO3; @MikeO3, can you check if you have the above files in the script’s directory as well?
Let me know if you received my dump . Also pinging @oxyde for this.
I did not follow closely the whole sendmail debacle but I believed to concern mostly SCALE and did not expect any major changes for CORE users… might be an issue in the version checking?
This Is not for sure depending from multi report itself, instead Is totally caused by the fact the script use only the credentials provided by the config in truenas (except the recipient obv).
The script try to grab and set anyway those settings in the gmail oauth despite in truenas are in the SMTP section, but i can’t confirm that this can work: what I have seen Is that if you populate the fields and still mantain oauth they are saved and passed in the mail.config, but i can’t confirm that the way the api handle the payload will not overwrite/ignore that and put the owner of the account like a default. I will try this specific use case, do the same and in case share the result, if Is what you expect! If possible i can try to improve this aspect
Honestly i think that Is something not depending on the email itself, in case @joeschmuck let me know. I admit i couldn’t test the script on Core, my system Is off waiting a new CPU, in case try to call It directly and let me know (basic usage example available on GitHub)
I found an error which is only related to CORE installations. The files gdisk and sgdisk were not present. If you did an upgrade then the files should have been there from version 3.07, however if you updated TrueNAS, the files are not part of the distribution like in SCALE, so Multi-Report would need to installed these two files. I made a change to the script to now check for the files if you are Checking and/or Backing up Partitions. Previously the files would only be installed for Partition Checking.
I hope this is the error causing the Line 4434 errors. Version 3.11 will be pushed out in a few minutes.
I was on beta 6, I have updated so it updated do 3,1 and updated the config, then on the next run it said there are 3 updates:
Multi-Report - Installed: 3.1, GitHub: 3.11
Drive_Selftest - Installed: 1.02, GitHub: 1.02
sendemail.py - Installed: , Github: 0.07
although the multi-report is on Version 3.11, If I update will generate an empty multi_report.sh and produce the error below. And the only way to get it working is downloading the latest multi_report.txt and rename it multi_report.sh
Updating Script…
3
sed: read error on /tmp/Multi-Report/: Is a directory
2
1
My guess is because of the configuration file, that is still on 3.1. Although the script version is 3.1.1 on the header of the emails still shows
@smic717394
Version 3.11 also fixes an update issue (fingers crossed), which I didn’t see prior to release.
Run ./multi_report.sh -update to grab the updated file, or download either the multi_report.txt or multi_report_v3.11_2025_01_18.txt from the Github account (LINK). There are the same file, I am going to be calling files now by their executing names, and include a copy that clearly identifies the version so we can have a few different versions on file.
EDIT: I see what you are saying, Fixed the version number.
EDIT2: Yes, something is wrong with the update for Multi-Report itself. Run it once, okay, twice, not okay. If you grab the copy from Github, it will work and once I have a fix for the updates, I will push it out as 3.12. I will test greatly before posting. The Sendemail update is working fine, so far.
I ran ./multi_report.sh -update and got a zero byte multi_report.sh file in my scripts directory.
root@HPe-Microserver[/mnt/tank/scripts]# ./multi_report.sh -update
TrueNAS does not support sendmail function, using sendemail.py to send you your email.
Multi-Report v3.1 dtd:2025-01-17 (TrueNAS Scale 24.10.1)
Update Script Routine
Removing Old Script Source if it exists
Downloading new script files
Multi-Report current version is: 3.1
The new version is: 3.11
Enter ‘y’ to commit or any other key to abort.
y
Updating Script…
3
sed: read error on /tmp/Multi-Report/: Is a directory
2
1
Your script has been updated and a copy of the User Guide and changelog is in your directory.
Exiting…
root@HPe-Microserver[/mnt/tank/scripts]#
@GrimmReaperNL i have made a check, actually when you swap from SMTP to oauth TN not preserving nor fromemail and fromname into the mail.config (but user/pass/security and port YES ).
My opinion: should be viable read this from the the MR config, without “breaking” the usage of the script outside the multi report scope; in your specific case you are using a gmail alias (kinda smart, especially if, like me, you are monitoring more than 1 system), but i’m not 100% sure that this can work with whatever email. Need to test a bit before push a new update
[1] Updating from 3.1 to 3.11 fails with above sed error @Jeff_Goldrich mentioned.
[2] Updating from 3.0.7 to 3.11 works.
[3] Running 3.11 after updating from 3.0.7 throws a version check error concerning mr_sendemail.py (version 0.08):
3. Sendemail - Installed: 0.06, GitHub: 0.08
./multi_report.sh: line 1482: [[: 08: value too great for base (error token is "08")
Just to emphasize: 0.08 got downloaded by curl and is available in path.
That is the problem I saw last night but I was way too tired to see straight to fix it. I have had a decent nights sleep and will have this fixed soon. I will need to do a lot of testing on both platforms before I post the fix.
In the meantime, you can grab a copy from the Github site and just install this.
Okay, let’s hope this fixes the majority of the problems. Version 3.12 is out on the Github site. You still may be able to use the ./multi_report -update option to grab the new file, if not, you will need to grab it the old fashioned way.
Time to change the oil in the car. Nasty weather too so I will make it fast.
root@truenas[/mnt/TrueNAS/scripts/multi_report]# ./multi_report.sh -update
TrueNAS does not support sendmail function, using sendemail.py to send you your email.
Multi-Report v3.1 dtd:2025-01-17 (TrueNAS Scale 24.10.1)
Update Script Routine
Removing Old Script Source if it exists
Downloading new script files
Multi-Report current version is: 3.1
The new version is: 3.12
Enter 'y' to commit or any other key to abort.
y
Updating Script...
3
sed: read error on /tmp/Multi-Report/: Is a directory
2
1
Your script has been updated and a copy of the User Guide and changelog is in your directory.
Exiting...
root@truenas[/mnt/TrueNAS/scripts/multi_report]#
And the script still turned into an empty file.
I tried to update using multi_report_v3.1_2025_01_17.
Works for me. I just came here to see why I was suddenly getting “File name too long” errors. Manually installed the latest update and everything works just fine again.
@GrimmReaperNL , version 0.09 is out, with the capability to read multi report config file.
So in the gmail oauth
i try to retrieve the From field of the mr config
i try to retrieve the FromName field of the mr config (@joeschmuck i know this is not part of the actual config, but we can plan to add it in next releases?)
if correctly setup, the email will be send with the same pattern of SMTP way, otherwhise the sender will be always the gmail account owner (the default).
I have performed some various test, and i can confirm that this will not work if the address is not set as an alias of your account, except gmail alias (myaddress+myalias.gmail.com). This is not impacting because the owner will be applied automatically by the api
If you have problem, delete old file and rerun the script to grab the latest version
FORGET: for everyone who use the sendemail outside the mr scope, this new capability will not break anything, i should have handle all exception well, in case let me know
File /mnt/TrueNAS/scripts/multi_report/sendemail_log/20250119_192049.txt successfully generated
5 totals file log
0 totals attachment
trying read mail.config
read mail.config successfully
Switching for the right provider
** Gmail OAuth version **
parsing Oauth config
switch from classic send and bulk email
mail hmtl provided
start parsing headers
parsing data from config
From found
using fallback fromemail
parsing html content
body is a file
check for attachements...
Encoding message
sending email
Email Sent via Gmail
>> All is Good <<