Hi guys,
I have a bit of a problem I cannot solve:
I configrued and testet /tools email via Winbox.
When I want to send an email with the Send Email Function everything goes well so I believe my smtp config is ok.
Here is the log of a succesful mail:
Jul/21/2022 22:08:57 e-mail,debug recv: 220 gmx.xxx (mrgmx004) Nemesis ESMTP Service ready
Jul/21/2022 22:08:57 e-mail,debug send EHLO [84.112.XXX.XXX]
Jul/21/2022 22:08:58 e-mail,debug recv: 250-gmx.net Hello [84.112.XXX.XXX [84.112.XXX.XXX]
Jul/21/2022 22:08:58 e-mail,debug recv: 250-8BITMIME
Jul/21/2022 22:08:58 e-mail,debug recv: 250-SIZE 69920427
Jul/21/2022 22:08:58 e-mail,debug recv: 250 STARTTLS
Jul/21/2022 22:08:58 e-mail,debug send STARTTLS
Jul/21/2022 22:08:58 e-mail,debug recv: 220 OK
Jul/21/2022 22:08:59 e-mail,debug send EHLO [84.112.XXX.XXX]
Jul/21/2022 22:08:59 e-mail,debug recv: 250-gmx.xxx Hello [84.112.XXX.XXX] [84.112.XXX.XXX]
Jul/21/2022 22:08:59 e-mail,debug recv: 250-8BITMIME
Jul/21/2022 22:08:59 e-mail,debug recv: 250-AUTH LOGIN PLAIN
Jul/21/2022 22:08:59 e-mail,debug recv: 250 SIZE 69920427
Jul/21/2022 22:08:59 e-mail,debug send AUTH PLAIN
Jul/21/2022 22:09:00 e-mail,debug recv: 235 Authentication succeeded
Jul/21/2022 22:09:00 e-mail,debug send MAIL FROM: <sender@gmx.xxx>
Jul/21/2022 22:09:00 e-mail,debug recv: 250 Requested mail action okay, completed
Jul/21/2022 22:09:00 e-mail,debug send RCPT TO: <recipient@gmx.xxx>
Jul/21/2022 22:09:00 e-mail,debug recv: 250 OK
Jul/21/2022 22:09:00 e-mail,debug send DATA
Jul/21/2022 22:09:00 e-mail,debug recv: 354 Start mail input; end with .
Jul/21/2022 22:09:00 e-mail,debug send .
Jul/21/2022 22:09:00 e-mail,debug recv: 250 Requested mail action okay, completed: id=1MjjCL-1nm8IB0jCF-00lG2o
Jul/21/2022 22:09:00 e-mail,info sent <> to: recipient@gmx.xxx
Jul/21/2022 22:09:00 e-mail,debug send QUIT
Jul/21/2022 22:09:01 e-mail,debug recv: 221 gmx.xxx Service closing transmission channel
So this looks ok,
I found this script and added it under the name checkip
:global ipadd;
:local thisip [/ip address get [find where interface=ether1] address];
:if ($ipadd != $thisip) do={
/tool e-mail send to="recipient@gmx.xxx" subject="ip change" body="New ip $thisip";
set ipadd $thisip;
}
when I do
/system script
run checkip
I see the script runs in the log but nothing happens.
Could anyone please give a pointer to why this script fails / does not run correctly?
My IP changes every few months. so I just want to get an email in the morning and when I see it I can take the needed actions.
greetings
Tsunamski