{
:local ip;
:foreach i in=[/ip address find] do={:set ip [/ip address get $i network];
:if ($ip = $mtuIp) do={:put “email”}
}
how can I compare $ip to each element (ip address) I have in “/ip firewall address-list”
{
:local ip;
:foreach i in=[/ip address find] do={:set ip [/ip address get $i network];
:if ($ip = $mtuIp) do={:put “email”}
}
how can I compare $ip to each element (ip address) I have in “/ip firewall address-list”
what is $mtuip?
$mtuIp = ip address in /ip firewall address-list
Like
:foreatch i in=[/ip firewall address-list [find list=“mtu”] do=
{:set mtuIp [/ip firewall address-list get $i address]}
like this?
{
:local ip
local mtuIp
:foreach i in=[/ip address find] do={:set ip [/ip address get $i network]
:foreach 0 in=[/ip firewall address-list find list="mtu"] do={
:set mtuIp [/ip firewall address-list get $0 address]
:if ($ip = $mtuIp) do={:put "email"}
}}}
yes ![]()
How can I now do
:if ($ip != $mtuIp)
I want have email sent only when /ip address is not equal with /ip firewall address-list
in /ip address is
ether1=172.16.10.10
ether1=172.16.10.11
ether1=172.16.10.12
ether1=172.16.10.13
in /ip firewall address-list is
mtu=172.16.10.11
mtu=172.16.10.13
email should send in case
ether1=172.16.10.10
ether1=172.16.10.12
if I do
:if ($ip != $mtuIp) do={:put “$ip not equal $mtuIp” :put “send email”}}}}
I have two email to eatch address
like this:
172.16.10.10 not equal 172.16.10.11 send email
172.16.10.10 not equal 172.16.10.13 send email
172.16.10.12 not equal 172.16.10.11 send email
172.16.10.12 not equal 172.16.10.13 send email
I want to have only one email from each ip address in /ip address exclusion /ip firewall address-list