Нашел вот такой скрипт для DHCP:
Код: Выделить всё
:if ($leaseBound = 1) do={
/ip dhcp-server lease;
:foreach i in=[find dynamic=yes] do={
:local dhcpip
:set dhcpip [ get $i address ];
:local clientid
:set clientid [get $i host-name];
:if ($leaseActIP = $dhcpip) do={
:local comment "New IP"
:set comment ( $comment . ": " . $dhcpip . ": " . $clientid);
/log error $comment;
/ tool e-mail send from="имя@yandex.ru" server=87.250.250.38 to= "имя@yandex.ru" body="IP: $leaseActIP;
Host: $clientid;
Mac: $leaseActMAC;
SRV: $leaseServerName;" subject="Free Wi-Fi Connection"
}
}
}