Opened 6 years ago

Last modified 6 years ago

#1013 closed defect

mail not set to multiple users / -M exec overrides -M <others> — at Version 1

Reported by: calestyo Owned by:
Priority: major Milestone:
Component: smartd Version: 6.5
Keywords: Cc:

Description (last modified by Christian Franke)

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 (1)

comment:1 by Christian Franke, 6 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.