mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
email-backup: no more than one dot in file name
Looks like some providers do not allow more than one dot in attachment's file name to mitigate something like `holiday.png.exe`. Let's just replace dots with underscores. Fixes #2 Reported-by: @Kampfwurst
This commit is contained in:
parent
e309dee3b1
commit
431a4c8176
1 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,8 @@
|
||||||
:global BackupSendExport;
|
:global BackupSendExport;
|
||||||
:global BackupPassword;
|
:global BackupPassword;
|
||||||
|
|
||||||
|
:global CharacterReplace;
|
||||||
|
|
||||||
:if ($BackupSendBinary != true && \
|
:if ($BackupSendBinary != true && \
|
||||||
$BackupSendExport != true) do={
|
$BackupSendExport != true) do={
|
||||||
:log error ("Configured to send neither backup nor config export.");
|
:log error ("Configured to send neither backup nor config export.");
|
||||||
|
@ -19,7 +21,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
# filename based on identity
|
# filename based on identity
|
||||||
:local FileName ($Identity . "." . $Domain);
|
:local FileName [ $CharacterReplace ($Identity . "." . $Domain) "." "_" ];
|
||||||
:local BackupFile "none";
|
:local BackupFile "none";
|
||||||
:local ConfigFile "none";
|
:local ConfigFile "none";
|
||||||
:local Attach [ :toarray "" ];
|
:local Attach [ :toarray "" ];
|
||||||
|
|
Loading…
Reference in a new issue