Mail relay from on-premesis Exchange

cDGo

Verified User
Joined
Sep 21, 2012
Messages
121
I have an external DNS in which mail per domain/user is forwarded to an on-premesis Exchange server.
The alma-linux 9.7 server is not handeling mail it self for any user.
The exchange server is sending out email through the ISP.

Now I want to use the webserver to become a mail relay for the exchange server instead of the ISP.
Still all incoming mail and mail from the webserver itself (webforms etc.) needs to be forwarded to the Exchange server.
Is that even possible?
 
Still all incoming mail and mail from the webserver itself (webforms etc.) needs to be forwarded to the Exchange server.
Is that even possible?
I think so.
Theoretically, if you use DA as smarthost to the Exchange server then it will also send mail generated locally to the Exchange server. It's up to the Exchange server on how to handle these mails.
As for receiving mails, it's a question of putting the MX record to the ip of the exchange server and it will receive mails directly.

You might want to have a look at this:
 
Hello Richard,

Thanks (again) for answering my question(s).

I've come across that page in my serach before.
But I do not get what it should be setup like.
Because my guess is that the "Remote server hostname" should be smtp.domain.com which is the local server on which these settings are done?
I think this is ment for the situation when the domain.com server wants to send mail through a remote server like smtp.domain2.com

My DNS settings now:
mail A 300 EXCHANGE_IP
MX 300 10 mail.domain.com

For an additional 5 domains, this is set the same for each one of them.
mail A 300 EXCHANGE_IP
MX 300 10 mail.domain2.com
etc.

All mail from these domains are now forwarded to the exchange server which is what's needed.
Now when I reply an email from within th exchange enviroment it goes through my ISP and then uses the Dkim of the ISP (KPN so not aligned to domain.com) and therefor the email goes straight into spam when sending to a hotmail.com address.

When I want to use the domain.com server as my actual sending server (dkim then is aligned) I've set up the smart-host in exchange to be domain.com.
But then I get a error server unreachable on sending/replying to an email.
This probably is, because the DNS reroutes the outgoing email back to the exchange IP
So I'm kinda stuck here on how to set it up correctly.
 
Ah oke sorry, then I misunderstood. I though you ment on premises but with another domain name.
What you in fact want is a kind of a double smarthost. I have no clue on how this should work.

You might be able to solve the issue by not using a DKIM on your own server, but only using SPF, and ofcourse include the KPN SPF system, hoewel that is probably not what you want.

I might tag @mxroute for you. He knows lots about mail systems so maybe he has an idea. There was another person but unfortunately I fogot his name.

I will follow this topic just out of curiosity if such construction is possible and how it should be constructed.
 
Back
Top