Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML breaks in FreeNAS11.3-U2 (was fine in U1) #13

Open
bsodmike opened this issue Apr 10, 2020 · 6 comments
Open

HTML breaks in FreeNAS11.3-U2 (was fine in U1) #13

bsodmike opened this issue Apr 10, 2020 · 6 comments

Comments

@bsodmike
Copy link

The email shows markup, hmm. Will try digging into the script.

@bsodmike bsodmike changed the title HTML breaks in FreeNAS11.3-U2 (was find in U1) HTML breaks in FreeNAS11.3-U2 (was fine in U1) Apr 10, 2020
@edgarsuit
Copy link
Owner

Still working fine for me in 11.3-U2. Let me know what you find.

@bsodmike
Copy link
Author

I can't see any obvious errors, but it seems in FreeNAS11.3-U2 each echo "" call is adding a <br> to each line of markup. This causes gmail not to interpret the markup as HTML -- but this is a guess.

One clue I'm working off is this; from the first part of your script, in FreeNAS11.3-U1 (and prior) gmail would render the output as 1-long line, example:

Subject: FREENAS-BACKUP: Status Report (Tue Apr 7 08:00:11 +0530 2020) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=gc0p4Jq0M2Yt08jU534c0p

However, now in FreeNAS11.3-U2

Subject: FREENAS-BACKUP: Status Report (Sat Apr 11 22:18:52 +0530 2020)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=gc0p4Jq0M2Yt08jU534c0p
<br><br>
<table style="border: 1px solid black; border-collapse: collapse;">
<tr><th colspan="10" style="text-align:center; font-size:20px; height:40px; font-family:courier;">ZPool Status Report Summary on server FREENAS-BACKUP</th></tr>
<tr>

@bsodmike
Copy link
Author

Hey @edgarsuit any further ideas mate?

@edgarsuit
Copy link
Owner

Nope, like I said, it's working fine for me in 11.3-U2 and I haven't heard of any other users with similar issues. Did you upgrade to U2.1?

@bsodmike
Copy link
Author

bsodmike commented May 1, 2020

Not yet, still on FreeNAS11.3-U2. I'll try the U2.1 upgrade and see if that helps, thanks.

@bsodmike
Copy link
Author

bsodmike commented May 28, 2021

Hey @edgarsuit I noticed your script calls sendmail -t -oi < "$logfile" but that command isn't available in FreeNAS11.3-U2. I'm calling plain old 'mail', but that only parses the content as plain text. That's the issue.

Update: I have one system (a) FreeBSD 11.3-RELEASE-p5 and another (b) FreeBSD 11.3-RELEASE-p14. In my version of the scripts I'm calling

### Send report ###
if [ -z "${email}" ]; then
  echo "No email address specified, information available in ${logfile}"
else
  mail -s "${subject}" < ${logfile} ${email}
  rm ${logfile}
fi

The p5 system sends mail just fine, it is received as HTML; the p14 system does not. I ran a test on the p14 system to obtain a hexdump of the log and the output is the same as that on the p5 system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants