LOG: MAIN
<= root@tnsbuilds01.tn.ixsystems.net U=root P=local S=1183
root@ScalePROD:/mnt/SnappitySnap/TrueNASInfo/Scripts/zemailData# delivering 1tOcw6-0002ph-1q
R: nonlocal for myNASEmail@gmail.com
LOG: MAIN
** myNASEmail@gmail.com R=nonlocal: Mailing to remote domains not supported
LOG: MAIN
<= <> R=1tOcw6-0002ph-1q U=Debian-exim P=local S=2508
LOG: MAIN
Completed
delivering 1tOcw6-0002pk-1y
R: system_aliases for root@tnsbuilds01.tn.ixsystems.net
R: nonlocal for myNASEmail@gmail.com
LOG: MAIN
** myNASEmail@gmail.com <root@tnsbuilds01.tn.ixsystems.net> R=nonlocal: Mailing to remote domains not supported
LOG: MAIN
Frozen (delivery error message)
… which basically boils down to …
Mailing to remote domains not supported
Some googling lead me to change update-exim4.conf.conf under /etc/exim4
You can check the status by using cat /var/log/mainlog which will show you the log file vice waiting on an email that doesn’t show up.
I still get R=nonlocal: Mailing to remote domains not supported as the error message.
I am unsure what the equivalent command is for exim, I thought it was exim -i -t < myfile.txt but it still gets blocked. I searched the internet a good portion of yesterday and tried a lot of different things (config file changes and different exim switches), still no luck.
If you uncover something, I of course am greatly interested as I’m sure many others who have scripts that send them emails. And I also attach files to my emails periodically so that for me is also important.
Good hunting!
P.S. This is a security update, so sendmail will not be coming back.
As mentioned before, I have a few homemade rclone backup scripts that send mail reports on completion; they use the mail utility at /usr/bin/mail, with said path hardcoded in the script.
This works, even on 24.10.1, but is probably too inflexible for your script, as I have not found a way to do attachments.
I will be spinning up a seperate VM of TrueNAS 24.10.1 to test with, I’m tired of changing my real system back and forth.
I will investigate the /usr/bin/mail on that VM. I may need to make a big change to the script to make it work, but first I need to be able to send myself an email form 24.10.1. Any email other than the GUI test.
This is enough to send me the body of the report (piped to $summaryfile) and a variable subject, with the result of the rclone run.
It is a very simple script - the $summaryfile is just a plain text report collated from the output of rclone, but still it works in 24.10.1 and keeps me updated regarding my backups.
The lucky dogs at iXsystems of course can make it happen, they are the ones who added the security restriction. Yesterday I had to take a break from this project and instead started to learn more about 3-D printing (for the new printer I have). I have completed that for now, time to turn my focus back to this email issue.
Ah ha! That at least explains why I didn’t get my report this morning. And seeing as Joe’s script has already saved me once when a 6 month old drive failed last week…
I would have expected something as standard as sendmail in all/most distributions being removed would have been flagged well in advance with workarounds before release. It’s hardly a rarely-used function of *nix.