Re: Trouble sending emails using ssmtp using smartd_warning.sh
Christian Franke <[email protected]>
| Newsgroups | gmane.linux.utilities.smartmontools |
|---|---|
| Message-ID | <[email protected]> |
Engelbrecht, George wrote: > Linux hostname 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux > smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-24-generic] (local build) > > I had to edit the script smartd_warning.sh in /etc from the default ubuntu package to not include the subject line in the ssmtp exec call. > > From looking through the ssmtp man page the -s option doesn't exist? The smart_warning.sh script uses the command line syntax of the traditional mail(1) command. The ssmtp command is not compatible. It emulates the sendmail command which requires to prepend header lines (e.g. "Subject") before mail text. Therefore "-M exec ssmtp" in smartd.conf does not (and never will) work. Without "-M exec", smartd_warning.sh runs "mail". Please test whether /usr/bin/mail exists. On ubuntu, /usr/bin/mail should be symlinked (via /etc/alternatives/mail) to one of the alternative compatible commands. Three alternatives are provided by the virtual package "mailx" which is a recommended package for smartmontools: http://packages.ubuntu.com/trusty/smartmontools Thanks, Christian ------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce