Suse User Posted September 25, 2007 Share Posted September 25, 2007 Here's my output:- EHLO 501 EHLO requires domain address EHLO mydomain.com 250-mrelayeu8.kundenserver.de pleased to meet you 250-STARTTLS 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-PIPELINING 250-SIZE 52428800 250 HELP HELP 214 no help available I've succesfully used base64 login when configuring TiVo scripts in the past so I know it can work. I take it AUTH=PLAIN LOGIN is stil authentification, simply unencrypted? The current script has these lines # Build the echo string sEcho="ehlo $sDomain\r\nmail from:$sMailFrom\r\n" you would change them to something like this: login="yourBase64Login" password="yourBase64password" # Build the echo string sEcho="ehlo $sDomain\r\n" sEcho+="auth login\r\n" sEcho+="$login\r\n" sEcho+="$password\r\n" sEcho+="mail from:$sMailFrom\r\n" I've modified my script accordingly using base64 encoded versions of my login & pw and will report back a little later whether I am now receieving the notification mails. As a precaution I ran 'chmod +x smtp_check_unraid.sh' again after I saved. Was this necessary? Thanks, Mark. Quote Link to comment
Suse User Posted September 25, 2007 Share Posted September 25, 2007 A few hous have passed with no mail... Would the success or failure of an attempted mail be logged anywhere? Thanks, Mark. Quote Link to comment
Joe L. Posted September 25, 2007 Share Posted September 25, 2007 A few hous have passed with no mail... Would the success or failure of an attempted mail be logged anywhere? Thanks, Mark. Mark, The bad news: The output of commands run hourly by the chronological scheduler are sent to /dev/null. So no output remains to see what happened. The good news: You can run the script in a way that shows each line as it is evaluated and executed. No need to wait for the hourly task. Lets assume you have the script in /boot. Log via telnet type: sh -xv /boot/smtp_check_unraid.sh 2>&1 | tee /boot/smtp_check.log be prepared for lots of lines scrolling, but don't worry, they will also be saved in the /boot/smtp_check.log file. The -x option shows you the result of each "if" command after the variables are expanded to hold their values. This lets you see what values are being compared and evaluated. The -v option shows you each line (or set of lines) as they are read by the shell. This lets you see the progress of each command in the script. The "2>&1" notation sends (re-directs) the error output to the same output stream as the standard output. (the extra output from the -xv options is normally sent to the error output.) The combination is then piped to the "tee" command. It saves a copy in the file named and another copy to its standard output and to your screen. With this, you can see what is happening, and by sharing the log, so can I (if you share it with me). You can zip the smtp_check.log file and attach it to a post or a PM if you need more help in debugging. Please EDIT smtp_check.log before you zip and attach it to delete your REAL EMAIL ADDRESS, unless you want the entire unRaid community to have it. Now, just an FYI. My script is set up to be silent when no error condition exists on the server and NOT send an e-maill. If you did the same, then no e-mail will be sent when everything is working properly and the array is started. Joe L. Quote Link to comment
Suse User Posted September 25, 2007 Share Posted September 25, 2007 Hi Joe, I think I can spot the problem from that checking script. The sSmtpServer variable correctly reports my provider's smtp server name, however the net lookup returns no ip address. + ip_addr= + '[' 255 = 0 ']' If I ping my mail server from the Telnet client I get 'unknown host', yet if I ping it from my desktop PC I get the IP address just fine. It would appear that my unRaid has no idea of my DNS lookup IP. I made myself a temporary version changing the lines sSmtpServer="smtp.myisp.com" to sSmtpServer="x.x.x.x" AND echo -e $sEcho|nc -i 1 -q 1 $ip_addr 25 to echo -e $sEcho|nc -i 1 -q 1 x.x.x.x 25 Where x.x.x.x is the IP address of my mail server reported by a ping from my desktop PC and it works perfectly. I guess I need to teach my unraid where to do DNS lookups. Thanks, Mark. Quote Link to comment
Joe L. Posted September 25, 2007 Share Posted September 25, 2007 you might try to add a line to your /etc/resolv.conf file echo "nameserver x.x.x.x" >/etc/resolv.conf where x.x.x.x is the IP of your DNS. In my case, the DNS is the IP of my router. If it works, put it as one more line at the end of your "go" script. Did the authentication work in the smtp mail as I had scripted it using the base64 login and password? Do you now get e-mail messages when the array is stopped (at roughly 47 minutes past the hour) or when you invoke the script by hand? Joe L. Quote Link to comment
Suse User Posted September 25, 2007 Share Posted September 25, 2007 you might try to add a line to your /etc/resolv.conf file echo "nameserver x.x.x.x" >/etc/resolv.conf where x.x.x.x is the IP of your DNS. In my case, the DNS is the IP of my router. If it works, put it as one more line at the end of your "go" script. That worked! I added it to my go script. Did the authentication work in the smtp mail as I had scripted it using the base64 login and password? Yes, worked just fine once my unraid know where to send it , Your modification to allow authenticated mail worked well. Do you now get e-mail messages when the array is stopped (at roughly 47 minutes past the hour) or when you invoke the script by hand? I get the mail at 47 minutes past the hours with the array started, I have left the "send even when everything's ok" option enabled whilst testing. I have to say I haven't tried ot with the array stopped yet. I'm pretty sure it's all good now though. I will go back to your original script now that my unraid has the powers of DNS! Thanks, Mark. Quote Link to comment
electr0n Posted October 17, 2007 Share Posted October 17, 2007 I just wanted to thank Joe L. and kenshin for posting their work. I know virtually nothing about linux but was able to follow the thread to get my email notification up and running. I only had two problems - both minor. One was having to translate the wordpad edited version of my script to take out the bogus characters. The other was finding out how to login through my sbcglobal.net account to get my email sent. Anyway - it's working great now. I just got my UnRAID server up and running and I felt that email notification of the server status was the only thing lacking. Not any more! Thanks again for sharing your hard work! Quote Link to comment
Joe L. Posted October 17, 2007 Share Posted October 17, 2007 I just wanted to thank Joe L. and kenshin for posting their work. I know virtually nothing about linux but was able to follow the thread to get my email notification up and running. I only had two problems - both minor. One was having to translate the wordpad edited version of my script to take out the bogus characters. The other was finding out how to login through my sbcglobal.net account to get my email sent. Anyway - it's working great now. I just got my UnRAID server up and running and I felt that email notification of the server status was the only thing lacking. Not any more! Thanks again for sharing your hard work! Happy to hear you were successful. Glad you were able to get things working with only minor problems... Did your email account use authentication? That would complicate things somewhat. Joe L. Quote Link to comment
electr0n Posted October 17, 2007 Share Posted October 17, 2007 Did your email account use authentication? That would complicate things somewhat. Yes, thanks to you I know more about smtp authentication than I ever cared to know... Quote Link to comment
Joe L. Posted October 17, 2007 Share Posted October 17, 2007 Did your email account use authentication? That would complicate things somewhat. Yes, thanks to you I know more about smtp authentication than I ever cared to know... Me too... remember, my ISP does not use authentication... I just learned as I tried to help others like yourself. (I did lots of google searches. Would you believe there are over 3.5 million matches if you search on SMTP and EMAIL... and most of them do NOT tell you how to do it using a shell script as we did.) Joe L. Quote Link to comment
Hooked4Life Posted November 3, 2007 Share Posted November 3, 2007 Joe L. : I get notified every hour even when my server is online. Can you take a look at the attached e-mail that I am receiving? Thanks.. Output of /proc/mdcmd: ----------------------------------------------------------------- cmdOper=status cmdResult=ok sbName=/boot/config/super.dat sbVersion=0.92.0 sbCreated=1192819446 sbUpdated=1194165433 sbEvents=19 sbState=0 sbNumDisks=10 sbSynced=1194060455 sbSyncErrs=0 mdVersion=0.92.0 mdState=STARTED mdNumProtected=10 mdNumDisabled=0 mdDisabledDisk=0 mdNumInvalid=0 mdInvalidDisk=0 mdNumMissing=0 mdMissingDisk=0 mdNumNew=0 mdResync=0 diskNumber.0=0 diskName.0= diskState.0=7 diskSize.0=488386552 diskModel.0=ST3500830AS diskSerial.0=6QG0FTY6 diskNumReads.0=2860 diskNumWrites.0=2877 diskNumErrors.0=0 rdevNumber.0=0 rdevStatus.0=DISK_OK rdevName.0=sda rdevType.0=SATA rdevSize.0=488386552 rdevModel.0=ST3500830AS rdevSerial.0=6QG0FTY6 diskNumber.1=1 diskName.1=md1 diskState.1=7 diskSize.1=390711352 diskModel.1=ST3400620AS diskSerial.1=5QG0EB4H diskNumReads.1=91 diskNumWrites.1=8 diskNumErrors.1=0 rdevNumber.1=1 rdevStatus.1=DISK_OK rdevName.1=sdh rdevType.1=SATA rdevSize.1=390711352 rdevModel.1=ST3400620AS rdevSerial.1=5QG0EB4H diskNumber.2=2 diskName.2=md2 diskState.2=7 diskSize.2=244198552 diskModel.2=ST3250823A diskSerial.2=3ND2CJR8 diskNumReads.2=629 diskNumWrites.2=8 diskNumErrors.2=0 rdevNumber.2=2 rdevStatus.2=DISK_OK rdevName.2=sde rdevType.2=SATA rdevSize.2=244198552 rdevModel.2=ST3250823A rdevSerial.2=3ND2CJR8 diskNumber.3=3 diskName.3=md3 diskState.3=7 diskSize.3=244198552 diskModel.3=Maxtor 6L250R0 diskSerial.3=L59LLJ5G diskNumReads.3=106 diskNumWrites.3=8 diskNumErrors.3=0 rdevNumber.3=3 rdevStatus.3=DISK_OK rdevName.3=sdf rdevType.3=SATA rdevSize.3=244198552 rdevModel.3=Maxtor 6L250R0 rdevSerial.3=L59LLJ5G diskNumber.4=4 diskName.4=md4 diskState.4=7 diskSize.4=293036152 diskModel.4=ST3300631A diskSerial.4=5NF1G448 diskNumReads.4=104 diskNumWrites.4=8 diskNumErrors.4=0 rdevNumber.4=4 rdevStatus.4=DISK_OK rdevName.4=hde rdevType.4=PATA rdevSize.4=293036152 rdevModel.4=ST3300631A rdevSerial.4=5NF1G448 diskNumber.5=5 diskName.5=md5 diskState.5=7 diskSize.5=293036152 diskModel.5=ST3300831A diskSerial.5=3NF15JP8 diskNumReads.5=66 diskNumWrites.5=8 diskNumErrors.5=0 rdevNumber.5=5 rdevStatus.5=DISK_OK rdevName.5=hdf rdevType.5=PATA rdevSize.5=293036152 rdevModel.5=ST3300831A rdevSerial.5=3NF15JP8 diskNumber.6=6 diskName.6=md6 diskState.6=7 diskSize.6=293057320 diskModel.6=Maxtor 6L300R0 diskSerial.6=L603TT7G diskNumReads.6=6078 diskNumWrites.6=2586 diskNumErrors.6=0 rdevNumber.6=6 rdevStatus.6=DISK_OK rdevName.6=sdc rdevType.6=SATA rdevSize.6=293057320 rdevModel.6=Maxtor 6L300R0 rdevSerial.6=L603TT7G diskNumber.7=7 diskName.7=md7 diskState.7=7 diskSize.7=199148512 diskModel.7=Maxtor 6L200P0 diskSerial.7=L41KMQ2H diskNumReads.7=2389 diskNumWrites.7=219 diskNumErrors.7=0 rdevNumber.7=7 rdevStatus.7=DISK_OK rdevName.7=sdd rdevType.7=SATA rdevSize.7=199148512 rdevModel.7=Maxtor 6L200P0 rdevSerial.7=L41KMQ2H diskNumber.8=8 diskName.8=md8 diskState.8=7 diskSize.8=390711352 diskModel.8=SAMSUNG HD400LJ diskSerial.8=S0H2J10L504301 diskNumReads.8=52 diskNumWrites.8=32 diskNumErrors.8=0 rdevNumber.8=8 rdevStatus.8=DISK_OK rdevName.8=sdi rdevType.8=SATA rdevSize.8=390711352 rdevModel.8=SAMSUNG HD400LJ rdevSerial.8=S0H2J10L504301 diskNumber.9=9 diskName.9=md9 diskState.9=7 diskSize.9=488386552 diskModel.9=ST3500830AS diskSerial.9=6QG0GM78 diskNumReads.9=31 diskNumWrites.9=8 diskNumErrors.9=0 rdevNumber.9=9 rdevStatus.9=DISK_OK rdevName.9=sdb rdevType.9=SATA rdevSize.9=488386552 rdevModel.9=ST3500830AS rdevSerial.9=6QG0GM78 diskNumber.10=10 diskName.10= diskState.10=0 diskSize.10=0 diskModel.10= diskSerial.10= diskNumReads.10=0 diskNumWrites.10=0 diskNumErrors.10=0 rdevNumber.10=10 rdevStatus.10=DISK_NP rdevName.10= rdevType.10=PATA rdevSize.10=0 rdevModel.10= rdevSerial.10= diskNumber.11=11 diskName.11= diskState.11=0 diskSize.11=0 diskModel.11= diskSerial.11= diskNumReads.11=0 diskNumWrites.11=0 diskNumErrors.11=0 rdevNumber.11=11 rdevStatus.11=DISK_NP rdevName.11= rdevType.11=PATA rdevSize.11=0 rdevModel.11= rdevSerial.11= diskNumber.12=12 diskName.12= diskState.12=0 diskSize.12=0 diskModel.12= diskSerial.12= diskNumReads.12=0 diskNumWrites.12=0 diskNumErrors.12=0 rdevNumber.12=12 rdevStatus.12=DISK_NP rdevName.12= rdevType.12=PATA rdevSize.12=0 rdevModel.12= rdevSerial.12= diskNumber.13=13 diskName.13= diskState.13=0 diskSize.13=0 diskModel.13= diskSerial.13= diskNumReads.13=0 diskNumWrites.13=0 diskNumErrors.13=0 rdevNumber.13=13 rdevStatus.13=DISK_NP rdevName.13= rdevType.13=PATA rdevSize.13=0 rdevModel.13= rdevSerial.13= diskNumber.14=14 diskName.14= diskState.14=0 diskSize.14=0 diskModel.14= diskSerial.14= diskNumReads.14=0 diskNumWrites.14=0 diskNumErrors.14=0 rdevNumber.14=14 rdevStatus.14=DISK_NP rdevName.14= rdevType.14=PATA rdevSize.14=0 rdevModel.14= rdevSerial.14= diskNumber.15=15 diskName.15= diskState.15=0 diskSize.15=0 diskModel.15= diskSerial.15= diskNumReads.15=0 diskNumWrites.15=0 diskNumErrors.15=0 rdevNumber.15=15 rdevStatus.15=DISK_NP rdevName.15= rdevType.15=PATA rdevSize.15=0 rdevModel.15= rdevSerial.15= Quote Link to comment
Joe L. Posted November 3, 2007 Share Posted November 3, 2007 What are you getting as the "Subject" line in the e-mail? Joe L. Quote Link to comment
Hooked4Life Posted November 3, 2007 Share Posted November 3, 2007 What are you getting as the "Subject" line in the e-mail? Joe L. unRaid Status Notification Quote Link to comment
Joe L. Posted November 3, 2007 Share Posted November 3, 2007 Unless you edited the script as described in this post: http://lime-technology.com/forum/index.php?topic=911.msg6690#msg6690 it is working as expected. In other words, the default behavior is to provide an e-mail message every time it is invoked. (and you are invoking it hourly) If you desire a message only when an error is detected, edit the lines in the script as described in the post above. You may also want to add a line as described in this post http://lime-technology.com/forum/index.php?topic=911.msg6715#msg6715 so it is easier to tell by the subject line when an error occurs. Joe L. Quote Link to comment
Joe L. Posted November 3, 2007 Share Posted November 3, 2007 Since attachments are not working, here is my current script. Note: my SMTP server does not use authentication. Joe L. #!/bin/bash # # Title: smtp_check_status.sh # # Summary: # The purpose of this script is to check the status of the unRAID # array by searching the /proc/mdcmd file for known bad states. # This script was originally created by Joe. L for use with Yak # and has been modified by kenshin (twelston) on 08-17-2007 to add smtp # functionality, and increase the information transmitted by the script # (i.e. adding ip, date, and the output of the /proc/mdcmd file if # elected by the user) # # If you have any questions or problems while using this script please # post them to the unRaid forum: # # http://lime-technology.com/forum/ # # DISCLAIMER: # Your use of this script is at your sole risk. This script is provided # "as -is", without any warranty # # Further, the authors of this script shall not be liable for any damages # you may sustain by using this information, whether direct, indirect, # special, incidental or consequential, even if they have been advised of # the possibility of such damages. # Define the following six values to setup this script # The name of your SMTP server sSmtpServer="smtp-server.somewhere.rr.com" # Your domain name sDomain="www.somewhere.rr.com" # The "from" email address sMailFrom="[email protected]" # The "to" mail address (The addresses must be separated by a space, a # single address requires no spaces) sRcptTo="[email protected]" # The email subject sSubject="unRaid Status Notification" # Choose whether to include the contents of /proc/mdcmd in your status # notifications (Setting this value to anything but "True" is the same # as setting it to "False") bIncludeMdcmd="True" PATH=$PATH:/boot/ # initialize the error message to an empty string if no hourly OK message is desired # like this: emsg="" #emsg="unRaid is OK" # request that status be updated echo "status" >/proc/mdcmd # now check the status and report as needed grep "mdState=STARTED" /proc/mdcmd >/dev/null 2>&1 if [ $? != 0 ] then emsg="unRaid array not started" bIncludeMdcmd="True" fi egrep "=DISK_INVALID|=DISK_DSBL" /proc/mdcmd >/dev/null 2>&1 if [ $? = 0 ] then sSubject="unRaid Failure Notification" emsg="The unRaid array needs attention. One or more disks are disabled or invalid." bIncludeMdcmd="True" fi # if an error message was set, broadcast it to all the email addresses # in the notify list if [ "$emsg" != "" ] then # look up the ip address given the machine name ip_addr=`net lookup $sSmtpServer 2>/dev/null` if [ $? = 0 ] then # Build the echo string sEcho="ehlo $sDomain\r\nmail from:$sMailFrom\r\n" # Add each recipient to the RCPT list for i in $sRcptTo do sEcho+="RCPT TO:"$i"\r\n" done # Message header sEcho+="data\r\nFrom:$sMailFrom\r\nTo:" # Add each recipient to the message header for i in $sRcptTo do sEcho+=$i";" done sEcho+="\r\n" # Message Subject sEcho+="Subject:$sSubject\r\n" # Message Body (You can change this to look how you want. Just # to include \r\n at the end of each line.) sEcho+="This message is a status update for unRAID $HOSTNAME\r\n" sEcho+="-----------------------------------------------------------------\r\n" sEcho+="Server Name: $HOSTNAME\r\n" sEcho+="Server IP: `net lookup $HOSTNAME 2>/dev/null`\r\n" sEcho+="Status: $emsg\r\n" sEcho+="Date: " sEcho+=`date 2>/dev/null` sEcho+="\r\n" # Add the contents of /proc/mdcmd if elected by the user if [ "$bIncludeMdcmd" = "True" ] then sEcho+="\r\n" sEcho+="Output of /proc/mdcmd:\r\n" sEcho+="-----------------------------------------------------------------\r\n" # Add <CRLF> to each line file=/proc/mdcmd sEcho+=`sed "s/$/\\r\\n/" <$file` sEcho+="\r\n" fi # End the message sEcho+=".\r\n" sEcho+="QUIT\r\n" # Send the message we just built echo -e $sEcho|nc -i 1 -q 1 $ip_addr 25 # Use the following line for debug #echo -e $sEcho|nc -w 1 -q 2 -i 1 -vv $ip_addr 25 fi fi Quote Link to comment
jwaters Posted November 12, 2007 Share Posted November 12, 2007 Yes, thanks to you I know more about smtp authentication than I ever cared to know... Would you mind explaining how you got authentication to work through sbcglobal.net? My outgoing mail server is through smtp.sbcglobal.yahoo.com, but they have changed the port to 465 instead of 25, and also require authentication. Quote Link to comment
Joe L. Posted November 12, 2007 Share Posted November 12, 2007 Yes, thanks to you I know more about smtp authentication than I ever cared to know... Would you mind explaining how you got authentication to work through sbcglobal.net? My outgoing mail server is through smtp.sbcglobal.yahoo.com, but they have changed the port to 465 instead of 25, and also require authentication. You need to read back a few posts to learn how to connect via telnet to your host and do an experiment or two. I just tried from here using port 25... this is how they responded. root@Tower:~# telnet smtp.sbcglobal.yahoo.com 25 Trying 68.142.229.41... Connected to smtp.sbcglobal.yahoo.com. Escape character is '^]'. 220 smtp104.sbc.mail.re2.yahoo.com ESMTP EHLO 250-smtp104.sbc.mail.re2.yahoo.com 250-AUTH LOGIN PLAIN XYMCOOKIE 250-PIPELINING 250 8BITMIME QUIT 221 smtp104.sbc.mail.re2.yahoo.com I would try port 25 and set up as described in previous posts for AUTH LOGIN using base64 encrypted login/password. It might just work. (It looks as if they have an smtp service running on port 25) I have no idea how to use port 465. Joe L. Quote Link to comment
electr0n Posted November 17, 2007 Share Posted November 17, 2007 I would try port 25 and set up as described in previous posts for AUTH LOGIN using base64 encrypted login/password. It might just work. (It looks as if they have an smtp service running on port 25) Joe is right that's what I did. It's been working great for weeks but I just got an email from ATT/Yahoo saying that I should start using SSL port 465. So it may stop working one day... Quote Link to comment
JarDo Posted December 10, 2007 Share Posted December 10, 2007 Thanks to everyone for this info. I read the whole thread (several times) and got the hourly email notifications working on first attempt. There are a couple of bugs I could use some help with. I have two email addresses configured for receipt of the notifications. The first email in the list receives the notification without the email body and the second email in the list receives the notification with body text. Both recepients receive output from /proc/mdcmd. Unless the script recreates a new email for each recepient, I can't imagine how this is happening. The second issue I have is that the output from /proc/mdcmd has no carraige returns or line feeds like I see when I cat /proc/mdcmd in a telnet window. This behavior is the same for both email recepients so I don't think that it is a problem on the receiving end. Also, I beilve I've rulled out the possibility of the email client affecting the format of the displayed message. I've tried viewing the email in both web-based clients and in Outlook. No change. Quote Link to comment
Joe L. Posted December 10, 2007 Share Posted December 10, 2007 Only one e-mail is being sent, with two recipients listed in its header. Not sure what to say about that. The contents of /proc/mdcmd are sent through the stream editor with he following series of shown below They are supposed to add a carriage return/newline to each line in turn. See if those were entered correctly. # Add <CRLF> to each line file=/proc/mdcmd sEcho+=`sed "s/$/\\r\\n/" <$file` sEcho+="\r\n" Quote Link to comment
RockDawg Posted December 21, 2007 Share Posted December 21, 2007 I've been trying to get this working but here is the response when I test it through telnet: root@Tower1:/boot# smtp_check_unraid.sh 220 mx.google.com ESMTP a42sm2022123rne.11 250-mx.google.com at your service, [65.25.22.16] 250-SIZE 28311552 250-8BITMIME 250-STARTTLS 250 ENHANCEDSTATUSCODES 530 5.7.0 Must issue a STARTTLS command first a42sm2022123rne.11 530 5.7.0 Must issue a STARTTLS command first a42sm2022123rne.11 530 5.7.0 Must issue a STARTTLS command first a42sm2022123rne.11 502 5.5.1 Unrecognized command a42sm2022123rne.11 502 5.5.1 Unrecognized command a42sm2022123rne.11 502 5.5.1 Unrecognized command a42sm2022123rne.11 502 5.5.1 Unrecognized command a42sm2022123rne.11 502 5.5.1 Unrecognized command a42sm2022123rne.11 554 5.7.0 Too Many Unauthenticated commands. a42sm2022123rne.11 root@Tower1:/boot# I have my own domain and I use google to host. Quote Link to comment
Joe L. Posted December 22, 2007 Share Posted December 22, 2007 From what I can see, your mail host insists on an TLS session being started. TLS (formerly SSL) stands for Transport Layer Security. Read more about it here: http://postfix.state-of-mind.de/patrick.koetter/smtpauth/postfix_tls_support.html You will have a very tough time sending mail through that mail server. They are insisting you first issue a STARTTLS command and then perform the balance of the conversation using an SSL style encrypted conversation. If you are real brave, you can try setting up stunnel on the unRaid server (I've not looked for a binary that will run on it, but who knows, you might find one) Then, start the conversation with the mail server, then issue a STARTTLS, then use netcat connected to a local port that stunnel is listening to for the balance of the conversation with the mail server. That session would issue the balance of the commands, logging in, sending the mail, and eventually quiting the mail session. This is probably way over your head if you are not a UNIX Guru, so you might have to wait for somebody else to figure out how to deal with a STARTTLS mail client. Sorry I can't help more... my mail server does not even use a login and password... Joe L. Quote Link to comment
RockDawg Posted December 22, 2007 Share Posted December 22, 2007 Thanks for the reply. I don't know anything about Unix or even writing a shell script for that matter. So I'm sure it's way over my head. That sucks because this would've been a handy feature. Quote Link to comment
RockDawg Posted December 22, 2007 Share Posted December 22, 2007 After thinking about it for a few I realized there was a simple solution. Even though I use gmail for my personal email, Road Runner is my ISP and I can use their SMTP server to send the unRaid status to my gmail email. Pretty obvious really. Still waiting to see it automatically send me an email, but manually running the script worked like a charm. Thanks Kenshin and Joe L.! EDIT: Will it send an alert if there are parity or disk errors? Quote Link to comment
RockDawg Posted December 22, 2007 Share Posted December 22, 2007 One more question. I noticed Joe L. said: The last few lines in the "go" script will then be: # Start the management utility emhttp & cp /boot/smtp_check_unraid.sh /etc/cron.hourly/ My "go" file now looks like: #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & sleep 30 for i in /dev/md* do blockdev --setra 2048 $i done cp /boot/smtp_check_unraid.sh /etc/cron.hourly/ Is this O? I'm not sure why there's no "emhttp &" in there. 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.