Comments (14)
I have never seen this myself. This must be device or configuration specific. Is there anything bogus with identity name, board and model name or serial number?
You could try to edit the script and comment the lines with extra information to find the causing value.
from routeros-scripts.
Hi, The causing value is the file backup file.
If i remove the line " file=$Attach;" in tool e-mail then the script runs fine without backup file ;-(
The name config file name is "MikroTik.example.com.rsc" so this should be fine.
The board is a RB433.
Hostname: MikroTik
Channel: long-term
RouterOS: 6.44.5
from routeros-scripts.
You have the default configuration for backup?
:global BackupSendBinary false;
:global BackupSendExport true;
Does it help if you replace file=$Attach
with file=[ :tostr $Attach ]
?
from routeros-scripts.
Yes I use the default configuration.
:global BackupSendBinary false;
:global BackupSendExport true;
# send email with status and files / tool e-mail send to=$EmailBackupTo cc=$EmailBackupCc \ subject=("[" . $Identity . "] Backup & Config") \ body=("Backup and config export for " . $Identity . ".\n\n" . \ "Board name: " . $BoardName . "\n" . \ "Model: " . $Model . "\n" . \ "Serial number: " . $SerialNumber . "\n" . \ "Hostname: " . $Identity . "\n" . \ "Channel: " . $Channel . "\n" . \ "RouterOS: " . $InstalledVersion . "\n\n" . \ "Backup file: " . $BackupFile . "\n" . \ "Config file: " . $ConfigFile) \ file=[ :tostr $Attach ]; }
still the same error.
from routeros-scripts.
Does your device's identity contain bogus (possibly invisible) characters? Run...
:global Identity "test";
... then try again.
from routeros-scripts.
still the same.
I testet it also on a rb1100ahx2. also the same problem. I thought that the backup is taking to long. So I tried it on the rb1100 ,-)
from routeros-scripts.
The device performance is not relevant, I am using this on RB751 with 400 MHz CPU...
Would you mind sending me a mail without backup and copy? Edit the script, remove the line with file=
, then run...
:global EmailBackupCc "[email protected]";
... and run the script. Do not forget to revert the change for EmailBackupCc
.
from routeros-scripts.
Well, wondering if your SMTP server is the problem... Can you configure an account from a different SMTP server?
from routeros-scripts.
If i use my server i get the ":invalid BODY" error.
I try the google server also. I can send over the google server a testmail from Tools/Email
If i try to execute the script i get the error "error talking to server"
from routeros-scripts.
I received two mails from two different addresses.
I guess both servers do not like mails from RouterOS devices when attachments are included... You could enable logging and see if anything useful pops up there:
/system logging add topics=e-mail;
Also if one of the servers is yours... Have a look at the MTA's logs.
Anyway... I think this is out of scope for my scripts. Looks like the issue is how RouterOS assebles the attachment into the mail.
from routeros-scripts.
very strange. This script is working from the same RB with the server. Also with the attachment
:log info "Starting Backup Script..." :global backupfile ([/system identity get name] . ".rsc") :if ([/file find name=$backupfile] != "") do={/file rem $backupfile} :delay 2s /export file=$backupfile :log info "Waiting 5s for backup to complete..." :delay 5s :log info "Backup being emailed..." /tool e-mail send to="[email protected]" subject=([/system identity get name] . " Backup") [email protected] file=$backupfile server=testsmtp.de :log info "Finished Backup Script!"
from routeros-scripts.
Really strange... Is it possible that the file name confuses the servers? Possibly too many dots? Replace the line for file name with just:
:local FileName $Identity;
... and try again.
from routeros-scripts.
Ok now its working fine. It seems that "mikrotik" has a problem with the dots
from routeros-scripts.
No, it's you provider that has problems with dots. ;)
Imaging someone sends emails with a file with name holiday.png.exe
, stupid mail clients strip the file extension. How many people will click it? Looks like providers try to mitigate by denying attachments with more than one dot in file name.
from routeros-scripts.
Related Issues (20)
- Expect to have exponentiation and file movement capabilities. HOT 3
- Foreign scripts & modules HOT 4
- Warning sign with Telegram HOT 1
- Dhcp2dns HOT 10
- Script syntax broken. not compatible with ROS v6.49.7 HOT 1
- Feature Request: dhcp-to-dns - use Access List comment and/or ignore if already in DNS HOT 10
- Feature Request: dhcp-to-dns - use domain from networks HOT 3
- SendTelegram can't be called inside the script HOT 3
- Manage system update - schedule reboot at night no longer working HOT 8
- dhcp-to-dns crashes with IP pool instead of address HOT 5
- DNS records for Openvpn pears HOT 3
- Allow to customize certificate name HOT 11
- DHCP-to-DNS script IPv6 support HOT 5
- DHCP-to-DNS script does not differentiate same MAC addresses on different network domains HOT 4
- 64k limit problem for "tool fetch url" HOT 1
- $ScriptInstallUpdate: Policies differ for script 'global-functions' and its scheduler 'global-scripts'! HOT 1
- netwatch + sendNotification HOT 2
- Add html support to notification telegram HOT 1
- log-forwarding: non expected messages are still forwarded HOT 2
- check-routeros-update and other similar scripts suggested scheduler time HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from routeros-scripts.