Smartmontools

I have the following in smartd.conf

DEFAULT -n standby
/dev/disk/by-path/pci-0000:01:00.0-scsi-0:0:0:0 -a -d aacraid,0,0,0 -W 0,0,55 -m [REDACTED] -M exec /usr/share/smartmontools/smartd-runner
/dev/disk/by-path/pci-0000:01:00.0-scsi-0:0:0:0 -a -d aacraid,0,0,1 -W 0,0,55 -m [REDACTED] -M exec /usr/share/smartmontools/smartd-runner
/dev/disk/by-path/pci-0000:01:00.0-scsi-0:0:0:0 -a -d aacraid,0,0,2 -W 0,0,55 -m [REDACTED] -M exec /usr/share/smartmontools/smartd-runner
/dev/disk/by-path/pci-0000:01:00.0-scsi-0:0:0:0 -a -d aacraid,0,0,3 -W 0,0,55 -m [REDACTED] -M exec /usr/share/smartmontools/smartd-runner
/dev/disk/by-path/pci-0000:01:00.0-scsi-0:0:0:0 -a -d aacraid,0,0,4 -W 0,0,55 -m [REDACTED] -M exec /usr/share/smartmontools/smartd-runner
/dev/disk/by-path/pci-0000:01:00.0-scsi-0:0:0:0 -a -d aacraid,0,0,5 -W 0,0,55 -m [REDACTED] -M exec /usr/share/smartmontools/smartd-runner
/dev/disk/by-path/pci-0000:01:00.0-scsi-0:0:0:0 -a -d aacraid,0,0,6 -W 0,0,55 -m [REDACTED] -M exec /usr/share/smartmontools/smartd-runner
/dev/disk/by-path/pci-0000:01:00.0-scsi-0:0:0:0 -a -d aacraid,0,0,7 -W 0,0,55 -m [REDACTED] -M exec /usr/share/smartmontools/smartd-runner

But i never seem to receive any emails for drive issues. Are there other things I need to add to those lines? I want to be told if a drive is even beginning to show signs of age.

Advice would be most welcome

PS I totally preferred the old forums this discourse thing is just a pain.

Your real email was redacted for safety and security reasons.

It does not take long to get used to using Discourse; you already used pre-formatted text to wrap your terminal output.

We have an amazing community of volunteer helpers here, so stick with us and the rewards will come.

2 Likes

The smart monitoring tools use mail from the gnu mailutils for sending mails. Those are normally configured to send local mail only (you run mail from the CLI to read those; use just the username on the system as the address when sending). To make the mailutils send mail by internet you have to configure them. See either the info-documentation in the package mailutils-doc or the online documentation found at https://mailutils.org/manual/mailutils.html to find out how to configure them.

1 Like

I have postfix installed and cron happily uses that. Also have mailutils installed, but haven’t a clue (after looking at the docs you pointed at) how to make that use an external smtp server on port 465 using STARTTLS

If you’ve got postfix set up then you should be able to use that using the ‘-M exec’ directive in /etc/smartd.conf. See man 5 smartd.conf

echo "This is a test email body" | mail -s "Test Subject" REDACTED -aFrom:root@REDACTED

Works just fine. ‘- aFrom:root@REDACTED’ is needed to keep the smtp server happy. Does that modify your advice

Thanks, David

Looks like creating /etc/mailutils.conf containing:

address {
  email-addr root@REDACTED;
}

does the job as I get sent an email when I add -M test to the config file.

Do I have the right incantations otherwise?

Thanks, David