Mailing List Archive

Mail server migration
Hi there,

I have the following scenario: a remote mail server (currently used)
and a brand new local mail server (postfix, cyrus, clamav,
spamassassin,...) and I want to change DNS' so the MX becomes the local
server. I want the migration to be as transparent as possible for my
users, so I thought of stablishing a first phase where I would change
all the mail clients to point to the new server, and use a server side
process to download mails from the old server (still MX) and deliver it
to the local server. Do you know of any already made application that is
able to do this? By the way, I'm using virtual delivery in postfix,
directly to the cyrus server through lmtp.

Thanks in advance, best regards
Jose

--
gentoo-user@gentoo.org mailing list
Re: Mail server migration [ In reply to ]
On Tuesday 26 October 2004 09:36, Jose Gonzalez Gomez wrote:
> Hi there,
>
> I have the following scenario: a remote mail server (currently used)
> and a brand new local mail server (postfix, cyrus, clamav,
> spamassassin,...) and I want to change DNS' so the MX becomes the local
> server. I want the migration to be as transparent as possible for my
> users, so I thought of stablishing a first phase where I would change
> all the mail clients to point to the new server, and use a server side
> process to download mails from the old server (still MX) and deliver it
> to the local server. Do you know of any already made application that is
> able to do this? By the way, I'm using virtual delivery in postfix,
> directly to the cyrus server through lmtp.

fetchmail should be able to do what you need.
There are alternatives though.
It seems you have control over your DNS, if you have enough control slowly
drop the TTL down to 5 minutes (or less) over the space of a week. Then late
one evening, or at a weekend (quietest period), stop the SMTP service on
remote server, and flip the DNS. Start up new server, and cross fingers :)
Or, add new server as a secondary MX, but don't start it. Stop primary, start
secondary, remove the primary from DNS, and you're done!

--
Mike Williams
Re: Mail server migration [ In reply to ]
Mike Williams wrote:

>On Tuesday 26 October 2004 09:36, Jose Gonzalez Gomez wrote:
>
>
>> Hi there,
>>
>> I have the following scenario: a remote mail server (currently used)
>>and a brand new local mail server (postfix, cyrus, clamav,
>>spamassassin,...) and I want to change DNS' so the MX becomes the local
>>server. I want the migration to be as transparent as possible for my
>>users, so I thought of stablishing a first phase where I would change
>>all the mail clients to point to the new server, and use a server side
>>process to download mails from the old server (still MX) and deliver it
>>to the local server. Do you know of any already made application that is
>>able to do this? By the way, I'm using virtual delivery in postfix,
>>directly to the cyrus server through lmtp.
>>
>>
>
>fetchmail should be able to do what you need.
>There are alternatives though.
>It seems you have control over your DNS, if you have enough control slowly
>drop the TTL down to 5 minutes (or less) over the space of a week. Then late
>one evening, or at a weekend (quietest period), stop the SMTP service on
>remote server, and flip the DNS. Start up new server, and cross fingers :)
>Or, add new server as a secondary MX, but don't start it. Stop primary, start
>secondary, remove the primary from DNS, and you're done!
>
>
>
Thanks a lot... I remembered there was some very popular app that
did this, but I didn't remember the name :o) I know this is a bit OT,
but... do you know if fetchmail lets you run in daemon mode and retrieve
mail from a list of POP3 accounts? I'm using virtual delivery in
Postfix, so mail accounts doesn't have neither a corresponding system
user nor a ~/.fetchmailrc file.

Thanks also for the DNS suggestions, although I don't have that
control. The current mail server is located at an ISP, and we are
migrating to a local mail server. I'm afraid the only thing I can ask
for is they change the MX records once I have my mail server ready.

Best regards
Jose

--
gentoo-user@gentoo.org mailing list
Re: Mail server migration [ In reply to ]
On Tuesday 26 October 2004 10:55, Jose Gonzalez Gomez wrote:
>     Thanks a lot... I remembered there was some very popular app that
> did this, but I didn't remember the name :o) I know this is a bit OT,
> but... do you know if fetchmail lets you run in daemon mode and retrieve
> mail from a list of POP3 accounts? I'm using virtual delivery in
> Postfix, so mail accounts doesn't have neither a corresponding system
> user nor a ~/.fetchmailrc file.

Fetchmail can indeed run as a daemon. It basically just pipes the email it's
collected into the local MTA, letting it sort out delivery.
I idly tried to use it once, and gave up soon after. I don't like it :)

> >Or, add new server as a secondary MX, but don't start it. Stop primary,
> > start secondary, remove the primary from DNS, and you're done!

>     Thanks also for the DNS suggestions, although I don't have that
> control. The current mail server is located at an ISP, and we are
> migrating to a local mail server. I'm afraid the only thing I can ask
> for is they change the MX records once I have my mail server ready.

Could my second alternative work for you?
Feels a much cleaner solution to me, fetchmail always seemed a bit of a nasty
hack.

--
Mike Williams
Re: Mail server migration [ In reply to ]
Mike Williams wrote:

>On Tuesday 26 October 2004 10:55, Jose Gonzalez Gomez wrote:
>
>
>> Thanks also for the DNS suggestions, although I don't have that
>>control. The current mail server is located at an ISP, and we are
>>migrating to a local mail server. I'm afraid the only thing I can ask
>>for is they change the MX records once I have my mail server ready.
>>
>>
>
>Could my second alternative work for you?
>Feels a much cleaner solution to me, fetchmail always seemed a bit of a nasty
>hack.
>
>
>
I'm sure it would work, but as I told you, we don't have such a
control over the DNS servers. That's why I wanted something that would
let me retrieve mail while the current mail server is still the current
mail server, and also while the DNS changes are spread, as I guess in
the meantime (maybe two days) some messages will get delivered to the
old server and some to the new. After making sure all mails are
delivered to the new server, I'll take away fetchmail.

Thanks a lot, best regards
Jose

--
gentoo-user@gentoo.org mailing list
Re: Mail server migration [ In reply to ]
On Tue, 26 Oct 2004, Jose Gonzalez Gomez wrote:
> I have the following scenario: a remote mail server (currently used)
> and a brand new local mail server (postfix, cyrus, clamav,
> spamassassin,...) and I want to change DNS' so the MX becomes the local
> server. I want the migration to be as transparent as possible for my
> users, so I thought of establishing a first phase where I would change
> all the mail clients to point to the new server, and use a server side
> process to download mails from the old server (still MX) and deliver it
> to the local server. Do you know of any already made application that is
> able to do this? By the way, I'm using virtual delivery in postfix,
> directly to the cyrus server through lmtp.
>

Depending on the amount of cooperation you can get from the people
running the existing mail server, it might be easiest for them to set a
transport on their side to send all mail to your new server. The nice
thing is that you have to do nothing on your server and it's a good test
to make sure things are working. You might want to change your reject code
to 450 from 550 for the first day or so, just to make sure you don't
bounce mail.

Under postfix you need to add this line to the /etc/postfix/main.cf
transport_maps = hash:/etc/postfix/transport

then the transport would look like this:
domain.com :smtp:newmailserver.domain.com

Remember all this has to be done on the current mail server, not the new
server. Sendmail, qmail, exim, postfix all support this so unless they're
running something retarded like Imail they should be able to do it.

kashani

--
gentoo-user@gentoo.org mailing list