ดาวไม่ได้ใช้งานดาวไม่ได้ใช้งานดาวไม่ได้ใช้งานดาวไม่ได้ใช้งานดาวไม่ได้ใช้งาน
 

##########   Static DNS SMTP Every 10 min ##########
:log info "Updating SMTP Address"

:local latestsmtp
:set latestsmtp [:resolve smtp.YOURUPSTREAMISP.com]
:log error "Latest SMTP Address is :$latestsmtp"
:local testingsmtp

/ip dns static
#:log info "Latest SMTP Server Address is: $latestsmtp"

# Starting Loop Below:

:foreach i

# Add your local static DNS entries below:
in=smtp.itblanket.net,smtp.saix.net,smtp.afrihost.co.za,smtp.afrihost.com do={

:set testingsmtp $i

#:log info "Testing this SMTP: $testingsmtp"
:if ([:len [/ip dns static find name=$testingsmtp]] >0 ) do={

#:log info "Entry exists, updating DNS"
/ip dns static set [find name=$testingsmtp] address=$latestsmtp ttl=600 ;

} else={
#:log info "Entry does not exist, creating the entry"
/ip dns static add name=$testingsmtp address=$latestsmtp ttl=600 ;

};



}
#Loop ends above


#:log info "Latest SMTP: $latestsmtp"
:log info "Static SMTP DNS has been updated"


##########    END   ##########