install smartmontools to monitor your hard drives

aptitude install smartmontools

vim /etc/default/smartmontools


vim /etc/smartd.conf

DEVICESCAN -d removable -n standby -m [email protected] -M exec /usr/share/smartmontools/smartd-runner
/dev/sda -S on -o on -a -I 194 -m [email protected]

If we have more than one hard drive
/dev/sda -S on -o on -a -I 194 -m [email protected]

Now restart the service
/etc/init.d/smartmontools restart

Now configure exim to send email notifications

dpkg-reconfigure exim4-config

1) Split configuration into small files? No
2) General type of mail configuration: internet site; mail is sent and received directly using SMTP
3) System mail name:
4) IP-addresses to listen on for incoming SMTP connections:
5) Other destinations for which mail is accepted:
6) Domains to relay mail for: !! empty !!
7) Machines to relay mail for: !! empty !!
8) Keep number of DNS-queries minimal (Dial-on-Demand)?: No
9) Delivery method for local mail: mbox format in /var/mail/