Notification Settings (notifications.toml)

By default, the notification settings are located here:

/etc/kor-elf-shield/notifications.toml

The path to these settings can be changed in the main settings and can be found here (parameter notifications).

A copy of the full settings file is here.

There are several sections in this file:


Basic settings

These settings should be located at the beginning of the file before the sections: "Configuring the client's e-mail"

Parameter enabled
Meaning true or false
By default false
Description Enables or disables notifications.
true  - includes
false - turns it off
Examples
enabled = true
enabled = false
***
Parameter enable_retries
Meaning true or false
By default true
Description Enables repeated attempts to send a notification if it failed immediately.
true  - includes
false - turns it off
Examples
enable_retries = true
enable_retries = false
***
Parameter retry_interval
Meaning From 1
By default 600
Description The time interval in seconds between attempts.
Examples
retry_interval = 600
retry_interval = 3600
***
Parameter server_name
Meaning The following characters are allowed: a-z, A-Z, ., -, _
By default server
Description The name of the server in the notifications.
Examples
server_name = "server"
server_name = "my_new_server"

Configuring the client's e-mail

Specify the parameters for this section first [email], and then specify the other parameters of this section. Example:

[email]
host = "smtp.gmail.com"
port = 587
auth_type = "PLAIN"
Parameter host
Meaning Domain or IP from the e-mail server
By default  
Description The server through which the mail will be sent.
Examples
host = "smtp.gmail.com"
Parameter port
Meaning The port from the e-mail server
By default  
Description Specify the server port through which the mail will be sent.
Examples
port = 587
port = 465
Parameter username
Meaning Login from the e-mail server
By default  
Description Login to the server through which the mail will be sent.
Examples
username = "username@gmail.com"
username = "username"
Parameter password
Meaning The password from the e-mail server
By default  
Description The password to the server through which the mail will be sent.
Examples
password = "my@password"
password = "123456"
Parameter auth_type
Meaning Options: "PLAIN", "LOGIN", "CRAM-MD5", "NONE"
By default PLAIN
Description The type of authorization. Usually used "PLAIN". If you have an internal relay without a password, use "NONE"it.
Examples
auth_type = "PLAIN"
auth_type = "CRAM-MD5"
Parameter tls_mode
Meaning Options: "NONE", "STARTTLS", "IMPLICIT"
By default STARTTLS
Description Secure connection.

"NONE" — without TLS
"STARTTLS" — regular SMTP on 587 (or 25) + upgrade via STARTTLS
"IMPLICIT" SMTPS (TLS immediately), usually 465
Examples
tls_mode = "STARTTLS"
tls_mode = "NONE"
Parameter tls_policy
Meaning Options: "MANDATORY", "OPPORTUNISTIC"
By default MANDATORY
Description Only if the type of secure connection is in the mode STARTTLS.

"MANDATORY" — if STARTTLS unavailable/failed, an error will be triggered
"OPPORTUNISTIC" — try STARTTLS, but if it is impossible, then he will try to send without TLS
Examples
tls_policy = "MANDATORY"
tls_policy = "OPPORTUNISTIC"
Parameter tls_verify
Meaning true or false
By default true
Description Whether to check the secure connection certificate.
true  - includes
false - turns it off
Examples
tls_verify = true
tls_verify = true
Parameter from
Meaning E-mail address
By default  
Description The e-mail address that will be specified when sending the mail.
Examples
from = "test@localhost"
from = "username@gmail.com"
Parameter to
Meaning E-mail address
By default  
Description The E-mail address to which the notifications will be sent.
Examples
to = "test@localhost"
to = "any@localhost"
to = "username@gmail.com"