aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-09-23 15:07:30 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-09-25 22:10:05 +0200
commiteccc187014da0ee71bdfc94bfc105e6d4b4524ed (patch)
treea2836d3b3cd4a002e92e1bf5e748be805de8c35e /doc
parent562c565fcf10fff454e82bd3eb718f6b4cbc5a1d (diff)
introduce 'mod/notification-email', split off from global-functionschange-84
Diffstat (limited to 'doc')
-rw-r--r--doc/backup-cloud.md3
-rw-r--r--doc/backup-email.md10
-rw-r--r--doc/backup-upload.md3
-rw-r--r--doc/check-certificates.md9
-rw-r--r--doc/check-health.md3
-rw-r--r--doc/check-lte-firmware-upgrade.md3
-rw-r--r--doc/check-routeros-update.md3
-rw-r--r--doc/collect-wireless-mac.md3
-rw-r--r--doc/daily-psk.md3
-rw-r--r--doc/log-forward.md3
-rw-r--r--doc/mod/notification-email.md63
-rw-r--r--doc/mod/notification-matrix.md1
-rw-r--r--doc/mod/notification-telegram.md1
-rw-r--r--doc/netwatch-notify.md3
-rw-r--r--doc/sms-forward.md7
15 files changed, 98 insertions, 20 deletions
diff --git a/doc/backup-cloud.md b/doc/backup-cloud.md
index b0dc3ef..130e3f6 100644
--- a/doc/backup-cloud.md
+++ b/doc/backup-cloud.md
@@ -36,7 +36,8 @@ The configuration goes to `global-config-overlay`, these are the parameters:
* `BackupPassword`: password to encrypt the backup with
* `BackupRandomDelay`: delay up to amount of seconds when run from scheduler
-Also notification settings are required for e-mail,
+Also notification settings are required for
+[e-mail](mod/notification-email.md),
[matrix](mod/notification-matrix.md) and/or
[telegram](mod/notification-telegram.md).
diff --git a/doc/backup-email.md b/doc/backup-email.md
index e04a988..ab2b9b5 100644
--- a/doc/backup-email.md
+++ b/doc/backup-email.md
@@ -15,9 +15,12 @@ configuration export (`/export terse show-sensitive`) via e-mail.
Requirements and installation
-----------------------------
-Just install the script:
+Just install the script and the required module:
- $ScriptInstallUpdate backup-email;
+ $ScriptInstallUpdate mod/notification-email,backup-email;
+
+Also make sure you configure
+[sending notifications via e-mail](mod/notification-email.md).
Configuration
-------------
@@ -29,8 +32,6 @@ The configuration goes to `global-config-overlay`, these are the parameters:
* `BackupPassword`: password to encrypt the backup with
* `BackupRandomDelay`: delay up to amount of seconds when run from scheduler
-Also valid e-mail settings are required to send mails.
-
Usage and invocation
--------------------
@@ -47,6 +48,7 @@ See also
* [Upload backup to Mikrotik cloud](backup-cloud.md)
* [Save configuration to fallback partition](doc/backup-partition.md)
+* [Send notifications via e-mail](mod/notification-email.md)
* [Upload backup to server](backup-upload.md)
---
diff --git a/doc/backup-upload.md b/doc/backup-upload.md
index 58c1e56..34df1c6 100644
--- a/doc/backup-upload.md
+++ b/doc/backup-upload.md
@@ -41,7 +41,8 @@ The configuration goes to `global-config-overlay`, these are the parameters:
* `BackupUploadUser`: username for server authentication
* `BackupUploadPass`: password for server authentication
-Also notification settings are required for e-mail,
+Also notification settings are required for
+[e-mail](mod/notification-email.md),
[matrix](mod/notification-matrix.md) and/or
[telegram](mod/notification-telegram.md).
diff --git a/doc/check-certificates.md b/doc/check-certificates.md
index f8a4eae..5198e52 100644
--- a/doc/check-certificates.md
+++ b/doc/check-certificates.md
@@ -26,10 +26,6 @@ Just install the script:
Configuration
-------------
-The expiry notifications just require notification settings for e-mail,
-[matrix](mod/notification-matrix.md) and/or
-[telegram](mod/notification-telegram.md).
-
For automatic download and renewal of certificates you need configuration
in `global-config-overlay`, these are the parameters:
@@ -39,6 +35,11 @@ in `global-config-overlay`, these are the parameters:
Certificates on the web server should be named `CN.pem` (`PEM` format) or
`CN.p12` (`PKCS#12` format).
+Also notification settings are required for
+[e-mail](mod/notification-email.md),
+[matrix](mod/notification-matrix.md) and/or
+[telegram](mod/notification-telegram.md).
+
Usage and invocation
--------------------
diff --git a/doc/check-health.md b/doc/check-health.md
index 52efa4c..9ee16bb 100644
--- a/doc/check-health.md
+++ b/doc/check-health.md
@@ -56,7 +56,8 @@ The configuration goes to `global-config-overlay`, these are the parameters:
* `CheckHealthVoltageLow`: value (in volt*10) giving a hard lower limit
* `CheckHealthVoltagePercent`: percentage value to trigger voltage jumps
-Also notification settings are required for e-mail,
+Also notification settings are required for
+[e-mail](mod/notification-email.md),
[matrix](mod/notification-matrix.md) and/or
[telegram](mod/notification-telegram.md).
diff --git a/doc/check-lte-firmware-upgrade.md b/doc/check-lte-firmware-upgrade.md
index 6550734..f3b3bfc 100644
--- a/doc/check-lte-firmware-upgrade.md
+++ b/doc/check-lte-firmware-upgrade.md
@@ -35,7 +35,8 @@ Just install the script:
Configuration
-------------
-Notification setting are required for e-mail,
+Also notification settings are required for
+[e-mail](mod/notification-email.md),
[matrix](mod/notification-matrix.md) and/or
[telegram](mod/notification-telegram.md).
diff --git a/doc/check-routeros-update.md b/doc/check-routeros-update.md
index f43cec9..edffcbb 100644
--- a/doc/check-routeros-update.md
+++ b/doc/check-routeros-update.md
@@ -56,7 +56,8 @@ safe versions from a web server. The configuration goes to
* `SafeUpdateUrl`: url to check for safe update, the channel (`long-term`,
`stable` or `testing`) is appended
-Also notification settings are required for e-mail,
+Also notification settings are required for
+[e-mail](mod/notification-email.md),
[matrix](mod/notification-matrix.md) and/or
[telegram](mod/notification-telegram.md).
diff --git a/doc/collect-wireless-mac.md b/doc/collect-wireless-mac.md
index afdf73a..e6ef990 100644
--- a/doc/collect-wireless-mac.md
+++ b/doc/collect-wireless-mac.md
@@ -40,7 +40,8 @@ On first run a disabled access list entry acting as marker (with comment
"`--- collected above ---`") is added. Move this entry to define where new
entries are to be added.
-Also notification settings are required for e-mail,
+Also notification settings are required for
+[e-mail](mod/notification-email.md),
[matrix](mod/notification-matrix.md) and/or
[telegram](mod/notification-telegram.md).
diff --git a/doc/daily-psk.md b/doc/daily-psk.md
index e27c2c9..62c26ee 100644
--- a/doc/daily-psk.md
+++ b/doc/daily-psk.md
@@ -51,7 +51,8 @@ Then add an access list entry:
/interface/wireless/access-list/add comment="Daily PSK" interface=wl-daily private-pre-shared-key="ToBeChangedDaily";
-Also notification settings are required for e-mail,
+Also notification settings are required for
+[e-mail](mod/notification-email.md),
[matrix](mod/notification-matrix.md) and/or
[telegram](mod/notification-telegram.md).
diff --git a/doc/log-forward.md b/doc/log-forward.md
index c91f09a..40a4135 100644
--- a/doc/log-forward.md
+++ b/doc/log-forward.md
@@ -46,7 +46,8 @@ The configuration goes to `global-config-overlay`, these are the parameters:
* `LogForwardIncludeMessage`: define message text to be forwarded (even if
filter matches)
-Also notification settings are required for e-mail,
+Also notification settings are required for
+[e-mail](mod/notification-email.md),
[matrix](mod/notification-matrix.md) and/or
[telegram](mod/notification-telegram.md).
diff --git a/doc/mod/notification-email.md b/doc/mod/notification-email.md
new file mode 100644
index 0000000..4e0ba04
--- /dev/null
+++ b/doc/mod/notification-email.md
@@ -0,0 +1,63 @@
+Send notifications via e-mail
+=============================
+
+[◀ Go back to main README](../../README.md)
+
+> ℹ️️ **Info**: This module can not be used on its own but requires the base
+> installation. See [main README](../../README.md) for details.
+
+Description
+-----------
+
+This module adds support for sending notifications via e-mail. A queue is
+used to make sure notifications are not lost on failure but sent later.
+
+Requirements and installation
+-----------------------------
+
+Just install the module:
+
+ $ScriptInstallUpdate mod/notification-email;
+
+Also you need a valid e-mail account with smtp login credentials.
+
+Configuration
+-------------
+
+Set up your device's
+[e-mail settings](https://wiki.mikrotik.com/wiki/Manual:Tools/email).
+
+Then edit `global-config-overlay`, add `EmailGeneralTo` with a valid
+recipient address. Finally reload the configuration.
+
+### Sending to several recipients
+
+Sending notifications to several recipients is possible as well. Add
+`EmailGeneralCc` on top, which can have a single mail address or a comma
+separated list.
+
+Usage and invocation
+--------------------
+
+There's nothing special to do. Every script or function sending a notification
+will now send it to your e-mail account.
+
+But of course you can send notifications directly or use a function in your
+own scripts. Give it a try:
+
+ $SendEMail "Subject..." "Body..."
+
+Alternatively this sends a notification with all available and configured
+methods:
+
+ $SendNotification "Subject..." "Body..."
+
+See also
+--------
+
+* [Send notifications via Matrix](notification-matrix.md)
+* [Send notifications via Telegram](notification-telegram.md)
+
+---
+[◀ Go back to main README](../../README.md)
+[▲ Go back to top](#top)
diff --git a/doc/mod/notification-matrix.md b/doc/mod/notification-matrix.md
index c5003e0..b1f520e 100644
--- a/doc/mod/notification-matrix.md
+++ b/doc/mod/notification-matrix.md
@@ -103,6 +103,7 @@ methods:
See also
--------
+* [Send notifications via e-mail](notification-email.md)
* [Send notifications via Telegram](notification-telegram.md)
---
diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md
index 3bb31a7..2b1abe9 100644
--- a/doc/mod/notification-telegram.md
+++ b/doc/mod/notification-telegram.md
@@ -66,6 +66,7 @@ methods:
See also
--------
+* [Send notifications via e-mail](notification-email.md)
* [Send notifications via Matrix](notification-matrix.md)
---
diff --git a/doc/netwatch-notify.md b/doc/netwatch-notify.md
index 1352495..032106a 100644
--- a/doc/netwatch-notify.md
+++ b/doc/netwatch-notify.md
@@ -88,7 +88,8 @@ powered off, but accessibility is of interest.
Go and get your coffee ☕️ before sending the print job.
-Also notification settings are required for e-mail,
+Also notification settings are required for
+[e-mail](mod/notification-email.md),
[matrix](mod/notification-matrix.md) and/or
[telegram](mod/notification-telegram.md).
diff --git a/doc/sms-forward.md b/doc/sms-forward.md
index 80cb7ad..f75b78f 100644
--- a/doc/sms-forward.md
+++ b/doc/sms-forward.md
@@ -31,10 +31,11 @@ Just install the script:
Configuration
-------------
-Notification settings are required for e-mail,
+Notification settings are required for
+[e-mail](mod/notification-email.md),
[matrix](mod/notification-matrix.md) and/or
-[telegram](mod/notification-telegram.md). Also you have to enable receiving
-of SMS:
+[telegram](mod/notification-telegram.md).
+Also you have to enable receiving of SMS:
/tool/sms/set receive-enabled=yes;