The problem I am having is with the secondary mail server, the one I have now does not accept the relayed messages
Reconfigure it to accept them.
Right.
in 1st place thank you for answering.
I am working part time for a small company, they have about 40 employees that use the email everyday for work and recently they have acquired a MS account for 10 employees that use it mainly for teams with customers but also sharepoint, etc.
To buy an MS account for each of the 40 would be too expensive and necessary because the other 30 only really use email in the day to day work.
So what I did initially was to follow this Microsoft doc: https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365
So our MX
register point to Exchange server and exchange relay it to the secondary email server where all those 30 accounts exists.
It was working fine until I we started to get this "Not delivered message" email returning with this error:
Error: 550 5.7.367 Remote server returned not permitted to relay -> 554 5.7.1 : Relay access denied
I talked to the support of this secondary email server and they told me they do not support this operation.
So I am looking for help in finding some server that would allow me to work like this. Do you happen to know some company you could recommend?
MS does sell just-email licenses: https://www.microsoft.com/en-us/microsoft-365/exchange/compare-microsoft-exchange-online-plans
Or, you could probably just get some just-Office licenses for the 10, and keep all your email on the secondary server. Trying to relay half your mail sounds like a mess.
It sounds like you need to set up Exchange Hybrid although it's really not clear to me what you're actually doing.
What is the "secondary server?" How did all this work before you bought "MS accounts?" Where was the MX pointing before? When you say "Exchange server" are you talking about Exchange Online or onprem? Which server is rejecting with the relay error?
Regardless, you're going to need objects in the environment where the MX points that forward to the second location where the rest of the users are. In Exchange onprem/Online this would ideally be a MailUser object created by Azure AD Connect, but a Contact could suffice in certain setups.
And the second environment needs to trust the emails forwarding through the first or you'll have SPF failures.
But again, a proper Exchange Hybrid setup takes care of all of this.
Edit: Improved my question.
I am working part time for a small company, they have about 40 employees that use the email everyday for work and recently they have acquired a MS account for 10 employees that use it mainly for teams with customers but also sharepoint, etc.
To buy an MS account for each of the 40 would be too expensive and necessary because the other 30 only really use email in the day to day work.
So what I did initially was to follow this Microsoft doc: https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365
So our MX
register point to Exchange server and exchange relay it to the secondary email server where all those 30 accounts exists.
It was working fine until I we started to get this "Not delivered message" email returning with this error:
Error: 550 5.7.367 Remote server returned not permitted to relay -> 554 5.7.1 : Relay access denied
I talked to the support of this secondary email server and they told me they do not support this operation.
So I am looking for help in finding some server that would allow me to work like this. Do you happen to know some company you could recommend?
~~I need indications of email servers that accept relay transmission.~~
~~The MX will point to the Microsoft Exchange server, but emails that do not exist on the MS server will be relayed to this secondary server.~~
okay, so you've got 10 employees with MS licensing. They have e-mail addresses through their microsoft licensing, correct? Those e-mails go through an exchange server? (whether on-premises or exchange online, right?)
The other 30 employees have e-mail using...what, exactly? (What kind of mail server?)
Because that Microsoft doc is typically used to set up stuff like scan-to-email for copiers and although you can do other things with relays, knowing the precise setup (without the exact domain names, just use domain1.com, domain2.com or whatever) is important here in order to get the MX records and any relays pointing at the servers where the addresses reside.
554 does seem to indicate a configuration or permissions issue, but to go down that route, I'd need a little more info about the non-microsoft side of things.
Sysadmin
A community dedicated to the profession of IT Systems Administration
No generic Lemmy issue posts please! Posts about Lemmy belong in one of these communities:
!lemmy@lemmy.ml
!lemmyworld@lemmy.world
!lemmy_support@lemmy.ml
!support@lemmy.world