I manually updated the script to 3.13 on my CORE system yesterday, and I’m no longer getting a Crontask Run “Filename too long” error email right after the report email as of this morning.
Your work on the script is very much appreciated!
I manually updated the script to 3.13 on my CORE system yesterday, and I’m no longer getting a Crontask Run “Filename too long” error email right after the report email as of this morning.
Your work on the script is very much appreciated!
Hyperbole? Confusing comment, if it’s not such.
@oxyde will be publishing Sendemail 0.14 which will fix the few of us who stopped getting emails with 0.13.
It is good that we have members who can donate free time and thier skills to help our community.
I just pushed out Multi-Report v3.14 to correct a possible gdisk/sgdisk missing error message. Only CORE is affected. And if sendemail.py
has an exit code other than ‘0’ (zero) then the sendemail.py error message will be included in the Standard Output (typically the CRON email).
Take care everyone.
I’m on TrueNAS Scale 24.10.2 and I manually installed Multi-Report v3.14 dtd:2025-01-28 yesterday. I had 3.12 on 24.04.2.5 working fine, but ran into the sendmail issue when I did the 24.10.1 update so I cleared out all the script files and started over with the latest files on Github. Now I get an e-mail from the cron task with no report data, just the command output and an error log file that contains this:
7 totals file log
0 totals attachment
trying read mail.config
read mail.config successfully
Switching for the right provider
Can't switch provider
The e-mail I get has this at the bottom:
Collecting Multi-Report Data...
Using mr_sendemail.py
Sendemail had a problem. Check the file log at /sendmail_log
{"error": true, "detail": "Can't switch provider", "logfile": "/mnt/TwoTBPool/scripts/sendemail_log/20250129_020204.txt", "total_attach": 0, "ok_attach": 0}
The report is e-mailed from an SMTP server account. Do I need to change something in my mr_sendemail.py file? The mr_sendemail.py version I am using is the v0.09 file from GitHub.
Hi,
I have the script running with cron with the same boxes unchecked as in the userguide, but svery day when the script run I get a Email with the output. Where is here the configuration misstake?
Run the script using ./multi_report.sh -update_sendemail
to force an update to sendemail v0.14. If that does not fix your problem, please let me know.
I am sorry, I do not understand what you are saying. I know there is a language barrier issue but we should be able to work through it.
I think you are saying that you get an email every day. If that is true, then that is normal. If you desire some different behaviour, please explain.
When I run the script to update this is the output:
root@freenas[/mnt/TwoTBPool/scripts]# sudo ./multi_report.sh -update_sendemail
Multi-Report v3.14 dtd:2025-01-28 (TrueNAS Scale 24.10.2)
- Update Script Routine
- Removing Old Script Source if it exists
- Downloading new script files
cat: /tmp/Multi-Report/multireport_sendemail.py: No such file or directory
- Sendemail.py current version is: 0.09
- The new version is:
Enter 'y' to commit or any other key to abort.
y
- Updating Script...
cp: cannot stat '/tmp/Multi-Report/multireport_sendemail.py': No such file or directory
- Your script has been updated.
Exiting...
root@freenas[/mnt/TwoTBPool/scripts]#
I manually updated to 0.14 script version from oxyde1989 / standalone-tn-send-email gihub page and same “Can’t switch provider” error occurs.
sorry for my bad english
I used the script about 2 years ago and imagined that an email only came when there was an error or every Monday with the config file
This is a problem. You should not be running sudo
, rather run as root
.
The commands inside the script require root
. I plan to experiment with permission soon.
No apology needed.
By default every Monday you should see the TrueNAS Configuration File, and Multi-Report Configuration File, plus the regular report.
The report is generated every time you run the script and it should send you an email with the subject line “ALL GOOD”, “CAUTION”, or “WARNING”. If it says “ALL GOOD” then you do not need to open the email, but anything else you should open the email and examine what the problem is.
If you are unable to receive the “ALL GOOD” email, run the script ./multi_report.sh -dump emailextra
to send me some data. I will provide you the help to receive that “ALL GOOD” email, even if your drives have errors right now.
I am using root account but if I don’t sudo the command this is what I get:
root@freenas[/mnt/TwoTBPool/scripts]# ./multi_report.sh
Multi-Report v3.14 dtd:2025-01-28 (TrueNAS Scale 24.10.2)
'fdisk' You either do not have elevated privledges or the REQUIRED file is missing.
'nvme' You either do not have elevated privledges or the REQUIRED file is missing.
'smartctl' You either do not have elevated privledges or the REQUIRED file is missing.
'zfs' You either do not have elevated privledges or the REQUIRED file is missing.
'zpool' You either do not have elevated privledges or the REQUIRED file is missing.
Checking for Updates
No GitHub Version File Available
No GitHub Version File Available
./multi_report.sh: line 2795: zpool: command not found
Running Drive Self-test Script: /mnt/TwoTBPool/scripts/drive_selftest.sh
/mnt/TwoTBPool/scripts/drive_selftest.sh: line 213: smartctl: command not found
/mnt/TwoTBPool/scripts/drive_selftest.sh: line 216: smartctl: command not found
Joe's SMART Drive Self-test Script - Run: 29 January 11:59:33 AM
Script Version: 1.03 (26 January 2025), TrueNAS Scale 24.10.2
Logging Enabled
Using External Configuration File
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
11:59:36.38: Drive-Selftest Wrapping things up...
Elapsed Time: Program 0 minutes and 3.24 seconds elapsed.
Saving Log (file name: /mnt/TwoTBPool/scripts/DS_Logs/drive_test_29.txt)
Exiting Joe's SMART Drive Self-test Script
Collecting Multi-Report Data...
Using mr_sendemail.py
Sendemail had a problem. Check the file log at /sendmail_log
{"error": true, "detail": "Can't switch provider", "logfile": "/mnt/TwoTBPool/scripts/sendemail_log/20250129_115937.txt", "total_attach": 0, "ok_attach": 0}
root@freenas[/mnt/TwoTBPool/scripts]#
Ok I see now that doing a “su root” in the shell while logged in as another user causes the privledges error, I didn’t get those errors when I logged out and logged in again as root user.
That said, I’m still getting the same error running ./multi_report.sh logged in as root user:
Sendemail had a problem. Check the file log at /sendmail_log
{"error": true, "detail": "Can't switch provider", "logfile": "/mnt/TwoTBPool/scripts/sendemail_log/20250129_120526.txt", "total_attach": 0, "ok_attach": 0}
I’m a bit confused…
The emails suggests that I have to update something:
Multi-Report v3.14 dtd:2025-01-28 (TrueNAS Scale 24.04.2.2)
Report Run 29-Jan-2025 Wednesday @ 18:14:59
Total Memory: 31Gi, Used Memory: 26Gi, Free Memory: 4.8Gi, Swap Used: 0B
System Uptime: 118 days, 6:05:24.199861
Script Execution Time: 32 Seconds
DRIVE_SELFTEST UPDATE AVAILABLE: VNothing Is Here --> V1.03
SENDEMAIL.PY UPDATE UPDATED: V0.14 --> V0.14
But when I try to do the updates, no new version appears:
root@truenas:/mnt/data/scripts# ./multi_report.sh -update
Multi-Report v3.14 dtd:2025-01-28 (TrueNAS Scale 24.04.2.2)
- Update Script Routine
- Removing Old Script Source if it exists
- Downloading new script files
- Multi-Report current version is: 3.14
- The new version is: 3.14
Enter 'y' to commit or any other key to abort.
^C
root@truenas:/mnt/data/scripts# ./multi_report.sh -update_sendemail
Multi-Report v3.14 dtd:2025-01-28 (TrueNAS Scale 24.04.2.2)
- Update Script Routine
- Removing Old Script Source if it exists
- Downloading new script files
- Sendemail.py current version is: 0.14
- The new version is: 0.14
Enter 'y' to commit or any other key to abort.
^C
Is there anything that I need to do, or can I just leave it like this?
OK, sorry, I get this email every day, then I have to see if I can manage to prevent this email from being displayed
Hi @Raquel427 , can i ask you to post the result of
midclt call mail.config | jq
Off course hiding sensitive data!
Do you have problem sending email from truenas GUI (using the test button)?
From what I understand, you do not want the email “displayed” unless there is a problem. Do I understand that correctly?
There are three ways to achieve that as I see it:
I think the better option is for you to setup an email rule. Most people prefer to see the email arrive as proof that the system is actually being looked at daily.
He has the opposite desire. He is getting emails daily, he just doesn’t want those.
Got my posts confused.
Here’s the output:
root@freenas[~]# midclt call mail.config | jq
{
"id": 1,
"fromemail": "truenas@nm-mail.com",
"outgoingserver": "mail.nm-mail.com",
"port": 25,
"security": "PLAIN",
"smtp": false,
"user": "",
"pass": "",
"fromname": "Local TrueNAS",
"oauth": {}
}
root@freenas[~]#
“fromemail” is the e-mail address I set when I did ./multi_report.sh -config
“outgoingserver” is my Exchange mail server (I changed the domain name)
Both of those are the same as what I used in the 3.12 config which worked.
However, should “smtp” be true? If so, where do I change it?