Configuracao de notificacoes por email_

35 views
Skip to first unread message

Crimildo Moises

unread,
Apr 11, 2016, 7:56:34 AM4/11/16
to MTCNA / MTCRE 25/11/11
Saudacoes pessoal do Forum!

So novo no mundo de Tecnologias, foi ver que o mikrotik é um aplicativo bastante bom no controlo de 

Sites(Links down/up), ou seja monitoramento.

desta feita venho pedir ao pessoal ligado ajuda de como posso configuracao notificacao por email. usando meu gmail.

Ja segui as instruncoes da Mikrotik a baixo descritos. mas nao recebo nenhuma notificacacao. meu SO: Windows7 64 Bits.

Requirements:
1. Stunnel.
2. Blat.
3. Dude server on windows machine.
4. Gmail account.

Setup instruction:
1. Download and install stunnel

2. Create the following stunnel.conf (please backup original file and create this file from scratch)

Code: Select all

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
And reload config in stunnel.

3. Install stunnel as service:

Code: Select all

"C:\Program Files\stunnel\stunnel.exe" -install
or

Code: Select all

Start-->All Programms --> stunnel --> stunnel Service Install


4. Download blat and unpack 2 files

Code: Select all

blat.dll
blat.exe
in

Code: Select all

C:\Program Files\Dude\blat
directory or other directory.

5. In directory from p.2 create emailblat.cmd file with the following content

Code: Select all

:: 
:: Send email notifications from Dude via Gmail
:: 
set blatdir=C:\Program Files\Dude\blat
set smtpsender=username@gmail.com
set smtpserver=127.0.0.1
set smtpport=465
set smtpuser=username
set smtppwd=*********
set mailto=username@gmail.com
::
::
"%blatdir%\blat.exe" -to %mailto% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject %1 -body %2
::
:: Uncomment for debug only (Comment previous line. Do not forget to return back after debugging!!!)
::
::"%blatdir%\blat.exe" -to %mailto% -f %smtpsender% -server %smtpserver% -port %smtpport% -u %smtpuser% -pw %smtppwd% -subject "Test subject" -body "Test body" -debug -log emailbtal.log
::
::pause
::
change in it: smtpsendersmtpusersmtppwdmailto

For debugging uncomment appropriate line, and comment previous - then start emailblat.cmd without parameters. And do not forget to return back after debugging!!!

5. Create new Notification 
Name: Email-blat
Type: execute on server

Code: Select all

"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])"
And test it.

7. Now you can use it.

Crimildo Moises

unread,
Jun 7, 2017, 1:31:41 PM6/7/17
to MTCNA / MTCRE 25/11/11
Reply all
Reply to author
Forward
0 new messages