Opened 8 years ago
Closed 7 years ago
#1013 closed defect (worksforme)
-M exec overrides -M <others>
| Reported by: | calestyo | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | smartd | Version: | 6.5 |
| Keywords: | Cc: |
Description (last modified by )
Forwarded from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=893657
(Issue (1) described bellow may not apply to upstream smartmontools, as /etc/smartmontools/run.d/10mail seems to be a Debian-specific file... but at least issue (2) should apply to upstream smartmontools as well.)
Hi.
I've stumbled over the following issues in smartd:
At first I had bascally the following smartd.conf:
DEVICESCAN -d auto -d removable -n standby,4 -a -m root,mylocaluser,my@email.com -M exec /usr/share/smartmontools/smartd-runner
In order to test it, I've added -M test.
Now on restart, only root got mail, and the postfix logs didn't even show any tries for mylocaluser and my@….
I've added -M once, as I assumed the support for comma-separated multiple addresses as explained
in the smartd.conf manpage for -m, may just not work with -M-exec-invoked /etc/smartmontools/run.d/10mail but only with -M once, -M daily or -M diminishing (and that this might be some other mail sender than /etc/smartmontools/run.d/10mail - which it actually seems to be).
Interestingly, it still didn't work.
Only if I removed -M exec... I got mail sent to all three recipients.
So I think there are two issues here:
1) /etc/smartmontools/run.d/10mail, which seems to be used per default by debian (as there is no -M once or so) should support multiple addresses in -m.
It's likely not obvious to the user that there are two methods of sending warning mails, and it should just work as one would naively assume by reading the documentation of -m.
2) In contrast to what the manpage claims, it seems that if -M exec is in place, -M once/etc. are not executed as well.
IMO both are severity=important, as they may prevent information about failing drives being passed on.
Cheers,
Chris.
Change History (4)
comment:1 by , 8 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 8 years ago
| Summary: | mail not set to multiple users / -M exec overrides -M <others> → -M exec overrides -M <others> |
|---|
comment:3 by , 8 years ago
| Milestone: | → undecided |
|---|
2) In contrast to what the manpage claims, it seems that if -M exec is in place, -M once/etc. are not executed as well.
Could not be reproduced. Please provide a testcase (syslog output or smartd -d output). For example use the -W directive with low critical temperature to force warning emails.
Note that -M daily is the default if state persistence is enabled, see -s command line option.
comment:4 by , 7 years ago
| Milestone: | undecided |
|---|---|
| Resolution: | → worksforme |
| Status: | new → closed |
Problem could not be reproduced. Directive -M exec does not affect -M [once|...].
Feel free to reopen this ticket if a testcase is available.

1) The scripts
/usr/share/smartmontools/smartd-runnerand/etc/smartmontools/run.d/10mailare Debian-specific. We do not maintain the Debian package. Removing 1) from summary because it is unrelated to 2).