Mikrotik-RouterOS-automatic-backup-and-update icon indicating copy to clipboard operation
Mikrotik-RouterOS-automatic-backup-and-update copied to clipboard

Script error at email check for RouterOS 7.12.1

Open AndresCampus opened this issue 1 year ago • 5 comments
trafficstars

I get an error after RouterOS update in section: #Check proper email config The expression [/tool e-mail get address] is not valid because of the "address" value Look like is not longer valid value in that context. I changed to "user", but I am not sure if the meaning of values are similar. Current RouterOS: 7.12.1 Thank you

AndresCampus avatar Jan 03 '24 01:01 AndresCampus

Looks like "address" was the IP address (of server?), but I can not find "address" anymore inside /tool/e-mail. BTW, there is a "last-address" value. I don't know if they are the same thing. Maybe is better to check if "server" is set. My script copy is working again after solving the issue by changing that value with a valid one

AndresCampus avatar Jan 03 '24 01:01 AndresCampus

Hi - The script stopped working when trying to validate the below parts. I just disabled for now to fix. -##

#Script messages prefix :local SMP "Bkp&Upd:"

:log info "\r\n$SMP script "Mikrotik RouterOS automatic backup & update" started."; :log info "$SMP Script Mode: $scriptMode, forceBackup: $forceBackup";

#Check proper email config #:if ([:len $emailAddress] = 0 or [:len [/tool e-mail get address]] = 0 or [:len [/tool e-mail get from]] = 0) do={

:log error ("$SMP Email configuration is not correct, please check Tools -> Email. Script stopped.");

:error "$SMP bye!";

#}

#Check if proper identity name is set #if ([:len [/system identity get name]] = 0 or [/system identity get name] = "MikroTik") do={

:log warning ("$SMP Please set identity name of your device (System -> Identity), keep it short and #informative.");

#};

stefan-b-b avatar Jan 07 '24 06:01 stefan-b-b

I checked several times, everything seems to work correctly.

beeyev avatar Apr 01 '24 10:04 beeyev