Multi-Report

As I understand it, those changes will not do anything unless you run dpkg-reconfigure exim4-config and that is not installed.

I have been playing around with some other file values /etc/exim4/conf.d/router as these appear to be the actual configuration files. No luck so far.

What I don’t understand is how TrueNAS can send me a message, but I can’t send a message and I get blocked.

I really do not want to change a configuration file, especially if it will not survive a TrueNAS upgrade. My goal would be to figure out what switches or the email format must be to send an HTML file with attachments.

1 Like

Well, I ran update-exim4.conf after changing values in update-exim4.conf.conf, and that at least allowed to try to connect to the email providers over the internet.

But the dpkg… is the right tool, witch kind of points to iX doing some other magic tricks do send emails rather than using standard exim?

“Black magic my mother used to say”

Maybe they tell us, if we ask them nicely, they seem like a friendly bunch, these iX people.

Edit: Damn, hat seems pretty complicated with all those setup-files.
Hope there will be a way, I have quite a few old disk and rely on multi-report to keep an eye on them.

They are friendly. I submitted a bug report, it was answered very quickly. This is how I know about exim and that sendmail will not be coming back. They said, use exim.

I did add a question on how to format the command line, maybe we will hear from them in the next day or two. I’m crossing my fingers. If not then I will reach out to the few iXsystems folks who are active in the forums. I always try to solve the problem myself before I ask for help. I have spent more than 10 hours working this one problem, I’m tired of thinking about it. :face_exhaling:

2 Likes

I rolled back to 24.04.0.2 to bypass this problem. Is “TrueNas” becoming a closed system.

1 Like

Joe, I looked around yesterday (randomly while eating lunch) and it does appear to be a permissions issue and also maybe an issue with root user and where the script is installed. I have one server where CronTask will send me an Crontask Ran email with output saying the script ran and what it did, but not the email the script generates. So I think there is a security permissions issue. This server will also send alert emails. The other server does not send anything at all, no CronTask Ran messages, no alerts emails, nothing, but will send a test email from the test email button.

I have noticed that there is a Debian-exim user now available. perhaps this user has the correct permissionsto send email?

Edit:
This is something I noticed in the emails

From a good script cron run before the recent update to 24.10.1 EE:

Subject: SMART Testing Results for neo - All is Good
From: <myemailatmyserver.com>

Notice the well formed From line. This is also how any system alert emails generated from Truenas would also be formed. In the examples below you will see that ALL emails including system emails are mangled. So this is a midleware issue with their change in mail servers.

From the test email button in truenas:

Subject: TrueNAS owen.local: Test Message
From: =?utf-8?q?Owen_Server?= <myemailatmyserver.com>

From a cron run that was not successful:

Subject: TrueNAS neo.local: CronTask Run
From: =?utf-8?q?Neo_Server?= <myemailatmyserver.com>

From an alert email:

Subject: TrueNAS neo.local: Alerts
From: =?utf-8?q?Neo_Server?= <myemailatmyserver.com>

Notice the mangled From in each? this appears to be a midleware issue as it occurs in all of the emails good bad or ugly since updating to 24.10.1

Thanks for the information. I did not notice the Debian-exim user before. There is also Debian-snmp user.

Odd how the From line is setup. I suspect ?utf-8 is to set utf-8, ?q is unknown to me, maybe “quiet”.

Thanks for the information. It sure would be nice to get this behind us.

They’re MIME encoded words.
Snippet:

Generally, an “encoded-word” is a sequence of printable ASCII
characters that begins with “=?”, ends with “?=”, and has two "?"s in
between. It specifies a character set and an encoding method, and
also includes the original text encoded as graphic ASCII characters,
according to the rules for that encoding method.

The RFC goes on to say that the “q” encoding is recommended for ASCII character sets.

1 Like

That may be, but none of my hosted websites of which the servers all use exim as the mail server/handler send any odd characters attached to the From when looking at message sources. That just means the configuration code is broken for the new setup.
They are trying to use Content-Type: text/plain; charset=“utf-8” which would give the encoding seen but have misconfigured, broke something or did not fully make the new code work by attempting a shortcut.

I may have to go back to the earlier version of EE on both machines in order to get email to work correctly on both machines. Right now neither work correctly or at all in the second servers case as it sends no emails at all. They all fail with permission errors even the one from system processes like alerts. Any test email from the test email button also has the mangled formatting, so it is an issue internal with Truenas and the decision to switch to exim.

1 Like

I recommend submitting a bug report. Maybe they will also provide you the correct format to send an email from a bash file. Honestly, I’m really tired of stuff like this happening and extremely tired of troubleshooting this email problem.

I’m of the impression that nothing is broken with the encoding, it’s not mangled, it’s just not as human readable in it’s raw form.

Any modern email client should be able to interpret and decipher the encoding. I have multiple emails in my inbox from various senders that, when examining the raw source, have the same kind of encoding going on.

Something else is causing the issues with sending, I suspect we’re missing a hook or something, that gives it the proper privileges and configuration.

Yeah, almost learning how to setup a mailserver to send just one email out of a script is pretty excessive.

But still, I am confident there is a simple solution for this, if iX finds the time to help. Bit unfortunate that it is the Holidays, so might take a bit longer.

Any chance the setup ask for folder and then “delivers” a textfile to it with a datetime stamp. Not as comfortable, but better then nothing? Maybe if everything else fails?

I submitted a T3 TrueNAS Tech Talk question about this issue since the last T3 discussed 24.10.1 release.

4 Likes

I found the API that the middleware uses to send its own emails (including the test email I think)

Posted here:

Should be callable via midclt

2 Likes

Hey Joe,

Hope you figure it out. Just updated to 24.10.1 and would love to continue using your script.

It is making some progress but I unfortunately feel like a bit of script rework will be required to support the new email commands. It looks like such a pain in the rear. But I have not given up yet. I will toss you a copy of the new script when/if I ever get is working.

7 Likes

We appreciate your work mate, but remember it is xmas, take care and prioritise your family / friends. We can wait :slight_smile:

8 Likes

Hi @joeschmuck , I to have the same problem, anyway, just wanted to say thanks for the work you putting into this and that I love your script. I’m surprised with so many people using this great script, why you don’t have a donation system, I think a lot of us would like to show our appreciation, and encourage you to keep working on this script.

Anyways, forget the script now, Merry Christmas and Happy New Year!

4 Likes

Came here through Googling my issue after upgrading to the latest TrueNAS Scale and was wondering why my reporting was broke. Hope to see an easy to implement fix early in the new year.

I may have the fix now, however there are others really lending a huge helping hand to me, and the community. I hope to have the new version out by Saturday unless there is a way to fix it to work as it previously did.

Visit this link to see how much fun this has been.

I have placed a BETA copy of the script there. It should be safe to run, the only changes were email related.

Knock off time!

5 Likes