server email migration question >> possible to forward to mailbox using domain alias?

mmerlin

Verified User
Joined
Jul 26, 2004
Messages
75
Location
Melbourne, Australia
server email migration question >> possible to forward to mailbox using domain alias?

Hi everybody,

Apologies if this has been answered elsewhere, but I've searched the forum several times without finding a direct answer, and I've also tried putting my idea in practice by going ahead and implementing it, but this doesnt seem to be working.


Here is the scenario...

- bunch of customer domains on an old RAQ server

- want to migrate them to a shiny new DA server

- want to get the RAQ email forwarding to aliased mailboxes of the same domain name on the DA server, before I make any nameserver changes to the customer domains

- so I set up the new domains and mailboxes on the DA server, and created a domain pointer to the same domain (so new.domain.com points to domain.com) and also added DNS entry for new.domain.com on this DA machine.

- on the RAQ
Created an A record in the RAQ's DNS server so that it knows that
new.domain.com is on the DA machine

- on the RAQ, set email forwarders for all email accounts, so that for example,
[email protected] gets forwarded to
[email protected] on the DA machine
(and on the DA machine, the
[email protected] address
is supposed to actually arrive into the mailbox of
[email protected] on the DA machine)

The net result I am trying to achieve (without success at this stage) is that all the RAQ email starts forwarding to the DA machine mailboxes BEFORE i make the nameserver change on the customer domain, so that no email is left on the RAQ once I make the DNS switch.

- the DNS switch will involve changing nameservers for the domain at the registry (from ns1 / ns2 (RAQ) over to ns3 / ns4 (DA machine))



So for example,

on the RAQ there is
domain: abc.com
email: [email protected]

On the DA machine I have set up
domain: abc.com
email: [email protected]


on the DA machine

setup a domain pointer
new.abc.com -> abc.com

created DNS record
new.abc.com -> same IP as abc.com


on the RAQ

created DNS record
new.abc.com -> same IP as abc.com on the DA machine

On the RAQ set a forwarder
[email protected] -> [email protected]

** the problem is here
- the forwarder just bounces back...

- and in fact it doesnt matter where on earth I send mail from (e.g using another server that is not the RAQ) but I cannot send mail to [email protected] it just bounces


Perhaps there is a better way of doing this... some lateral thinking could go a long way here :-)

If anyone can suggest a smooth way to implement a domain migration without losing email (i.e. leaving it on the old server) it would be greatly appreciated :-)

Kind regards,

Michael Merlin
www.ecoms.com
 
All looks good here, Michael, but don't forget that while your day is just starting, mine is almost over; it's 10:23 pm here and I've just sat down with a dish of (low-carb but surprisingly tasty) mint chip ice cream to finish up my forum reading for the night.

You shouldn't have to add any DNS records on the DA server for the domain alias; that should be taken for you.

But on the RaQ you should add one more DNS record; an MX record poinging new.example.com to new.example.com with high priority.

What error message are you getting on the bounce? If you'd like send me the bounce notice privately (email to the address in my sig) and I'll take a look at it (in the morning my time).

(Try the MX record first; it shouldn't make a difference but perhaps it is for some reason.)

But unfortunately even this well thought out plan isn't perfect. Unless you have your clients log in to both servers to read email, there'll still be some left on the RaQ when you want to pull it out of service.

Since the RaQ and the DA system both use mbox format, you'll be able to append any leftover email on the RaQ to the right account on the DA box, if you want.

Jeff
 
jlasman said:
Since the RaQ and the DA system both use mbox format, you'll be able to append any leftover email on the RaQ to the right account on the DA box, if you want.[/B]
Thanks Jeff, this sounds like the lateral solution I am looking for.

Easier than messing around creating alias domains and all those individual email forwarders on the RAQ.


The user mail files on the RAQ are stored in

/var/spool/mail/

So for example on the RAQ there is a user mail file named
joe


I had a look around on the DA machine, and it looks like I should do the following:


1. Create the "joe" address @domain.com on the DA server.



2. copy the "joe" mailfile across to

/var/spool/virtual/domain.com/joe

where domain.com is the website where joe has his email address


3. chown it

chown domain:mail joe

(where "domain" is the username that "owns" domain.com in DA)


4. chmod it

chmod 660 joe



On the external DNS server (ns1/ns2) I might play with the MX records, to make the DA machine secondary MX for domain.com and then after doing all of the above, just delete the primary MX so that the DA machine MX becomes primary (hopefullly this will be like "flicking the switch"). And then at the same time change the nameservers to ns3/ns4 at the domain registry.

It just might work :)
 
Looks good...

Don't forget to chmown not to domain, but to the domain owner name:mail.

Don't forget to turn email off on the RaQ before you move everything, or else some mail will keep coming to the RaQ.

You might want to change the TTL on your MX records on the RaQ to 600 at least 30 hours or so before you do the change.

Jeff
 
Back
Top