1

I am not really familiar with Linux,that's why my questions might seem to be very easy for you.

Currently I have a mail server on Ubuntu 12.04 (using Postfix) and Roundcube for web access, so our customers have their e-mails on that server (ex:[email protected]) and the domain name is mail.myserve.com (IP 10.1.1.2).
Our web site is www.myserve.com (IP 10.1.1.1) also hosted on an Ubuntu 12.04 server.

Now we have registered a new domain, and our website will be www.myserve2.com and I am not sure of what I have to do for the mail server and the website.

Here are my questions:

  1. How to redirect the web site access to be routed to the new domain (ex: someone type www.myserve.com and get directly to www.myserve2.com), and is it possible that both domain can use the same ip address?(10.1.1.1)? Which file do i have to modify?
  2. what will happen to the mail server (mail.myserve.com)? will it directly become mail.myserve2.com? if not how can I change this without disturbing our clients?
  3. can both mail servers use the same IP address(10.1.1.2)?
  4. what change do I have to do in Postfix to allow users to continue using their mail services without changing their e-mail addresses? will they have to change their e-mail addresses to [email protected]?

Thank you very much in advance

2 Answers 2

2

Sorry if it is not the step-by-step howto that you were expecting, but you need to give more details about your configuration. Also, I suggest to split your question into several post.

But anyway, I have some clues / guidelines for your to help this to be sorted out :

  1. At DNS level (at your registrar), you can define different names pointing to the same IP, this is not a problem. You can have name1 -> IP1 and name2 -> IP1. At the web server level, any default configuration should let you display the same web pages using both name in the URL.
  2. At DNS level, once again, you can point the MX records of your second domain to the same mail server. But this time, you have to do some configuration in your mail server to accept mail sent to this second domain as a valid internal domain (in /etc/postfix/main.cf :

mydestination = myserve.com, myserve2.com, $myhostname, localhost.$mydomain, localhost

Depending on how you define your users, you may have to do some more tweaking. But if you are using locally defined user (the mail users are defined as Linux users), user1 should receive mail sent to [email protected] and [email protected].

  1. If you configure a single Postfix instance to handle both domains, you can use the same IP. Of course if you split your Postfix installation between two hosts, you will need two IP.

  2. See above, it will depend on how you have created the users. If you use the Virtual Users and Domains and/or if you have an LDAP backend, it will be different.

I hardly suggest that if you encounter problem with the configuration of Postfix or the web server, you open new question with as many details about your config as possible.

3
  • Thank you very much,I am just going to try it and I will let you know, just one question: .in my configuration I use virtuals users on the domain myserve.com I saw that on postfix you can create multiple domain and add users, the question is that do I have to import users that are on myserve.com on myserve1.com? if I just use the same IP (single instance of postfix) all users in both domains will receive the mails sent to their addresses without any routing? just modifying the /etc/postfix/main.cf ?
    – user299777
    Jul 3, 2014 at 7:45
  • You can have both mail domain on the same Postfix and use a mapping table (/etc/postfix/virtual by default) to redirect mails send to any user of domain1 to the same username in domain2 : @domain1.com @domain2.com. See on serverFault
    – Benoit
    Jul 3, 2014 at 13:43
  • Thank you benoit, it's very helpful will give my feedbacks
    – user299777
    Jul 4, 2014 at 6:29
0

Thank you very much it is quite clear ,I am just going to try it and I will let you know, just one question: See above, it will depend on how you have created the users. If you use the Virtual Users and Domains and/or if you have an LDAP backend, it will be different.

I didn't get the meaning of this sentence above, in my configuration I use virtuals users on the domain myserve.com I saw that on postfix you can create multiple domain and add users, the question is that do I have to import users that are on myserve.com on myserve1.com? if I just use the same IP (single instance of postfix) all users in both domains will receive the mails sent to their addresses without any routing? just modifying the /etc/postfix/main.cf ?

Thank you again

1
  • Don't comment an answer by adding a second answer to your own question, it may not seen by the poster of the answer you want to comment.
    – Justin
    Jul 3, 2014 at 7:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .