Installation of smartd results in the following contents of /etc/smartd.conf
/dev/hdb -H
I think it would be to a much greater benefit to the users if the defaults would be
# uncomment the line below to test email notifications, do *NOT* forget to comment after that
# DEVICESCAN -a -m root -M test
# scan for all devices, run short test daily at 10am, long test at 3am every Saturday
DEVICESCAN -a -s (S/../.././10|L/../../6/03) -m root
For emails to actually work one more script needs to be added to the package.
# cat /etc/smartd_warning.sh
#!/bin/sh
# Send email
echo -e "Subject: ${SMARTD_FAILTYPE}\n\n${SMARTD_MESSAGE}" | msmtp "$SMARTD_ADDRESS"
Without the script the smartd
would generate an error:
Executing test of <mail> to root ...
Test of <mail> to root produced unexpected output (38 bytes) to STDOUT/STDERR:
sh: /etc/smartd_warning.sh: not found