Try using this… But modify it for your environment!!!
Requirements: blat + stunnel + dude server on windows machine + your email account
Modified from…
http://forum.mikrotik.com/viewtopic.php?f=8&t=31779&start=0&hilit=gmail
Although this shows its use for Gmail, this should still work for you… “stunnnel” is the SSL
provider for ‘the Dude’ & “Blat” is the Mail agent.
Download and install ‘stunnel’ and the ‘Blat’ software…
To verify if ‘stunnel’ is working… @ the Command Prompt
telnet localhost 2500
or
telnet xxx.xxx.xxx.xxx 2500
“Should get something like this… 220 mx.xyzabc.com ESMTP 9sm2309658agb.29” if not check the ‘stunnel.conf’ file!!!
Here is a example… emailblat.cmd
<-Begin of File->
set dir=c:\Program Files\Dude\blat
set smtpsender=yourname@xyzabc.com
set smtpserver=127.0.0.1
set smtpport=2500
set smtpuser=yourname
set smtppwd=password
set mailto=123@xyzabc.com, 456@xyzabc.com, 789@xyzabc.com
“%dir%\blat.exe” -to %mailto% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject %1 -body %2 -ps “C:\Program Files\Dude\blat\dude-email.txt”
<-End of File->
Here is a example of… stunnel.conf
<-Begin of File->
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
debug = 7
output = stunnel.log
CAfile = cert.pem
client = yes
[pop3s]
accept = 995
connect = pop.xyzabc.com:995
[ssmtp]
accept = 2500
connect = smtp.xyzabc.com:2500
<-End of File->
Create a new Notification in the… Main Services… Polling… of ‘the Dude’
Name:Email blat
Type:execute on server
Insert this into the “Insert Variable Command Box”…
“c:\Program Files\Dude\blat\emailblat.cmd” “Service [Probe.Name] on… [Device.Name] is now…[Service.Status]” “Service [Probe.Name] on… [Device.Name] is now… [Service.Status] ([Service.ProblemDescription]) @ [TimeAndDate]”
Explanation of above…
Call the Mail Agent… “c:\Program Files\Dude\blat\emailblat.cmd”
Insert SUBJECT into email… “Service [Probe.Name] on… [Device.Name] is now…[Service.Status]”
Insert BODY Text into email… “Service [Probe.Name] on… [Device.Name] is now… [Service.Status] ([Service.ProblemDescription]) @ [TimeAndDate]”
Now if you want to add a closing signature to the above…
Notice the… -ps “C:\Program Files\Dude\blat\dude-email.txt” in the… emailblat.cmd
If you want to make a TEST EMAIL CMD file make this…
Here is a example… test.cmd
<-Begin of File->
set dir=c:\Program Files\Dude\blat
set smtpsender=yourname@xyzabc.com
set smtpserver=127.0.0.1
set smtpport=2500
set smtpuser=yourname
set smtppwd=password
set mailto=123@xyzabc.com, 456xyzabc.com, 789xyzabc.com
“%dir%\blat.exe” -to %mailto% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject abc -body test -ps “C:\Program Files\Dude\blat\dude-email.txt”
<-End of File->
Example of… dude-email.txt
<-Begin of File->
Cheers!!!
From… yourname@xyzabc.com
** * * Your Name Here * * **
— Network IP Watch Service —
<-End of File->
This does work… I have made different ones for various party/'s needing notification within and outside network restraints.
CHEERS…& Good Day!!!