Sorry for the bad script before, it does work against NON gmail for a
consulting client of mine.
This script is working to gmail from a mtik running 6.27:
/system script
add name=backup
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive
source=":global sysname [/system identity get name]\r\
\n:local datetime [/system clock get date]\r\
\n\r\
\n:log info \"\$datetime \$sysname Backup Started\";\r\
\n\r\
\n/export file=export.rsc\r\
\n/system backup save name=backup.backup dont-encrypt=yes\r\
\n\r\
\n:delay 20s\r\
\n\r\
\n/tool e-mail send to=\"[email protected]\" subject=\"company
Export \$sysname \$[/system clock get date]\" [email protected]
file=export.rsc start-tl\
s=yes \r\
\n\r\
\n:delay 20s\r\
\n\r\
\n/tool e-mail send to=\"[email protected]\" subject=\"company
Backup \$sysname \$[/system clock get date]\" [email protected]
file=backup.backup start\
-tls=yes \r\
\n\r\
\n:log info \"\$datetime \$sysname Backup Ended\";"
/tool e-mail
set address=74.125.25.16 [email protected] password=foobar port=\
587 [email protected]
ryan
On 4/17/15 12:10 PM, Josh Luthman wrote:
I was avoiding all that because imaginenetworksllc.com is hosted by Gmail.
I didn't want to deal with SMTP authentication to get it relayed, thought
that looks like my only solution at this point =/
Josh Luthman
Office: 937-552-2340
Direct: 937-552-2343
1100 Wayne St
Suite 1337
Troy, OH 45373
On Fri, Apr 17, 2015 at 3:06 PM, Grand Avenue Broadband <
[email protected]> wrote:
You don’t have to use the Gmail SMTP server just because your receiving
account is at Gmail. Gmail has a reputation for being extra-picky and not
working and playing well with many other systems. Is there a server you
can use that is associated with your hosting site at
imaginenetworksllc.com? Any SMTP server for which you have a password
will do.
On Apr 17, 2015, at 9:55 AM, Josh Luthman <[email protected]>
wrote:
invalid BODY with this one as well =( There's got to be something wrong
with the email functionality between Mikrotik and Gmail.
Josh Luthman
Office: 937-552-2340
Direct: 937-552-2343
1100 Wayne St
Suite 1337
Troy, OH 45373
On Fri, Apr 17, 2015 at 12:51 PM, Wayne Hancock <
[email protected]> wrote:
I use the following, is working well for me.
/tool e-mail
set address=XX.XX.XX.XX from=MikroTik<[email protected]>
last-status=succeeded
/system script
add name=auto-backup policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive \
source="# delete previous auto backup files\r\
\n#\r\
\n:foreach i in=[/file find] do={\r\
\n :local name [/file get \$i name]\r\
\n :if ([:pick \$name 0 12] = \"auto-backup.\") do={\r\
\n :log info \"Deleting file \$name\"\r\
\n /file remove \$i\r\
\n }\r\
\n }\r\
\n#\r\
\n# assemble current file name\r\
\n#\r\
\n:global curdt [/system clock get date]\r\
\n:global newdt (\"\$[:pick \$curdt 7 11]-\$[:pick \$curdt 0
3]-\$[:pick \
\$curdt 4 6]\")\r\
\n:global curtm [/system clock get time]\r\
\n:global newtm (\"\$[:pick \$curtm 0 2]\$[:pick \$curtm 3 5]\$[:pick
\$cu\
rtm 6 8]\")\r\
\n:global subject (\"of \$[/system identity get name] (\$[/system
routerbo\
ard get model])\")\r\
\n:global filename (\"auto-backup.\$[/system identity get
name].\$newdt-\$\
newtm\")\r\
\n#\r\
\n# do the backup\r\
\n#\r\
\n:log info \"Creating \$filename.rsc and \$filename.backup\"\r\
\n/export compact file=\$filename\r\
\n/system backup save name=\$filename\r\
\n:delay 15s\r\
\n/tool e-mail send file=\"\$filename.rsc\"
to=\"[email protected]\" body=\"Backup .RSC file
attached.\\n\\n\" subject=\"Auto-export \$subjec\
t\"\r\
\n:delay 15s\r\
\n/tool e-mail send file=\"\$filename.backup\" to=\"
[email protected] \" body=\"Backup Binary file
attached.\\n\\n\" subject=\"Auto-backup \$sub\
ject\"\r\
\n:log info \"Auto backup sent\""
/system schedule
add interval=3d12h name=backups on-event=auto-backup policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
start-date=jan/01/2014 start-time=12:00:00
-----Original Message-----
From: [email protected] [mailto:
[email protected]] On Behalf Of Josh Luthman
Sent: Friday, April 17, 2015 10:22 AM
To: Mikrotik discussions
Subject: Re: [Mikrotik] Emailing backup on v6
@Ryan same error for me =(
@hilton All my v3, v4, v5 routers don't have start-tls and yet they
work.
Not sure if it's maybe defaulted on them or even available.
invalid BODY error on all of these:
/tool e-mail send server=64.233.191.27
file=backup.backup to="[email protected]"
/tool e-mail send server=64.233.191.27
file=backup.backup to="[email protected]"
subject="nothing"
/tool e-mail send server=64.233.191.27
file=backup.backup to="[email protected]"
subject="nothing"
body="st
ill nothing"
Josh Luthman
Office: 937-552-2340
Direct: 937-552-2343
1100 Wayne St
Suite 1337
Troy, OH 45373
On Fri, Apr 17, 2015 at 4:16 AM, Hilton Ralphs <[email protected]>
wrote:
I always thought Gmail needed a secure connection to their SMTP
servers so I use this in addition to the normal email command;
'start-tls=yes'
However, I tried just using your command on version 6.27 and if I use
my work email address (which is not hosted at Google Apps) I get an
"invalid TO Address" error. If I use my home address which IS hosted
at Google Apps it works.
/tool e-mail send server=64.233.191.27 file=StCatherines.
rsc to="[email protected]" subject="nothing" body="still nothing"
-----Original Message-----
From: [email protected] [mailto:
[email protected]] On Behalf Of Josh Luthman
Sent: 17 April 2015 00:32
To: Mikrotik discussions
Subject: [Mikrotik] Emailing backup on v6
My backup script seems to not work on v6 anymore. I keep getting an
invalid BODY error. The server is just GMail's SMTP server (first MX
record).
It's nothing more than this:
/tool e-mail send server=64.233.191.27 file=backupfilehere.rsc to="
[email protected]" subject=([/system identity get name] . "
Backup") body="nothing here
Does anyone have a command that works on v6 (specifically 6.23+)
already so I don't have to research/test to find a working method?
Josh Luthman
Office: 937-552-2340
Direct: 937-552-2343
1100 Wayne St
Suite 1337
Troy, OH 45373
-------------- next part -------------- An HTML attachment was
scrubbed...
URL: <
http://mail.butchevans.com/pipermail/mikrotik/attachments/20150416/5b2
1e76f/attachment.html
_______________________________________________
Mikrotik mailing list
[email protected]
http://mail.butchevans.com/mailman/listinfo/mikrotik
Visit http://blog.butchevans.com/ for tutorials related to Mikrotik
RouterOS
_______________________________________________
Mikrotik mailing list
[email protected]
http://mail.butchevans.com/mailman/listinfo/mikrotik
Visit http://blog.butchevans.com/ for tutorials related to Mikrotik
RouterOS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://mail.butchevans.com/pipermail/mikrotik/attachments/20150417/de3d5570/attachment.html
_______________________________________________
Mikrotik mailing list
[email protected]
http://mail.butchevans.com/mailman/listinfo/mikrotik
Visit http://blog.butchevans.com/ for tutorials related to Mikrotik
RouterOS
_______________________________________________
Mikrotik mailing list
[email protected]
http://mail.butchevans.com/mailman/listinfo/mikrotik
Visit http://blog.butchevans.com/ for tutorials related to Mikrotik
RouterOS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://mail.butchevans.com/pipermail/mikrotik/attachments/20150417/8ef9c794/attachment.html
_______________________________________________
Mikrotik mailing list
[email protected]
http://mail.butchevans.com/mailman/listinfo/mikrotik
Visit http://blog.butchevans.com/ for tutorials related to Mikrotik
RouterOS
_______________________________________________
Mikrotik mailing list
[email protected]
http://mail.butchevans.com/mailman/listinfo/mikrotik
Visit http://blog.butchevans.com/ for tutorials related to Mikrotik
RouterOS
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.butchevans.com/pipermail/mikrotik/attachments/20150417/beed60a2/attachment.html>
_______________________________________________
Mikrotik mailing list
[email protected]
http://mail.butchevans.com/mailman/listinfo/mikrotik
Visit http://blog.butchevans.com/ for tutorials related to Mikrotik RouterOS
--
D. Ryan Spott | Iron Goat Networks, llc
broadband | telco | colo | community
PO Box 1232 / 603 W. Stevens Sultan, WA 98284
360-799-0552 | gtalk: [email protected]
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.butchevans.com/pipermail/mikrotik/attachments/20150418/c7bd575d/attachment.html>
_______________________________________________
Mikrotik mailing list
[email protected]
http://mail.butchevans.com/mailman/listinfo/mikrotik
Visit http://blog.butchevans.com/ for tutorials related to Mikrotik RouterOS