Mail Server

Set up mail server

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

    sudo nano /opt/enginsight/enterprise/conf/services/config.json
  2. In the E-mail section, enter the data of your mail server.

     "email": {
        "sender": "'Firma' <[email protected]>",
        "host": "...",
        "port": "...",
        "sslTls": true,
        "user": "...",
        "pass": "...",
        "maxConnections": 5,
        "rateDelta": 1000,
        "rateLimit": 5
      },

    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' <[email protected]>",
      "unqueued": true,
      "host": "smtp.office365.com",
      "requireTLS": false, 
      "ignoreTLS": false, 
      "rejectUnauthorized": false, 
      "secure": false, 
      "sslTls": false,
      "port": 587,
      "user": "...",
      "pass": "...",
      "maxConnections": 5,
      "rateDelta": 1000,
      "rateLimit": 5,
      "service": "Outlook365"
    }, 

    Local Exchange Server:

    "email":{
      "sender": "'Firma' <[email protected]>",
      "unqueued": true,
      "host": "...",
      "requireTLS": false, 
      "ignoreTLS": false, 
      "rejectUnauthorized": false, 
      "secure": false, 
      "sslTls": false,
      "port": 587,
      "user": "...",
      "pass": "...",
      "maxConnections": 5,
      "rateDelta": 1000,
      "rateLimit": 5
    }, 

    Mailserver ohne TLS:

    "email":{
      "sender": "'Firma' <[email protected]>",
      "unqueued": true,
      "host": "...",
      "requireTLS": false, 
      "ignoreTLS": true, 
      "rejectUnauthorized": false, 
      "secure": false, 
      "sslTls": false,
      "user": "...",
      "pass": "...",
      "maxConnections": 5,
      "rateDelta": 1000,
      "rateLimit": 5
    },

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.

sudo ./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, replace <SENTINEL_CONTAINER-ID> and <YOUR_EMAIL_ADDRESS> with the appropriate values, and then execute the command on the app server.

    sudo docker exec <SENTINEL_CONTAINER-ID> ./sendTestMail --to <YOUR_EMAIL_ADRESS>
  2. An email will then be sent automatically to Themis. If the mail server is configured correctly, the email will be delivered (see example below). If it is not delivered, please check Themis for any errors and then repeat the test.

Example: Mail settings are correct

Last updated

Was this helpful?