So now we have the availability to set username and password for an STMP server or to log into our Gmail account to send mail via our Routers? -Jordan B
I have been using backup scripts very successfully through Gmail Apps on my own domain for sometime. 3.22 worked perfect and I could almost do no wrong. Then I upgraded to 3.30. After spending a good 5 hours of time, I have come to the conclusion that 3.30 does not work for Gmail, period.
Now, 3.22 still works perfectly. But, I don’t want to switch back to because of licensing issues. That 7 digit / 8 digit license problem for downgrading is dangerous. And, all current versions from 4 up have more bugs than I can deal with at this time as well.
Any ideas
Ok, here is my full script for doing both binary (full backups) and exports. I like to do both. This also includes the scheduler. It works perfect and is plug in play less changing a few basic things.
/system script add name=ebackup source={/system backup save \
name=([/system identity get name] . "-" . \
[:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . \
[:pick [/system clock get date] 4 6]); :delay 10; \
/tool e-mail send to="youremail@gmail.com" \
subject=([/system identity get name] . " Backup " . \
[/system clock get date]) file=([/system identity get name] . "-" . \
[:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . \
[:pick [/system clock get date] 4 6] . ".backup"); :delay 10; \
/file rem [/file find name=([/system identity get name] . "-" . \
[:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . \
[:pick [/system clock get date] 4 6] . ".backup")]; \
:log info ("System Binary Backup emailed at " . [/sys cl get time] . " " . [/sys cl get date])}
/system script add name=eexport source={/export file=([/system identity get name] . "--" . \
[:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . \
[:pick [/system clock get date] 4 6]); :delay 10; \
/tool e-mail send to="youremail@gmail.com" \
subject=([/system identity get name] . " Export " . \
[/system clock get date]) file=([/system identity get name] . "--" . \
[:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . \
[:pick [/system clock get date] 4 6] . ".rsc"); :delay 10; \
/file rem [/file find name=([/system identity get name] . "--" . \
[:pick [/system clock get date] 7 11] . [:pick [/system clock get date] 0 3] . \
[:pick [/system clock get date] 4 6] . ".rsc")]; \
:log info ("System Export Backup emailed at " . [/sys cl get time] . " " . [/sys cl get date])}
/system scheduler
add name="email-backup" on-event=ebackup \
start-date=sep/12/2009 start-time=00:36:00 \
interval=1d comment="Daily Backups" disabled=no
add name="email-export" on-event=eexport \
start-date=sep/12/2009 start-time=00:38:00 \
interval=1d comment="Daily Export" disabled=no
Now, I use the free Google Apps that allows backups to our own domain email addresses, but it makes no difference.
Mods you must make:
Change the email address
Configure in Winbox Tools>email
Server: 74.125.45.109
Port: 587
From: just a single word, not email address. This is really important otherwise Auth problems.
User: youremail@gmail.com
Pass: I think you got that one.
Adjust the time start time on the scheduler. Don’t run them at exactly the same time. Put a few minutes in between.
This backup script and scheduler works perfect on 9 AP’s on three different subnets.
Hope that helps
Note: Copy the code, make the changes mentioned, and paste it into a terminal window, that’s it.
I’m sure everything is set OK - but I still get AUTH failed - anyone can help me with this?
UPDATE:
it’s difficult for me to believe it, but I checked and found out that, on mipsbe architecture (ROS 3.30) sending emails to gmail DOESNT work - u get AUTH failed ERROR. However on x86 architecture ROS 3.30 device - everything works fine!!!
Anyone can verify that???
UPDATE 2:
the above problem seems to be limited to RB411A and RB433AH (both running ROS 3.30)
I can’t say thanks enough MT other than I wish the changes made were better documented pertaining to the usage of the e-mail tool.
For those of you that have taken the chance to move on to 4.6 (We have on 4% of our network) you might run across more issues trying to use scripts that include the use of the e-mail tool. I have got probably 20 combined hours over the last two years trying to make these scripts work when OS versions change. Since 3.22, I have ran into multiple problems.
One key problem was to use Winbox > Tools> e-mail. Why? Because I found in some versions you have to put info in there and others you don’t. Plus, there were bugs in the field entries that made it almost impossible to use. Space, no space, @ no @, etc. I could be wrong on all of this but some of you have probably had the same problems.
Guess what, Gmail, and MT 4.6 get along once again like they did with 3.22. Here is what I just found a few minutes ago.
First set the Winbox > Tools> e-mail properties to default.
Server 0.0.0.0
All other fields blank. Yes blank.
Here is the code if you want to do it from a terminal:
/tool e-mail
set from="" password="" server="0.0.0.0:0" username=""
Now open a terminal window wide enough to paste in this code/script. (you might have it open already)
Make sure you put your password, send to email address, from address is not important, your password, and user.