-1

I have a local Exchange Server which has a dynamic internet ip. So I have setup a dynamicdns server for this server. The server is my main mail server.

Now I have a public domain and a postfix server as email server for this pubic domain. I dont want to change the MX Records because the Exchange server has a dynamic IP. So I want to have the postfix server as a relay server.

For outgoing emails on the exchange server I have setup a connector to sending it to the postfix server which is working fine. For incoming emails I have setup a external tool to fetch the emails with POP3 from the postfix server and forward it to the exchange server.

Is it possible to avoid the pop3 collector and send incoming email directly from the postfix to the exchange server? I know that I can do that with transport maps in postfix but my problem is that the exchange server has a dynmaic ip. So if the server isnt available I want to have the emails on the postifx server so that it is possible to read the mails on the postfix server if they wasnt relayed to the exchange server. And when the exchange is back online I want that the mails are relayed again.

For example keep the mails in the users mailbox on postfix until postfix can connect to the exchange server and relay the mails.

Peter
  • 1
  • 1
  • 8
    `I have a local Exchange Server which has a ***dynamic internet ip.***` <--- I found your problem for you. – HopelessN00b Jan 30 '14 at 18:37
  • Why in the devil are you running it this way? Most people would lease an additional static IP (at negligible cost). Doing things right is way easier. – Falcon Momot Feb 01 '14 at 23:39

2 Answers2

4

I have a local Exchange Server which has a dynamic internet ip.

Stop. Stop right there. Get a static IP from your ISP for your mail server. Then, the rest of what you've posted doesn't matter. No one runs Exchange on a dynamic IP, it's madness. If you configure your on-prem Exchange server correctly you don't need any of the other patchwork you've outlined.

MDMarra
  • 100,734
  • 32
  • 197
  • 329
2

This question isn't really about Exchange or the fact that it uses a dynamic ip address. The question really is "Can I have my Postfix server queue emails in the event that Exchange is unavailable?". You've already stated that you know you can.

If you're using dynamic DNS for the Exchange server and it's ip address changes then that change should be reflected in your name servers automatically via the dynamic DNS service. Postfix should be configured to send email to the FQDN of the Exchange server as configured in your dynamic DNS. If the dynamic ip address changes then at most Postfix will queue the email until the dynamic DNS record is updated and the TTL of the dynamic DNS record expires in it's local cache. Once the dynamic DNS record is updated and the TTL expires Postfix will query anew for the record and happily resolve it to the new ip address.

I'm really not seeing the problem here.

Q: Should you be using a dynamic ip address for a production server/service?

A: Probably not.

Q: Can you use a dynamic ip address for a production server/service?

A: Most certainly.

joeqwerty
  • 109,901
  • 6
  • 81
  • 172