Bug#541192: smartmontools: does not send mail

2009-08-13 Thread Francesco Potorti`
 DEVICESCAN -a -n standby -s (S/../.././00|L/../../6/07) -m root -M test -M 
 exec /usr/share/smartmontools/smartd-runner
 
 In the non-working machine, the daemon log says that smartmontoools
 succesfully sent the test mails, but in fact nothing was sent.

Curiously, if I just call 
 smartd -d

using the above line in /etc/smartd.conf, it reports that everything has
gone well, while this one fails with explanation:


# echo /dev/sda -m root -M test | smartd -c - -q onecheck
smartd version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Opened configuration file stdin
Drive: /dev/sda, implied '-a' Directive on line 1 of file stdin
Configuration file stdin parsed.
Device: /dev/sda, opened
Device /dev/sda: using '-d sat' for ATA disk behind SAT layer.
Device: /dev/sda, opened
Device: /dev/sda, found in smartd database.
Device: /dev/sda, is SMART capable. Adding to monitor list.
Monitoring 0 ATA and 1 SCSI devices
Executing test of mail to root ...
Test of mail to root produced unexpected output (28 bytes) to STDOUT/STDERR:
sh: mail: command not found

Test of mail to root: failed (32-bit/8-bit exit status: 32512/127)
Started with '-q onecheck' option. All devices sucessfully checked once.
smartd is exiting (exit status 0)


So the problem is that smartd wants a 'mail' program in the path.  We
have two problems here:

1) smartd problem: if a 'mail' program is not found, smartd does not
   signal any error with the above DEVICESCAN line

2) packaging problem: smartd requires a 'mail' program.  I have one in
   my main box, which points to /usr/bin/bsd-mailx through
   /etc/alternatives.  However, I have no such link in the other box,
   even though the bsd-mailx package is installed, same version.

-- 
Francesco Potortì (ricercatore)Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR  Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa Email: poto...@isti.cnr.it
(entrance 20, 1st floor, room C71) Web:   http://fly.isti.cnr.it/




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#541192: smartmontools: does not send mail

2009-08-12 Thread Francesco Potorti`
Package: smartmontools
Version: 5.38-3
Severity: normal

smartmontools does not send mail to root even if it believes it does
so.

I have two boxes, with the same version of smartmontools and the same
configure file (but different disk arrangements).  In one everything
works as expected, while in the other no mail is sent.

Here is the relevant config line:

DEVICESCAN -a -n standby -s (S/../.././00|L/../../6/07) -m root -M test -M exec 
/usr/share/smartmontools/smartd-runner

In the non-working machine, the daemon log says that smartmontoools
sucefully sent the test mails, but in fact nothing was sent.  If I try
to send mail to root from the command line, both with mailx and
sendmail, I get the mail, and the operation is logged at
/var/log/exim4/mainlog.  However, nothing is logged after smartd is
restarted or reloaded.

How can I diagnose this?  Apparently smartd does something wrong when
sending mail to root, but I don't know why, since it works on the other
machine with the same configuration.

-- Package-specific info:
Ouput of /usr/share/bug/smartmontools:
# CONFIG_IDE_TASK_IOCTL is not set

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-proposed-updates')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages smartmontools depends on:
ii  debianutils   3.2Miscellaneous utilities specific t
ii  libc6 2.9-12 GNU C Library: Shared libraries
ii  libgcc1   1:4.4.0-5  GCC support library
ii  libstdc++64.4.0-5The GNU Standard C++ Library v3
ii  lsb-base  3.2-23 Linux Standard Base 3.2 init scrip

Versions of packages smartmontools recommends:
ii  bsd-mailx [mailx]  8.1.2-0.20081101cvs-2 A simple mail user agent
ii  mailx  1:20081101-2  Transitional package for mailx ren

smartmontools suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#541192: smartmontools: does not send mail

2009-08-12 Thread Guido Günther
On Wed, Aug 12, 2009 at 12:42:39PM +0200, Francesco Potorti` wrote:
 Package: smartmontools
 Version: 5.38-3
 Severity: normal
 
 smartmontools does not send mail to root even if it believes it does
 so.
 
 I have two boxes, with the same version of smartmontools and the same
 configure file (but different disk arrangements).  In one everything
 works as expected, while in the other no mail is sent.
 
 Here is the relevant config line:
 
 DEVICESCAN -a -n standby -s (S/../.././00|L/../../6/07) -m root -M test -M 
 exec /usr/share/smartmontools/smartd-runner
 
 In the non-working machine, the daemon log says that smartmontoools
 sucefully sent the test mails, but in fact nothing was sent.  If I try
 to send mail to root from the command line, both with mailx and
 sendmail, I get the mail, and the operation is logged at
 /var/log/exim4/mainlog.  However, nothing is logged after smartd is
 restarted or reloaded.
Try strace.
 -- Guido



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org