Slech, thanks for your help.. I did it with the other option that you said before Mailsend.exe, and now it is working perfectly..
Now, here is another question.. I am using The Dude to monitore Mikrotik Routers that are running BGP and OSPF.. do you know if I can use those Email Notifications to let me know if the BGP or OSPF goes down??
Really helpful article. I am new with Windows 8 and your article helped me to understand how the e-mail works with the Windows. I was confused how to send to two e-mail address and your thread helped me to fix these issues and clarify many doubts. Great job. You can submit this to twc internet to help all Windows users.
Hi!
My local network behind a proxy server. And for the correct operation of the notification dude, you must specify the proxy settings in the configuration -serverv stunnel.
This my working config given a proxy server:
(I used SMTP server Yandex. Why it is only through it the connection was successfully.)
#debug = 7 #output = stunnel.log - disabled after debugging
192.168.XXX.XXX:8080 - proxy server
Blat:
rem @echo off
set dir=C:\blat
set logname=%dir%\blat.log
set smtpsender=dude-XXXXXX@yandex.ru
set smtpserver=127.0.0.1
set smtpport=465
set smtpuser=dude-XXXXXX@yandex.ru
set smtppwd=XXXXXXXXXX
set mailto=XXXXXXXXXXXXX@gmail.com
set subject=%1
set body=%2
IF NOT EXIST %logname% echo ====================== Start of file ====================== > %logname%
echo. >> %logname%
echo ====================== %time% ====================== >> %logname%
C:
CD %dir%
echo CMD: blat.exe -to %mailto% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject %subject% -body %body% >> %logname%
blat.exe -to %mailto% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject %subject% -body %body% >> %logname%
set smtpsender=set smtpuser=your accaunt yandex
set smtppwd=your password yandex
set mailto=but you can specify any address - what you need. I have tried the service Beeline 7909XXXXXXX@sms.beemail.ru. It works, but SMS comes with a delay, and it is unacceptable. So I made a notification to gmail and alert comes time for my smartphone.
I tryed configuration of email notifications through gmail on windows, but not sends the nonifications. I have installed The Dude v3.6 on Windows Server 2012RH, I follow the steps but it does not work!!!
I need your help, this configuration is very importat in my company for monitoring the network.
I installed stunnel4.56 and blat3216_full, I edit stunnel.conf for these
stunnel.conf
Sample stunnel configuration file for Win32 by Michal Trojnara 2002-2012
; Some options used here may be inadequate for your particular configuration
; This sample file does *not* represent stunnel.conf defaults
; Please consult the manual for detailed description of available options
; **************************************************************************
; * Global options *
; **************************************************************************
; Debugging stuff (may useful for troubleshooting)
;debug = 7
;output = stunnel.log
; Disable FIPS mode to allow non-approved protocols and algorithms
;fips = no
; **************************************************************************
; * Service defaults may also be specified in individual service sections *
; **************************************************************************
; Certificate/key is needed in server mode and optional in client mode
cert = stunnel.pem
;key = stunnel.pem
; Authentication stuff needs to be configured to prevent MITM attacks
; It is not enabled by default!
;verify = 2
; Don't forget to c_rehash CApath
;CApath = certs
; It's often easier to use CAfile
;CAfile = certs.pem
; Don't forget to c_rehash CRLpath
;CRLpath = crls
; Alternatively CRLfile can be used
;CRLfile = crls.pem
; Disable support for insecure SSLv2 protocol
options = NO_SSLv2
; Workaround for Eudora bug
;options = DONT_INSERT_EMPTY_FRAGMENTS
; These options provide additional security at some performance degradation
;options = SINGLE_ECDH_USE
;options = SINGLE_DH_USE
; **************************************************************************
; * Service definitions (at least one service has to be defined) *
; **************************************************************************
; Example SSL server mode services
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
;debug = 7
;output = stunnel.log
client = yes
[pop3s]
accept = 995
connect = pop.gmail.com:995
[ssmtp]
accept = 465
connect = smtp.gmail.com:465
[/color]
; Example SSL client mode services
;[gmail-pop3]
;client = yes
;accept = 127.0.0.1:110
;connect = pop.gmail.com:995
;[gmail-imap]
;client = yes
;accept = 127.0.0.1:143
;connect = imap.gmail.com:993
;[gmail-smtp]
;client = yes
;accept = 127.0.0.1:25
;connect = smtp.gmail.com:465
; Example SSL front-end to a web server
;[https]
;accept = 443
;connect = 80
; "TIMEOUTclose = 0" is a workaround for a design flaw in Microsoft SSL
; Microsoft implementations do not use SSL close-notify alert and thus
; they are vulnerable to truncation attacks
;TIMEOUTclose = 0
; vim:ft=dosini
mailblat.cmd create the file
set blatdir=C:\Program Files\Dude\blat\mailblat.cmd
set smtpsender=XXXXXXXX@gmail.com
set smtpserver=127.0.0.1
set smtpport=465
set smtpuser=XXXXXXXXXX@gmail.com
set smtppwd=MYPASSWORD
set mailto=XXXXXXXXXXX@gmail.com
"%blatdir%\blat.exe" -to %XXXXXXXXX@gmail.com% -f %XXXXXXXXXX@gmail.com% -server %127.0.0.1% -port %465% -u %XXXXXXXXXX@gmail.com% -pw %MYPASSWORD% -subject %1 -body %2
The Dude v3.6 add the new notifications
Name: Email Externo
Type: Execute on server
(Insertar Variale)
Command: "C:\Program Files (x86)\Dude\blat\mailblat.cmd" "Service [Probe.Name] on [Device.Name] is now [Service.Status]" "Service [Probe.Name] on [Device.Name] is now [Service.Status] ([Service.ProblemDescription])"
The server have Private IP, the setting General on The Dude is:
Stunnel should work as a Windows service. To verify if it is running:
Win+R → Services.msc → Enter → Find Stunnel and verify its state. If it is not running - “Start” it.
As your stunnel debug is turned on, in stunnel.logu you should see something if it working. I think this file should be in the stunnel installation folder.
Try a connection to the Gmail directly and using stunnel:
a)telnet smtp.gmail.com 465
b)telnet localhost 465
And notice if connection is established.
Why you are still using Blat with stunnel? There is a better solution like Mail Alert Simple Mailer (https://sourceforge.net/projects/mail-alert/) which natively supports SSL/STARTTLS and stores encrypted SMTP password in configuration file.