Mikrotik-RouterOS-automatic-backup-and-update
Mikrotik-RouterOS-automatic-backup-and-update copied to clipboard
Script error at email check for RouterOS 7.12.1
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
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
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.");
#};
I checked several times, everything seems to work correctly.