Make my script working

Hi
I am new in making mikrotik scripts and I’m having a problem. I want my mikrotik router to make backup file by himself and send it to my e-mail.I asked google to help me and find examples which makes someting similar to my needs on - http://wiki.mikrotik.com/wiki/Send_Backup_email/ but there are so many things that I’m not able to understand for example :

add name=“backup_mail” source=“system backup save name=email
\n/tool e-mail send
to="me@mydomaint.abc" from="someone@somewhere.abc" server="213.157.170.43" subject=([/system
identity get name] . " " . [/system clock get time] . " " . [/system clock get date] . "
Backup") file=email.backup” policy=ftp,reboot,read,write,policy,test

In part server which ip address I have to enter?

I have one more question. Where I can find howto for making scripts not just already written one.

Apologize for my not so fluent English… :laughing:

scripting manual:
http://www.mikrotik.com/testdocs/ros/2.9/system/scripting.php

here you can find a lot of examples to learn:
http://wiki.mikrotik.com/wiki/Scripts

also 2.8 manual has some examples, these scripts should work on 2.9 :
http://www.mikrotik.com/testdocs/ros/2.8/appex/scripting1.php

The ‘server’ part in the script is the IP of the SMTP server through wich you can send mail.

Regards
Leon

Is this mean that I have to add google mail SMTP and POP3 server and shoul it be a IP address?

Hi Gergana

You don’t need any POP3 settings for your script to work. You should use your upstream ISP’s SMTP server, and make sure your “from-address” is allowed by your ISP’s SMTP server.

Yes, you have to type in the IP address of that SMTP server.

If you want to use Google or Gmail’s SMTP server, it will not work, as GMail uses port 465 as outbound/SMTP, and needs a SSL connection.

You need a SMTP server wich doesn’t require authentication or anything fancy.

If you don’t have such a server to use, you should consider setting up 'n Linux based server, and configure it with Sendmail to deliver mail directly. There are also free Windows XP based SMTP clients you could use, but I do not advise them.

Hope the info was useful.