Community discussions

MikroTik App
 
novelty22
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Fri Feb 12, 2010 1:57 pm

e-mail /export script not working since upgrade to 6.40.8

Thu Aug 30, 2018 3:23 pm

Hi,

In all of our customer routers we have scheduled backup scripts that e-mail an /export every X days.
Since the upgrade to 6.40.8 these are no longer working. I get an error about the filename. Email from the router is working otherwise

Here's the export of the script in question
/system script
add name="Create Export and Email" owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive source="/e\
    xport file=Customer-Lastname,Firstname\r\
    \n/tool e-mail send to=\"customer_tik@ourdomain.net\" subject=([/system identity get name] . \" Reload Scripts\") file=Cus\
    tomer-Lastname,Firstname.rsc\r\
    \n"
When i run it from the terminal
/export file=Customer-Lastname,Firstname
/tool e-mail send to="customer_tik@ourdomain.net" subject=([/system identity get name] . " Reload Scripts") file=Customer-Lastname,Firstname.rsc
I get the following
ambiguous value of file, more than one possible value matches input
Even if it's the only file present on the router

With quotes around the filename I get
/tool e-mail send to="customer_tik@ourdomain.net" subject=([/system identity get name] . " Rel
oad Scripts") file="Customer-Lastname,Firstname.rsc" 
input does not match any value of file
If i downgrade back to 6.93.3 it works as expected.

Does anyone else have this issue and what can be done to remedy besides downgrading?
 
sid5632
Long time Member
Long time Member
Posts: 554
Joined: Fri Feb 17, 2017 6:05 pm

Re: e-mail /export script not working since upgrade to 6.40.8

Thu Aug 30, 2018 3:38 pm

Try:
file="\"Customer-Lastname,Firstname.rsc\""
on the "/tool e-mail" command.
 
novelty22
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Fri Feb 12, 2010 1:57 pm

Re: e-mail /export script not working since upgrade to 6.40.8

Thu Aug 30, 2018 3:45 pm

Thanks!

That actually worked

Why would they change this?

I have over 1000 routers that are now no longer backing up and since all of the customer names are different it this will be a challenge to correct.

Is this change maybe reverted in a later version?
 
sid5632
Long time Member
Long time Member
Posts: 554
Joined: Fri Feb 17, 2017 6:05 pm

Re: e-mail /export script not working since upgrade to 6.40.8

Thu Aug 30, 2018 3:49 pm

Is this change maybe reverted in a later version?
Apparently not. It's still the same on 6.43rc56

The best thing is not to use a comma in the file name in the first place. Use a '-' or a '_' character, or similar.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: e-mail /export script not working since upgrade to 6.40.8

Thu Aug 30, 2018 4:05 pm

e-mail tool for quite some time now support multiple file upload (files separated by comma). So it is obvious why your code does not work.

Do not use special synbos in filenames and variable names. Always use quotes for strings and you will not have problems.

Who is online

Users browsing this forum: No registered users and 73 guests