Page 1 of 1

5.2 and ChangeIP Script

Posted: Mon May 23, 2011 1:37 pm
by ahooper
I have been using the following script for checking the remote clients IP, if their IP changes I get a copy of the new IP sent to me via email.

However I have upgraded to MT 5.2 and this script no longer works. Any ideas as to why?
I have tried also a couple of other scripts and none of them seem to work.
:global linkip
:global strsystemname [/system identity get name]
:global linkip [/ip address get [/ip address find interface=PPPoE-Interface] address]
:global linksysver ("Version-" . [/system package get system version] )
:if ([ :typeof $linklastip ] = nil ) do={ :global linklastip "0" }
:if ([ :typeof $linkip ] = nil ) do={
:log info ("WAN: No ip address present on interface, please check.")
} else={
:if ($linkip != $linklastip) do={ 
/tool e-mail send from=clientupdate@my.mailserver.com  to=myemail@my.mailserver.com subject="$strsystemname" body="$linkip" server=my.mailserver.com
:log info "WAN: IP Changed Sending UPDATE!"
:global linklastip "$linkip"
} else={
:log info "WAN: IP Unchanged No update required."
}
}

Re: 5.2 and ChangeIP Script

Posted: Wed Jun 01, 2011 7:44 am
by yuefy
Sent to the wrong

Re: 5.2 and ChangeIP Script

Posted: Fri Jul 01, 2011 9:31 pm
by Eliminateur
i hjave the same problem, i've implemented BOTH these scripts:
http://wiki.mikrotik.com/wiki/Sending_y ... IP_address
the only change is in the:
/tool e-mail send from=from@email_here_com to=to@email_here_com subject="DSL IP $strDate $strTime $strSystemName" body="DSL IP $ddnsip" 
i took out the server part as i already have it globally configured.

and they both don't work nor they log anything.

if i manually use the email send line(without the variables) from terminal then it works

PD: i'm using 5.5