Mail Server

Set up mail server

If you customize a configuration file on the application server, you must always run setup.sh afterwards. Only then will the settings be applied.

1. Open the configuration file in an editor of your choice, for example nano.

nano /opt/enginsight/enterprise/conf/services/config.json

2. In the E-mail section, enter the data of your mail server.

 "email": {
    "sender": "'Firma' <firma@domain.com>",
    "host": "...",
    "port": "...",
    "sslTls": true,
    "user": "...",
    "pass": "...",
    "maxConnections": 2,
    "rateDelta": 1000,
    "rateLimit": 1
  },

In some cases, a configuration different from the default is required, for example for an Office365-mailserver or for a mail server without TLS.

Your configuration will then look like this, for example:

Office365:

"email":{
  "sender": "'Firma' <firma@domain.com>",
  "unqueued": true,
  "host": "smtp.office365.com",
  "requireTLS": false, 
  "ignoreTLS": false, 
  "rejectUnauthorized": false, 
  "secure": false, 
  "sslTls": false,
  "port": 587,
  "user": "...",
  "pass": "...",
  "maxConnections": 2,
  "rateDelta": 1000,
  "rateLimit": 1,
  "service": "Outlook365"
} 

Local Exchange Server:

"email":{
  "sender": "'Firma' <firma@domain.com>",
  "unqueued": true,
  "host": "...",
  "requireTLS": false, 
  "ignoreTLS": false, 
  "rejectUnauthorized": false, 
  "secure": false, 
  "sslTls": false,
  "port": 587,
  "user": "...",
  "pass": "...",
  "maxConnections": 2,
  "rateDelta": 1000,
  "rateLimit": 1
} 

Mailserver ohne TLS:

"email":{
  "sender": "'Firma' <firma@domain.com>",
  "unqueued": true,
  "host": "...",
  "requireTLS": false, 
  "ignoreTLS": true, 
  "rejectUnauthorized": false, 
  "secure": false, 
  "sslTls": false,
  "user": "...",
  "pass": "...",
  "maxConnections": 2,
  "rateDelta": 1000,
  "rateLimit": 1
}

3. Save the new configuration file (Ctrl+o) and confirm the saving process. Close nano (Ctrl+x).

If you have an SPF record set in your DNS configuration, adjust the sender accordingly.

4. Navigate to /opt/enginsight/enterprise

cd /opt/enginsight/enterprise

5. Restart the application.

./setup.sh

Test mail server

After you have set up your mail server, you can check if the configuration was successful in the console on the app server.

1. Use the following template:

docker run -it --rm -v "/opt/enginsight/enterprise/conf/services/config.json:/etc/enginsight/sentinel-m3/config.json" registry.enginsight.com/enginsight/sentinel-m3:X.X.X sendEmailTo your@mail.com

2. Change the version number of the Sentinel module 'X.X.X' to the version currently installed on your system. You can check this in the platform at Settings → On-Premises.

3. Replace your@mail.com with your e-mail address.

4. Run the command on the app server.

5. Evaluate the result. If the configuration is correct, you will receive the SMTP status code 250 at response as well as information about the sending process. If the test was not successful, you will receive a corresponding error as SMTP status code at response.

Example: Mail settings are correct

Example: Test not successful

Last updated