$ echo Bar | mail -s 'Test mail' <email address hidden>
you should possibly address the issue to the maintainer of the mailutils package. I typically use the 'bsd-mailx' package as 'mail' provider and don't remember similar problems.
Alternatively you could disable (chmod -x) 10mail and add some /etc/smartmontools/run.d/11sendmail script, something like:
#!/bin/bash
/usr/sbin/sendmail $SMARTD_ADDRESS <<EOF
Subject: $SMARTD_SUBJECT
To: ${SMARTD_ADDRESS// /, }
If this works:
$ echo -e 'Subject: Test sendmail\n\nFoo' | /usr/sbin/sendmail <email address hidden>
but this does not:
$ echo Bar | mail -s 'Test mail' <email address hidden>
you should possibly address the issue to the maintainer of the mailutils package. I typically use the 'bsd-mailx' package as 'mail' provider and don't remember similar problems.
Alternatively you could disable (chmod -x) 10mail and add some /etc/smartmonto ols/run. d/11sendmail script, something like:
#!/bin/bash
/usr/sbin/sendmail $SMARTD_ADDRESS <<EOF
Subject: $SMARTD_SUBJECT
To: ${SMARTD_ADDRESS// /, }
$SMARTD_FULLMESSAGE
EOF
(Caution: not tested :-)