You are not logged in.

#1 2019-03-14 03:37:03

Portal
Member
Registered: 2019-03-11
Posts: 48

Smartctl (smartd service) not sending me test messages

Here is my /etc/smartd.conf

/dev/sda -a -o on -S on -s (S/../.././02|L/../../6/03)
DEVICESCAN -M test -m mymail

The first line I uncommented from the original file. The descriptions for that line is:

# First ATA/SATA or SCSI/SAS disk.  Monitor all attributes, enable
# automatic online data collection, automatic Attribute autosave, and
# start a short self-test every day between 2-3am, and a long self test
# Saturdays between 3-4am.

The "-M test" should send me a mail after I ran systemctl restart smartd, right?
It didn't. Here is systemctl status smartd

Mar 13 23:34:49 btwIuseArch smartd[14549]: Device: /dev/sda [SAT], not found in smartd database.
Mar 13 23:34:49 btwIuseArch smartd[14549]: Device: /dev/sda [SAT], enabled SMART Attribute Autosave.
Mar 13 23:34:50 btwIuseArch smartd[14549]: Device: /dev/sda [SAT], can't monitor Current_Pending_Sector count - no Attribute 197
Mar 13 23:34:50 btwIuseArch smartd[14549]: Device: /dev/sda [SAT], can't monitor Offline_Uncorrectable count - no Attribute 198
Mar 13 23:34:50 btwIuseArch smartd[14549]: Device: /dev/sda [SAT], enabled SMART Automatic Offline Testing.
Mar 13 23:34:50 btwIuseArch smartd[14549]: Device: /dev/sda [SAT], is SMART capable. Adding to "monitor" list.
Mar 13 23:34:50 btwIuseArch smartd[14549]: Device: /dev/sda, duplicate, ignored
Mar 13 23:34:50 btwIuseArch smartd[14549]: Monitoring 1 ATA/SATA, 0 SCSI/SAS and 0 NVMe devices
Mar 13 23:34:50 btwIuseArch smartd[14549]: Device: /dev/sda [SAT], self-test in progress, 40% remaining
Mar 13 23:34:50 btwIuseArch systemd[1]: Started Self Monitoring and Reporting Technology (SMART) Daemon.

It doesn't even mention sending mails...

Offline

#2 2019-03-14 08:46:33

seth
Member
Registered: 2012-09-03
Posts: 51,050

Re: Smartctl (smartd service) not sending me test messages

Offline

#3 2019-03-14 14:51:00

Portal
Member
Registered: 2019-03-11
Posts: 48

Re: Smartctl (smartd service) not sending me test messages

Which mail gives /usr/bin/mail
What do you mean address?

Offline

#4 2019-03-14 14:52:57

seth
Member
Registered: 2012-09-03
Posts: 51,050

Re: Smartctl (smartd service) not sending me test messages

Your mail address - it's it's for some "public" mail like john.doe@gmail.com (anything but the local mail spooler, actually), you'll have to configure smtp support for mail, see the wiki.

Offline

#5 2019-03-14 14:59:44

Portal
Member
Registered: 2019-03-11
Posts: 48

Re: Smartctl (smartd service) not sending me test messages

I used gmail. I'll take a look at the wiki.
But is my config supposed to work otherwise? I am seeing all the "can't monitor" messages in the systemctl status.

Offline

#6 2019-03-14 15:21:11

seth
Member
Registered: 2012-09-03
Posts: 51,050

Re: Smartctl (smartd service) not sending me test messages

Your disk just does not seem to have that attribute.

smartctl -a /dev/sda

Offline

#7 2019-03-14 17:37:43

Portal
Member
Registered: 2019-03-11
Posts: 48

Re: Smartctl (smartd service) not sending me test messages

Ok I found an error in my config...
I then installed opensmtpd and started it
Systemctl status smartd says the mail has been sent...but I don't see it. Is this where configuring the smtp address comes in?

Last edited by Portal (2019-03-14 18:19:12)

Offline

#8 2019-03-14 20:50:16

seth
Member
Registered: 2012-09-03
Posts: 51,050

Re: Smartctl (smartd service) not sending me test messages

You mybe should post your config. Also how you configured OpenSMTPD (and if you're not really sure what you did, please stop it because you're now likely running an open relais, ie. a spam slinger)

It's probably much simpler for you to configure smartd to use msmtp, a very straight forward smtp client. See https://wiki.archlinux.org/index.php/Msmtp
Ensure to configure msmtp correctly and try to use it to send yourself a mail

Offline

#9 2019-03-14 21:27:08

Portal
Member
Registered: 2019-03-11
Posts: 48

Re: Smartctl (smartd service) not sending me test messages

I didn't change the smtp config. I was changing the smartd config. I will take a look at msmtp

Offline

Board footer

Powered by FluxBB