unraid_notify 2.55 [01-01-2010]: Email notifications for unRAID status


Recommended Posts

  • Replies 235
  • Created
  • Last Reply

Top Posters In This Topic

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?

Link to comment

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.

Link to comment

[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

 

Link to comment

[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. ;)
Link to comment

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.

Link to comment

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!

Link to comment

 

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!  ;D

 

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

 

 

Link to comment

I played around with my unRAID box, and I did manage to make it send me a SMS message!   ;D

 

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.

 

Link to comment

I played around with my unRAID box, and I did manage to make it send me a SMS message!   ;D

 

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!  :)

 

 

 

Link to comment

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 ;D

 

Damn, now I'm going to have to actually write a script to do this...  thinking of wget and sed...

 

Link to comment

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

 

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.