Is smartd properly configured to send alerts by email?

Alex Flo asked:

I just configured a Debian server as follows
apt-get install smartmontools
vi /etc/default/smartmontools – and here uncommented these 2 lines
# uncomment to start smartd on system startup
start_smartd=yes
# uncomment to pass additional options to smartd on startup
smartd_opts="--interval=1800"

Then I edited /etc/smartd.conf and uncommented only this line
DEVICESCAN -S on -o on -a -m myemail@mydomain.com -s (S/../.././02|L/../../6/03)

I was wondering if this is enough for the system to send me an alert message when something goes wrong and/or if there is a way to simulate a problem and see if smartd sends me warnings by email.

My answer:


You can test the configuration by adding -M test to the line that begins with DEVICESCAN. The next time you restart smartd, it will send out an email notification.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.