mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-05-12 14:51:29 +00:00
mod/notification-email: add setting for certificate verification
This commit is contained in:
parent
f5dbc27a01
commit
1f460b5bae
5 changed files with 17 additions and 2 deletions
|
|
@ -37,7 +37,9 @@
|
|||
# flush e-mail queue
|
||||
:set FlushEmailQueue do={ :onerror Err {
|
||||
:global EmailQueue;
|
||||
:global EmailServerCertificate;
|
||||
|
||||
:global CertificateAvailable;
|
||||
:global EitherOr;
|
||||
:global EMailGenerateFrom;
|
||||
:global FileExists;
|
||||
|
|
@ -90,6 +92,14 @@
|
|||
:return false;
|
||||
}
|
||||
|
||||
:if (([ /tool/e-mail/get ]->"certificate-verification") ~ "^yes" && \
|
||||
[ :len $EmailServerCertificate ] > 0) do={
|
||||
:if ([ $CertificateAvailable $EmailServerCertificate "email" ] = false) do={
|
||||
$LogPrint warning $0 ("Downloading required certificate failed.");
|
||||
:return false;
|
||||
}
|
||||
}
|
||||
|
||||
/system/scheduler/set interval=($QueueLen . "m") comment="Sending..." \
|
||||
[ find where name="_FlushEmailQueue" ];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue