brainbone Posted December 28, 2009 Author Share Posted December 28, 2009 Are you sure that DNS is configured correctly on your unraid server? Can you ping smtp.gmail.com from your unraid server? Quote Link to comment
Darts Posted December 28, 2009 Share Posted December 28, 2009 Thanks for pointing this out Indeed, the DNS field was blank although I specified it manually in the go script a while ago... Anyway, I can now ping smtp.gmail.com but I am now facing another issue with "unraid_notify -d" : > < 220 mx.google.com ESMTP 15sm3371851bwz.12 > EHLO Alpha < 250 PIPELINING > AUTH LOGIN < 504 5.7.4 Unrecognized Authentication Type 15sm3371851bwz.12 504 5.7.4 Unrecognized Authentication Type 15sm3371851bwz.12 I am currently googling this error with smtp.gmail.com, so far no luck. Tried to change port to 587 but then the test does not event pass the first line, same goes when disabling SSL or entering "true" instead of "True". Any idea where this could come from? Quote Link to comment
Joe L. Posted December 28, 2009 Share Posted December 28, 2009 Thanks for pointing this out Indeed, the DNS field was blank although I specified it manually in the go script a while ago... Anyway, I can now ping smtp.gmail.com but I am now facing another issue with "unraid_notify -d" : > < 220 mx.google.com ESMTP 15sm3371851bwz.12 > EHLO Alpha < 250 PIPELINING > AUTH LOGIN < 504 5.7.4 Unrecognized Authentication Type 15sm3371851bwz.12 504 5.7.4 Unrecognized Authentication Type 15sm3371851bwz.12 I am currently googling this error with smtp.gmail.com, so far no luck. Tried to change port to 587 but then the test does not event pass the first line, same goes when disabling SSL or entering "true" instead of "True". Any idea where this could come from? To see the specific authorization types used by your mail host you can try the steps shown in this post: http://lime-technology.com/forum/index.php?topic=911.msg7040#msg7040 Trying them on smtp.google.com results in: root@Tower:~# telnet smtp.gmail.com 25 Trying 74.125.93.111... Connected to smtp.gmail.com (74.125.93.111). Escape character is '^]'. 220 mx.google.com ESMTP 6sm32131797qwd.36 ELHO 502 5.5.1 Unrecognized command. 6sm32131797qwd.36 HELO 250 mx.google.com at your service help 214 2.0.0 http://www.google.com/search?btnI&q=RFC+2821 6sm32131797qwd.36 quit Apparently it does not recognize ELHO, it instead recognizes HELO Joe L. Quote Link to comment
purko Posted December 28, 2009 Share Posted December 28, 2009 [red]ELHO[/red] 502 5.5.1 Unrecognized command. 6sm32131797qwd.36 HELO 250 mx.google.com at your service help 214 2.0.0 http://www.google.com/search?btnI&q=RFC+2821 6sm32131797qwd.36 quit Apparently it does not recognize [red]ELHO[/red], it instead recognizes HELO Joe L. It's EHLO, not ELHO. EHLO 250-mx.google.com at your service, [xxx.xxx.xxx.xxx] 250-SIZE 35651584 250-8BITMIME 250-STARTTLS 250-ENHANCEDSTATUSCODES 250 PIPELINING Quote Link to comment
brainbone Posted December 28, 2009 Author Share Posted December 28, 2009 Please try the attached v2.54 It looks like I was incorrectly telling socat to convert line termination (it was changing CRLF to CRCRLF). This was confusing Google's SMTP server. Edit: Attachment removed. See top post for most recent version. Quote Link to comment
Joe L. Posted December 28, 2009 Share Posted December 28, 2009 [red]ELHO[/red] 502 5.5.1 Unrecognized command. 6sm32131797qwd.36 HELO 250 mx.google.com at your service help 214 2.0.0 http://www.google.com/search?btnI&q=RFC+2821 6sm32131797qwd.36 quit Apparently it does not recognize [red]ELHO[/red], it instead recognizes HELO Joe L. It's EHLO, not ELHO. EHLO 250-mx.google.com at your service, [xxx.xxx.xxx.xxx] 250-SIZE 35651584 250-8BITMIME 250-STARTTLS 250-ENHANCEDSTATUSCODES 250 PIPELINING Oops... right... well it does not recognize [red]ELHO[/red] (I wasn't wrong, just mistakenly dyslexic) Sorry for any confusion. Quote Link to comment
brainbone Posted December 29, 2009 Author Share Posted December 29, 2009 Darts, Has 2.54 resolved your issue? Quote Link to comment
Darts Posted December 29, 2009 Share Posted December 29, 2009 Hey there! I am amazed, yesterday I had an issue, today I do not have it anymore thanks to a patch you provided less than 3 hours after the reporting of the issue. Thank you very much brainbone, everything works like a charm now Everyone, have a happy new year Quote Link to comment
brainbone Posted December 29, 2009 Author Share Posted December 29, 2009 Glad to hear! unraid_notify updated to v2.54, fixing issues with secure SMTP. If you had trouble with gmail or others using secure smtp (using the socat package), it should be resolved in 2.54 See top post for details. Quote Link to comment
brainbone Posted December 29, 2009 Author Share Posted December 29, 2009 Just realized that those using the "mail" command, and use secure SMTP, will also have this issue. I'll put out v2.55 with this corrected in "mail" as soon as I can. Quote Link to comment
abeta Posted December 30, 2009 Share Posted December 30, 2009 I wasn't able to get it working with the secure mail function, but was able to get emails, etc. My question is for notifications...should I worry that it isn't secure mail and try to get it going or it doesn't really matter? Quote Link to comment
Joe L. Posted December 30, 2009 Share Posted December 30, 2009 I wasn't able to get it working with the secure mail function, but was able to get emails, etc. My question is for notifications...should I worry that it isn't secure mail and try to get it going or it doesn't really matter? It does not really matter... some mail hosts require it to be secure, some do not, some accept either. (Security is far more important with mail containing sensitive data. You unRAID array status may be important, but not exactly as sensitive as your SSN, bank-account/credit-card numbers, etc.) Joe L. Quote Link to comment
brainbone Posted December 30, 2009 Author Share Posted December 30, 2009 The secure mail implementation in unraid_notify is only really useful for mail providers, like google, that wont let you relay mail without a secure connection. Quote Link to comment
abeta Posted December 30, 2009 Share Posted December 30, 2009 I wasn't able to get it working with the secure mail function, but was able to get emails, etc. My question is for notifications...should I worry that it isn't secure mail and try to get it going or it doesn't really matter? It does not really matter... some mail hosts require it to be secure, some do not, some accept either. (Security is far more important with mail containing sensitive data. You unRAID array status may be important, but not exactly as sensitive as your SSN, bank-account/credit-card numbers, etc.) Joe L. Yeah I was thinking that same thing. Even if someone got that information...there's nothing that I think they can do with it so the data is of local importance to me, but not really to anyone else but wanted to make sure I wasn't missing something. Thx! Quote Link to comment
purko Posted December 30, 2009 Share Posted December 30, 2009 Brainbone, you are a genius! I've always wanted a nice and simple SMTP client for my server. I downloaded your package, and I was very impressed to discover that all it has in it is just a couple of bash scripts! Great job! I played around with my unRAID box, and I did manage to make it send me a SMS message! That got me thinking... How about you split up your unraid_notify script into two separate things? The first script would be the health-monitor, and the second would be the alert-dispatch. When the health-monitor discovers a problem that needs to be reported, it simply issues a command like: dispatch "Disk failure: disk4" Now, the alert-dispatch will know what to do with such message depending on how dispatch.conf is configured. It may relay it through its mail module, and/or through the Skype-message module, and/or the SMS module, and/or the "BEEP" module, etc.. You get my idea. Yours, Purko Quote Link to comment
brainbone Posted December 30, 2009 Author Share Posted December 30, 2009 I played around with my unRAID box, and I did manage to make it send me a SMS message! That got me thinking... How about you split up your unraid_notify script into two separate things? The first script would be the health-monitor, and the second would be the alert-dispatch. When the health-monitor discovers a problem that needs to be reported, it simply issues a command like: dispatch "Disk failure: disk4" Now, the alert-dispatch will know what to do with such message depending on how dispatch.conf is configured. It may relay it through its mail module, and/or through the Skype-message module, and/or the SMS module, and/or the "BEEP" module, etc.. You get my idea. Thank you Purko. I've been thinking along similar lines of making unraid_notify more modular for awhile, and even posted about it not long ago, but, like so many others here, I guess I'm stuck in loop waiting to see what unraid 5 will bring. do { wait; } while (unraid<5); unraid_notify does have the option of executing an external command on an over temperature error condition (see: unraid_notify.cfg), but is currently limited to only disk temperature. I suppose something like this could be expanded. Quote Link to comment
Joe L. Posted December 30, 2009 Share Posted December 30, 2009 like so many others here, I guess I'm stuck in loop waiting to see what unraid 5 will bring. do { wait; } while (unraid<5); My loop is something very similar... But I send mail when the time arrives... ;D while true do test unraid -ge 5 && { mail -s "Time to see how to integrate with unRAID 5.0" [email protected] exit } sleep 3600 done Quote Link to comment
purko Posted December 31, 2009 Share Posted December 31, 2009 I played around with my unRAID box, and I did manage to make it send me a SMS message! That got me thinking... How about you split up your unraid_notify script into two separate things? The first script would be the health-monitor, and the second would be the alert-dispatch. When the health-monitor discovers a problem that needs to be reported, it simply issues a command like: dispatch "Disk failure: disk4" Now, the alert-dispatch will know what to do with such message depending on how dispatch.conf is configured. It may relay it through its mail module, and/or through the Skype-message module, and/or the SMS module, and/or the "BEEP" module, etc.. You get my idea. Thank you Purko. I've been thinking along similar lines of making unraid_notify more modular for awhile, and even posted about it not long ago, but, like so many others here, I guess I'm stuck in loop waiting to see what unraid 5 will bring. do { wait; } while (unraid<5); unraid_notify does have the option of executing an external command on an over temperature error condition (see: unraid_notify.cfg), but is currently limited to only disk temperature. I suppose something like this could be expanded. What I meant is, the health-monitoring part and the notification part seem like two separate jobs. But it's no big deal, really. It's a simple bash script after all. I can step on your shoulders and modify it myself. Again, great job! Quote Link to comment
brainbone Posted December 31, 2009 Author Share Posted December 31, 2009 What I meant is, the health-monitoring part and the notification part seem like two separate jobs. Yep, I understood that. see: "more modular" -- as is; making health-monitoring and notification separate "modules". But it's no big deal, really. It's a simple bash script after all. I can step on your shoulders and modify it myself. For now, this may be the best way. I'm hoping that unraid 5 has monitoring built in, and all we need to do is link to our own notification scripts. If not, I'll re-visit this. Again, great job! Glad to be of service. My loop is something very similar... But I send mail when the time arrives... ;D Damn, now I'm going to have to actually write a script to do this... thinking of wget and sed... Quote Link to comment
peter_sm Posted December 31, 2009 Share Posted December 31, 2009 Any one know have to add SMS function to unraid_notify Quote Link to comment
brainbone Posted December 31, 2009 Author Share Posted December 31, 2009 Any one know have to add SMS function to unraid_notify I'd try just sending an email to your phone number: T-Mobile: [email protected] Virgin Mobile: [email protected] Cingular: [email protected] Sprint: [email protected] Verizon: [email protected] Nextel: [email protected] Quote Link to comment
abeta Posted December 31, 2009 Share Posted December 31, 2009 Any one know have to add SMS function to unraid_notify I'd try just sending an email to your phone number: T-Mobile: [email protected] Virgin Mobile: [email protected] Cingular: [email protected] Sprint: [email protected] Verizon: [email protected] Nextel: [email protected] Cingular is now ATT, which is [email protected] Quote Link to comment
stchas Posted January 1, 2010 Share Posted January 1, 2010 Glad to hear! unraid_notify updated to v2.54, fixing issues with secure SMTP. If you had trouble with gmail or others using secure smtp (using the socat package), it should be resolved in 2.54 See top post for details. I fixed up some syntax errors in the included Mail script that caused the script to fail when using secure smtp. Also made the CRLF syntax in the generated email message consistent with your changes in unraid_notify v2.54. While I was in there, I beefed up the RcptTo logic to use ErrorRcptTo if all else failed. For those of you using apcupsd with your UPS, brainbone's modifications to the Mail script will allow apcupsd to send out system status emails (e.g., for onbattery or offbattery) as long as you provide a valid email address in the /root/.forward file. I added a statement like the one below to the unRAID /config/go file to "seed" the /root/.forward file: echo "[email protected]" >/root/.forward Kevin Quote Link to comment
brainbone Posted January 1, 2010 Author Share Posted January 1, 2010 Thanks Kevin. Attached is v2.55, with the above changes from Kevin/stchas I'll wait for feedback on v2.55 before I replace 2.54 in the top post. Edit: Attachment removed. See top post for most recent version. Quote Link to comment
xbit Posted January 1, 2010 Share Posted January 1, 2010 Thank you! Just updated to 2.55 and I'm getting messages again. I'm using smtp.gmail.com as my server. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.