Page 1 of 1

Split Mailserver Configuration, VestaCP and Office365, SMTP 550

Posted: Thu Jul 02, 2020 7:28 pm
by ThA-LaN-LaW
Hi!

some of our Customers want to use a "split" Mail-Server configuration, some Mailboxes at VestaCP, few Mailboxes at Office 365.

example.com ist registered at VestaCP with Web/DNS and Mail.
MX Record Points to VestaCP. Mail in/out from VestaCP runs perfect!

Some Users from example.com use an Office 365 Account.
So for this Mailboxes we forward the Mails to the "internal" Office 395 E-Mail Adresses.

VestaCP Account user2@example.com -> Forward to user2examplecom@onmicrosoft.com

If the User send from his Office 365 Account with user2@example.com as sender to user1@example.com (VestaCP Mailbox without Forward)
we get an "550 5.0.350 Remote server returned an error -> 550 smtp auth required"

Because of exim config:

Code: Select all

  deny    message       = smtp auth required
         sender_domains = +local_domains
         !authenticated = *
Which is ok, but i should recieve this Mails without be an open relay :)

The Customer _old_ Provider had the same setup, he accepted "external" Mails with the same Domain.

Similar, old Cases are:
viewtopic.php?t=11171
viewtopic.php?t=15151

My thoughts:
Domains with "Split" Setup could relay without Auth, perhaps additional with O365 Server IP Whitelist.
O365 Mails should Relay to VestaCP (i think this is not possible on o365)

Best Regards!

Re: Split Mailserver Configuration, VestaCP and Office365, SMTP 550

Posted: Mon Jul 06, 2020 5:28 pm
by ThA-LaN-LaW
Hi!

O365 couldn't Relay with Auth to "own" Mailservers.

So i modified my exim config with following ACL Settings:

Code: Select all

accept senders	= user1@example.com : user2@example.com				#all users at office365 or use *@example.com
hosts		= 40.92.0.0/15 : 40.107.0.0/16 : 52.100.0.0/14 : 104.47.0.0/17	#all office365 SMTP Servers
Office 365 SMTP Server IP's: https://docs.microsoft.com/de-de/office ... nge-online

Best Regards!