Koozali.org: home of the SME Server

Split www & mail to different servers

Offline jumba

  • *****
  • 291
  • +0/-0
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
Split www & mail to different servers
« on: April 03, 2008, 11:02:17 PM »
I've got an interesting problem:

Short background:

A client has two servers (on different locations)

Both are Sme 7.1 in server/gateway mode.

There is an ipsec VPN between those two internal networks as well...

Server 1 is supposed to take care of domain1.com and server2 takes care of domain2.com.

Server1 is on a T1 line, so the client wants so place the webpages for domain1.com as well as domain2.com on that server.

Therefore, domain2.com has been added to server1 through the server manager....

Mail (from the outside world) to user@domain1.com is being delivered to server1 and mail to user@domain2.com is being delivered to server2 OK. So far no problem.....

Now to the problem:

When a user on lan1 (behind server1) (or a user using server1 as smtp server) tries to send a mail to user@domain2.com it's not delivered correctly because server1 tries to find the user on server1.

Would it be possible to set the MX pointers at server1 so that the server understand that mail to user@domain2.com should be delivered out to the internet and further over to server2?????

Please, please point me to the right direction  :-? :-? :-?

Offline kruhm

  • *
  • 680
  • +0/-0
Re: Split www & mail to different servers
« Reply #1 on: April 04, 2008, 05:58:01 AM »
Your VIRTUAL DOMAIN on SERVER1 should be set to "Internet DNS servers" instead of "Resolve locally".

Once this is done, change your DNS records (at the DNS HOST) so that:
-the A RECORD goes to SERVER1
-the MX RECORD goes to SERVER2

Wait a few hours (depending on DNS HOST).

You'll also have to customize the LOCAL DNS RECORDS on SERVER2. WWW.DOMAIN2.TLD goes to <ipaddressofserver1>.

NOTE:
at SERVER2 location, http://domain2.tld won't work. You must http://www.domain2.tld
« Last Edit: April 04, 2008, 06:00:48 AM by kruhm »

Offline jumba

  • *****
  • 291
  • +0/-0
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
Re: Split www & mail to different servers
« Reply #2 on: April 04, 2008, 08:12:43 AM »
Your VIRTUAL DOMAIN on SERVER1 should be set to "Internet DNS servers" instead of "Resolve locally".

Once this is done, change your DNS records (at the DNS HOST) so that:
-the A RECORD goes to SERVER1
-the MX RECORD goes to SERVER2

Thanks for your answer but unfortunately thats exactly how things are set already.

In my original post, I wrote that there is an ipsec VPN between the two internal nets as well.

In order to get this I had to add lanbehind_server2 as an "internal network" on server1 and so on...

Maybe that complicates this situation further?

More exactly, what I need is a way to tell server1 NOT TO ACCEPT mail to domain2.com, but still answer on http requests to domain2.com.

How should I accomplish that???

I suspect there has to be some db-command to use, but which???

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Split www & mail to different servers
« Reply #3 on: April 04, 2008, 10:12:55 AM »
jumba

Quote
More exactly, what I need is a way to tell server1 NOT TO ACCEPT mail to domain2.com...

Maybe this would work.
Delegate mail for domain2 to server2 using db commands see FAQ - Email

http://wiki.contribs.org/SME_Server:Documentation:FAQ#Internal_Mail_Servers

then all mail for domain2 will be delivered locally at server2.
« Last Edit: April 04, 2008, 12:56:07 PM by RayMitchell »
...

Offline jumba

  • *****
  • 291
  • +0/-0
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
Re: Split www & mail to different servers
« Reply #4 on: April 04, 2008, 10:39:33 AM »
jumba

Quote
More exactly, what I need is a way to tell server1 NOT TO ACCEPT mail to domain2.com...

Maybe this would work.
Delegate mail for domain2 to server2 using db commands see FAQ - Email

http://wiki.contribs.org/SME_Server:Documentation:FAQ#Internal_Mail_Servers

then all mail for domain2 will be delivered locally at server2.


Yes of course!

This is what open source really is all about...

Your solution is implemented and it works just wonderfully!!!

Many many thanks to you for your quick and correct response!

I'll send another donation right after this weekend :-P :-P :-P