Configure Exim emailing with Microsoft Office365

On the page

Need some help?


If you don't have an in-house mail server, and you use Office 365, it is possible to configure ServiceNav to use Office365 as an SMTP relay.

You will need your email address, account and password.

In the following, we will use as an example  password. The server (SNB or SNP) will have as its hostname hostnameand the domain name of the local network will be local.lan. You will need to change these values to those that suit your configuration.

warning svgrepo com CAUTION
Office 365 will only accept relayed messages if the "From" field of the email is the same as the email address of the authenticating account (user@partner.dom).
The sender of notifications sent from a ServiceNav Box or from the NPS is defined in Organization, Sending email address field.
To test the correct sending of emails from a root user, edit the /etc/email-addresses file.

Steps to follow

Edit /etc/exim4/exim4.conf.template

At the beginning of the file, find the following lines 

# Macro defining the main configuration directory.
# We do not use absolute paths.
.ifndef CONFDIR
CONFDIR = /etc/exim4

Below these lines, add the following line

disable_ipv6 = true
  1. Configure EXIM4 in the traditional way : dpkg-reconfigure exim4-config
    • Use the "Send via smarthost" configuration - no local mail
    • System email name: hostname
    • IP address list : unchanged ( ; ::1 )
    • Other destinations for which email must be accepted: empty
    • Domain name visible to local users : local.lan
    • smarthost :
    • Answer NO then NO to the last 2 questions
  2. Change /etc/email-addresses
    • Add the following lines :
    • nagios: user@partner.dom
    • root: user@partner.dom
  3. Change /etc/aliases
    • Change the line for the root user : root: :blackhole:
  4. Change /etc/exim4/passwd.client
    • Add the line *:user@partner.dom:password
  5. Restart exim4

This may also be of interest to you


Welcome to ServiceNav!

Need help? More information about our products? Write to us!
You have taken note of our privacy policy.


While the epidemic lasts, ensure the availability and performance of your IT services for teleworking, with ServiceNav!

Following the government's call to mobilize to help businesses overcome the current health and economic context, we help you, free of charge, to ensure the complete monitoring of your teleworking environments: VPN, VDI, Teams, Skype Enterprise, Citrix... Objectives: collection, availability and usage indicators, dashboards to support your communication.
We use cookies to ensure that you have the best possible experience on our site, and if you continue to use this site, we will assume that you are satisfied with it.

Reserve your place

You have taken note of our privacy policy.