How to configure exim4 as smarthost to o365

Hi guys,
and thanks for the great work! Sorry I was sick and could not participate to 1.1 beta testing but I will install it on our test server 18.04LTS when I have time.

I have a currently an urgent problem with our live server script based email deliverability. Our company changed to o365 mail and currently our server side scripts and webshops can not send emails anymore due to massive blocklists and possibly other causes.

I was thinking to bypass this by using exim smarthost option. Question is because this a live server and I want it to succeed rather right away than through trial and error is the below configuration viable to deliver straight to o365?

# route to o365_______________

begin routers

#  driver = manualroute
#  domains = ! +local_domains
#  transport = remote_smtp
#  route_list = *
#  no_more
#  no_verify
dc_local_interfaces=' ; ::1'

Probaly you would here find additional informations: How to configure HestiaCP / Exim 4 for SendGrid relay

Hi ScIT and thank you

I did made a shot to use exim as a external relay but external connections would need certificates transferred to server or connectors setted up on o365 exchange side I think because when testing relay I got tenant 550 error

Using the link you provided and adding certificates (tricky part) I think you can also send outside of mycompany.tld but it is enough for us exim to send inside our company.tld adresses simple form data.

I also noticed from Office 365 admin notifications that TLS1.1 and TLS1.0 lifecycle is ending “soon” and upgraded our webshops to support TLS1.2 and mail intermitently bouncebacks vanished so I think “soon” means now in Microsoft terminology.
Tenant error: