10mail script should use sendmail command, not the mail command
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
smartmontools |
New
|
Unknown
|
|||
smartmontools (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
The 10mail script is trying to send messages with /usr/bin/mail (aka mailx), which is a user agent, not intended for automated message sending. I believe it should be using the /usr/sbin/sendmail or /usr/lib/sendmail command instead, as that command is meant for non-interactive message sending.
Accordingly, the package should probably declare Recommends: default-mta | mail-transport-
Use case:
The current script's use of the mail command is causing message delivery to fail on my systems. This was at first because no mail user agent was installed (and there should be no need for one, since there are no local mail users.) Furthermore, even when I installed gnu mailutils in an attempt to solve this problem, I discovered that mailutils overrides my system's MTA configuration to use an invalid MAIL FROM address, causing the upstream mail host to reject smartmon's outgoing messages. Several more hours spent experimenting with mailutils configuration options just led to one form or another of the same type of problem, all rooted in the fact that mailutils makes assumptions that are just plain wrong on some installations. I would like my sanity back, please. :)
description: | updated |
description: | updated |
description: | updated |
Changed in smartmontools (Ubuntu): | |
status: | Incomplete → Triaged |
importance: | Undecided → Low |
Changed in smartmontools: | |
status: | Unknown → New |
>The 10mail script is trying to send messages with /usr/bin/mail (aka mailx), which is a user agent, not intended for automated message sending.
'mail' and its various variants are user agents, but also intended for automated message sending. This is the case since the early (pre-Linux) days.
POSIX and its predecessor say: pubs.opengroup. org/onlinepubs/ 007908799/ xcu/mailx. html pubs.opengroup. org/onlinepubs/ 9699919799/ utilities/ mailx.html
"Send Mode can be used by applications or users to send messages from the text in standard input."
See:
http://
http://
If no script (like smartd-runner) is specified with '-M exec' directive, smartd also uses 'mail' as a default (see smartd_warning.sh):
mail -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS <<EOF
$SMARTD_FULLMESSAGE
EOF