# Configure Email

This page allows you to configure the server e-mail settings.

1. Under Configuration, click E-mail Settings.
2. Click the Change button beside the setting you want to change.
3. Configure the settings as required and then click Save:

Setting | Description
--- | ---
Server to use for outbound SMTP | The server can deliver outgoing messages via a corporate or Internet service provider's SMTP server, or can deliver messages directly to their destination (by looking up mail exchanger records in DNS). If using a specific SMTP server, specify its hostname or IP address. Otherwise leave this field blank.
Destination port for outbound SMTP | If you have specified a server to use for outbound SMTP, select the destination port for outbound SMTP messaging: Port 25 (plaintext + TLS encryption if available; default) Port 465 (TLS encryption) Port 587 (plaintext + TLS encryption)
Use XOAUTH2 authentication | Select this checkbox to use XOAUTH2 authentication. This authentication mechanism is supported only with Microsoft 365 SMTP servers. For example: smtp.office365.com.
Mail server user ID | If you are using secure SMTP (port 465 or 587), enter the user ID required by the SMTP server. This ID must be configured and licensed in the SMTP server. If you select Use XOAUTH2 authentication, the password field will be empty.
Mail Server Password | If you are using secure SMTP (port 465 or 587), enter the password required by the SMTP server. This password must be configured in the SMTP server.
SMTP e-mail injection restrictions | Controls which networks will be allowed to send mail through this server via SMTP. Choose from one of the following three settings: Localhost only – accept e-mail only from applications installed on the server (default setting). Accept only from trusted networks – accept e-mail from trusted local networks that are directly connected to the LAN. (These networks are on the same subnet as the server’s private interface.) Accept from anywhere - accept all e-mail
From address for locally injected email | By default the server will send e-mails with a From address of "root" at the domain name configured on the server. If you require any locally injected e-mail to be sent from a specific address, enter the e-mail address in this field.
Forwarding address for administrative e-mail | By default, e-mail to the administrator is sent to the user "admin" at the domain name configured on the server. You can override the default by entering an e-mail address in this field. Note: RAID array event notifications are sent to this e-mail address. We recommend that you configure a valid address here.
E-mail sent for events | Check the system events for which you want to receive e-mail notifications. The e-mails are sent to the "admin" mailbox. To turn off e-mail notifications clear all the event boxes.
Send email to administrative address | To send a test e-mail to the configured administrative e-mail address, click Send. If the e-mail is not received as expected, check the following log files for additional information: qmail/current smtp-auth-proxy/current maillog

## Using XOAUTH2 Authentication with Microsoft SMTP Servers

To use the XOAUTH2 protocol to authenticate an SMTP connection to a Microsoft SMTP server, such as smtp.office365.com, perform the following steps to create credentials using the client credentials grant flow. For more information, see Authenticate an IMAP, POP or SMTP connection using OAuth.

1. Register an application in the Microsoft Entra ID server. For more information, see the Microsoft tab in Cloud Service Provider panel for instructions on configuring the application identity.

2. Add Office 365 exchange Online > SMTP.SendAsApp API permissions to the Microsoft Entra application. For more information, see Add the POP, IMAP, or SMTP permissions to your Microsoft Entra application.

3. Grant admin consent for your application in the tenant. For more information, see How to grant consent if you registered the application for your own tenant.

4. Register service principal in Microsoft Exchange. This can be done via the Exchange Online PowerShell. For more information, see Register service principals in Exchange.

5. Configure mailbox permissions by adding specific mailboxes in the tenant that will be accessed by the application. This mailbox is used as the sending mailbox user. For more information, see Register service principals in Exchange.

6. Verify SMTP AUTH is enabled for the designated mailbox. SMTP AUTH is disabled for organizations created after January 2020 but you can enable it per-mailbox. For more information, see Enable or disable authenticated client SMTP submission (SMTP AUTH) in Exchange Online.

7. Generate the application secret from the application registration portal. A long expiry for the secret, of up to 2 years, is most convenient to avoid reconfiguration of the credentials in MSL after each expiry.

8. Configure MSL with the application ID and secret:

   1. Go to the Cloud Service Provider panel in the MSL server manager.

   2. Select the Microsoft tab.

   3. Enter the Tenant ID, Application ID, and Application Secret in the form fields.

   4. Save the configuration.

9. Configure the MSL E-mail Settings.

   1. Go to the E-mail Settings panel in the MSL server manager.

   2. Configure the outbound SMTP server as smtp.office365.com.

   3. Configure the outbound SMTP port as Port 587 - TLS encryption if available.

   4. Select the Use XOAUTH2 authentication checkbox.

   5. Configure Mail server user ID with the mailbox identity assigned to the Exchange service principal when you add the mailbox permissions.

   6. Save the configuration.

      If the credentials are valid, it will be saved successfully.

10. Any emails sent via the configured application must contain a From header set to the value of the mailbox identity assigned to the Exchange service principal. To ensure that all locally injected mail sent from the MSL server to the outbound SMTP server contains the correct From header:

    1. Configure From address for locally injected email with the userid of the mailbox assigned to the Exchange service principal.

    2. Save the configuration.

11. Configure Forwarding address for administrative email and save the value.

12. Click Send to send a test email to the configured administrative address using the SMTP settings.

Parent topic: Configuration
↑