[ SOLVED ] Re: [gentoo-user] smartd and ssmtp not sending emails again.
John Campbell wrote: On 08/04/2015 01:35 AM, Dale wrote: Howdy, I went through this before and I haven't changed anything so not sure why it isn't working now. I decided to test smartd to make sure that it would send me a email if a drive developed a problem. I added -M test to the line, restarted smartd and got nothing. I mean nothing but crickets. Going to post relevant info that I know of. Here we go: Uncommented lines from smartd.conf: DEVICESCAN -I 194 -I 231 -I 9 /dev/sda -a -d sat -o on -S on -s (S/../.././12|L/../../6/12) -m root -M test /dev/sdb -a -d sat -o on -S on -s (S/../.././12|L/../../6/12) -m root -M test /dev/sdc -a -d sat -o on -S on -s (S/../.././12|L/../../6/12) -m root -M test Everything in smartd.conf after the DEVICESCAN is ignored. Unless you've stripped out all the comments from smartd.conf it should be explained a half dozen lines above your DEVICESCAN line. Yeppie That worked. It did upgrade recently and I had to re-add the other drive lines back but I don't recall changing that part. The upgrade is the reason I tested it. I wanted to make sure it still worked, before a drive dies and I'm caught off guard, again. I figured it would be something simple that I just didn't notice. Thanks much. :-D Dale :-) :-)
[gentoo-user] smartd and ssmtp not sending emails again.
Howdy, I went through this before and I haven't changed anything so not sure why it isn't working now. I decided to test smartd to make sure that it would send me a email if a drive developed a problem. I added -M test to the line, restarted smartd and got nothing. I mean nothing but crickets. Going to post relevant info that I know of. Here we go: Uncommented lines from smartd.conf: DEVICESCAN -I 194 -I 231 -I 9 /dev/sda -a -d sat -o on -S on -s (S/../.././12|L/../../6/12) -m root -M test /dev/sdb -a -d sat -o on -S on -s (S/../.././12|L/../../6/12) -m root -M test /dev/sdc -a -d sat -o on -S on -s (S/../.././12|L/../../6/12) -m root -M test Other than adding -M test, I don't recall changing anything except the usual upgrade changes. From revaliases, with obvious edits of course: root:me-em...@gmail.com:smtp.gmail.com:465 dale:me-em...@gmail.com:smtp.gmail.com:465 other_user:me-em...@gmail.com:smtp.gmail.com:465 From ssmtp.conf file, again with obvious edits: root=postmaster root=me-em...@gmail.com #Change to your preferred email address mailhub=smtp.gmail.com:465 #Could also use port 587 for STARTTLS rewriteDomain=fireball #Something to denote your machine's name FromLineOverride=YES UseTLS=YES #Can also try UseSTARTTLS=YES as an alternative AuthUser=me-em...@gmail.com AuthPass=secret-stuff #Special characters seem to barf with ssmtp mailhub=mail hostname=_HOSTNAME_ From my understanding, smartd passes the info to ssmtp and then it gets sent from there. When I test ssmtp, I get this, with obvious edits of course. root@fireball / # echo My first test message | mail -v -s Test for sSMTP 1 rdalek1...@gmail.com [-] 220 smtp.gmail.com ESMTP u78sm263385ywu.13 - gsmtp [-] EHLO _HOSTNAME_ [-] 250 SMTPUTF8 [-] AUTH LOGIN [-] 334 VXNlcm5hbWU6 [-] cmRhbGVrMTk2N0BnbWFpbC5jb20= [-] 334 UGFzc3dvcmQ6 [-] 235 2.7.0 Accepted [-] MAIL FROM:me-em...@gmail.com [-] 250 2.1.0 OK u78sm263385ywu.13 - gsmtp [-] RCPT TO:me-em...@gmail.com [-] 250 2.1.5 OK u78sm263385ywu.13 - gsmtp [-] DATA [-] 354 Go ahead u78sm263385ywu.13 - gsmtp [-] Received: by _HOSTNAME_ (sSMTP sendmail emulation); Tue, 04 Aug 2015 03:28:36 -0500 [-] From: root me-em...@gmail.com [-] Date: Tue, 04 Aug 2015 03:28:36 -0500 [-] To: me-em...@gmail.com [-] Subject: Test for sSMTP 1 [-] [-] My first test message [-] . [-] 250 2.0.0 OK 1438676918 u78sm263385ywu.13 - gsmtp [-] QUIT [-] 221 2.0.0 closing connection u78sm263385ywu.13 - gsmtp root@fireball / # When I check my email, I do get the test message. It seems to me that ssmtp is working but that smartd either isn't working or it is not getting to ssmtp somehow. Anyone see a reason this shouldn't be working? I'd really like a heads up if a drive is having issues. Thanks. Dale :-) :-)
Re: [gentoo-user] smartd and ssmtp not sending emails again.
Dale wrote: I went through this before and I haven't changed anything so not sure why it isn't working now. I decided to test smartd to make sure that it would send me a email if a drive developed a problem. I added -M test to the line, restarted smartd and got nothing. I mean nothing but crickets. Going to post relevant info that I know of. Here we go: (snip) When I check my email, I do get the test message. It seems to me that ssmtp is working but that smartd either isn't working or it is not getting to ssmtp somehow. Anyone see a reason this shouldn't be working? I'd really like a heads up if a drive is having issues. Any hints from the syslog? Here -M test seems to work fine. raffaele
Re: [gentoo-user] smartd and ssmtp not sending emails again.
On 08/04/2015 01:35 AM, Dale wrote: Howdy, I went through this before and I haven't changed anything so not sure why it isn't working now. I decided to test smartd to make sure that it would send me a email if a drive developed a problem. I added -M test to the line, restarted smartd and got nothing. I mean nothing but crickets. Going to post relevant info that I know of. Here we go: Uncommented lines from smartd.conf: DEVICESCAN -I 194 -I 231 -I 9 /dev/sda -a -d sat -o on -S on -s (S/../.././12|L/../../6/12) -m root -M test /dev/sdb -a -d sat -o on -S on -s (S/../.././12|L/../../6/12) -m root -M test /dev/sdc -a -d sat -o on -S on -s (S/../.././12|L/../../6/12) -m root -M test Everything in smartd.conf after the DEVICESCAN is ignored. Unless you've stripped out all the comments from smartd.conf it should be explained a half dozen lines above your DEVICESCAN line.
Re: [gentoo-user] smartd and ssmtp not sending emails again.
Raffaele BELARDI wrote: Dale wrote: I went through this before and I haven't changed anything so not sure why it isn't working now. I decided to test smartd to make sure that it would send me a email if a drive developed a problem. I added -M test to the line, restarted smartd and got nothing. I mean nothing but crickets. Going to post relevant info that I know of. Here we go: (snip) When I check my email, I do get the test message. It seems to me that ssmtp is working but that smartd either isn't working or it is not getting to ssmtp somehow. Anyone see a reason this shouldn't be working? I'd really like a heads up if a drive is having issues. Any hints from the syslog? Here -M test seems to work fine. raffaele Sorry. I forgot to include that. This is from when I restart smartd. Aug 4 04:46:45 fireball smartd[3610]: smartd received signal 15: Terminated Aug 4 04:46:45 fireball smartd[3610]: smartd is exiting (exit status 0) Aug 4 04:46:45 fireball smartd[7526]: smartd 6.4 2015-06-04 r4109 [x86_64-linux-3.18.7-gentoo] (local build) Aug 4 04:46:45 fireball smartd[7526]: Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org Aug 4 04:46:45 fireball smartd[7526]: Opened configuration file /etc/smartd.conf Aug 4 04:46:45 fireball smartd[7526]: Drive: DEVICESCAN, implied '-a' Directive on line 27 of file /etc/smartd.conf Aug 4 04:46:45 fireball smartd[7526]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices Aug 4 04:46:45 fireball smartd[7526]: Device: /dev/sda, type changed from 'scsi' to 'sat' Aug 4 04:46:45 fireball smartd[7526]: Device: /dev/sda [SAT], opened Aug 4 04:46:45 fireball smartd[7526]: Device: /dev/sda [SAT], WDC WD1600AAJS-00YZCA0, S/N:WD-WCAYU4389620, WWN:5-0014ee-1ad79c1b3, FW:01.03B01, 160 GB Aug 4 04:46:45 fireball smartd[7526]: Device: /dev/sda [SAT], found in smartd database: Western Digital Caviar Blue Serial ATA Aug 4 04:46:46 fireball smartd[7526]: Device: /dev/sda [SAT], is SMART capable. Adding to monitor list. Aug 4 04:46:46 fireball smartd[7526]: Device: /dev/sdb, type changed from 'scsi' to 'sat' Aug 4 04:46:46 fireball smartd[7526]: Device: /dev/sdb [SAT], opened Aug 4 04:46:46 fireball smartd[7526]: Device: /dev/sdb [SAT], SAMSUNG HD753LJ, S/N:S1PWJ1KS305193, WWN:5-0024e9-001308c31, FW:1AA01117, 750 GB Aug 4 04:46:46 fireball smartd[7526]: Device: /dev/sdb [SAT], found in smartd database: SAMSUNG SpinPoint F1 DT Aug 4 04:46:46 fireball smartd[7526]: Device: /dev/sdb [SAT], is SMART capable. Adding to monitor list. Aug 4 04:46:46 fireball smartd[7526]: Device: /dev/sdc, type changed from 'scsi' to 'sat' Aug 4 04:46:46 fireball smartd[7526]: Device: /dev/sdc [SAT], opened Aug 4 04:46:46 fireball smartd[7526]: Device: /dev/sdc [SAT], ST3000DM001-1CH166, S/N:W1F4C31Q, WWN:5-000c50-06e7a0a7c, FW:CC29, 3.00 TB Aug 4 04:46:46 fireball smartd[7526]: Device: /dev/sdc [SAT], found in smartd database: Seagate Barracuda 7200.14 (AF) Aug 4 04:46:46 fireball smartd[7526]: Device: /dev/sdc [SAT], is SMART capable. Adding to monitor list. Aug 4 04:46:46 fireball smartd[7526]: Monitoring 3 ATA and 0 SCSI devices Aug 4 04:46:46 fireball smartd[7528]: smartd has fork()ed into background mode. New PID=7528. Aug 4 04:46:46 fireball smartd[7528]: file /run/smartd.pid written containing PID 7528 root@fireball / # It seems to start and begin monitoring but I don't see anything about it even trying to email anything. Thanks. Dale :-) :-)