Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

switching mail servers

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


jonathan.addleman at mail

Nov 12, 2007, 5:02 PM

Post #1 of 7 (640 views)
Permalink
switching mail servers

Can anyone suggest some documentation relating to moving a running exim
installation to a new server? I have a system already in place on one
machine, but I'm in the process of moving everything over to another
one. Currently, mail is received locally for a number of users who
generally access it via imap. (mail stored in ~/Maildir).

I will have to switch the DNS over and copy existing mailboxes, of
course, but I want to make sure no messages are lost. I figured the
safest approach would probably be something like this:

- First set a very low DNS TTL.

- Get exim to stop delivering local messages. (either keep them in the
queue, or deliver them to a temporary file)

- Sync all the mailboxes on the old server to the new one.

- Switch the DNS over.

- Once the old server stops receiving messages, resend the temporarily
held ones.


Maybe there are better approaches though? I'm not sure the best way to
go about step 2 either - maybe using the 'queue_only' config, and then,
after everything is switched over, configure exim to relay mail to the
domain, and process the queue normally? Or somehow manually transfer the
queued messages to the new server via scp and then process them there?

Another possibility I considered is to set something up so a temporary
error is returned from the old server, so that messages will just get
resent by the originating servers later.

It's a very low-volume server, with only a few accounts, but I'd like to
do this The Right Way to avoid any bounces. Any suggestions are welcome!

--
Jon-o Addleman - http://www.redowl.ca

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


jethro.binks at strath

Nov 13, 2007, 1:14 AM

Post #2 of 7 (626 views)
Permalink
Re: switching mail servers [In reply to]

On Mon, 12 Nov 2007, Jonathan Addleman wrote:

> I will have to switch the DNS over ...

Not necessarily. If your MX records are pointing to an additional service
(virtual) IP address for Exim on your host, you could just shut down that
IP on the old host and bring it up on the other, when you are ready. No
DNS changes needed, and sending servers will defer while there is no Exim
listening on the IP.

> - First set a very low DNS TTL.

Otherwise, remember that you have to set the low TTL well in advance;
hosts won't get the new TTL until the old one that they got before you
made the change has timed out. So if your TTL is a week, then you should
probably change it over a week in advance.

Jethro.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services
University Of Strathclyde, Glasgow, UK

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


pookey at pookey

Nov 13, 2007, 1:18 AM

Post #3 of 7 (606 views)
Permalink
Re: switching mail servers [In reply to]

Jonathan Addleman wrote:
> Can anyone suggest some documentation relating to moving a running exim
> installation to a new server? I have a system already in place on one
> machine, but I'm in the process of moving everything over to another
> one. Currently, mail is received locally for a number of users who
> generally access it via imap. (mail stored in ~/Maildir).

No low TTL on the MX is needed, and if you want, you can use 'perdition'
to do away with the low TTL on the imap addr.

First, I would set hold_domains.

I would add a router to the current one to deliver all mail to the new one.

I would tell users imap would be unavailable for a sort period.

move mailboxes, test nw sesrver, unhold domains, update MX.

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


andrew.johnson at sappsys

Nov 13, 2007, 4:15 AM

Post #4 of 7 (598 views)
Permalink
Re: switching mail servers [In reply to]

I once did a move where the servers were hosted on somebodyelses network and
they were geographicaly seperated. I used IPTables to forward connections
from the old server to the new one so the switchover was fully under my
control, then the DNS changes followed later - this allowed for easy
rollback.

-Andy-

-----Original Message-----
From: Ian P. Christian [mailto:pookey [at] pookey]
Sent: 13 November 2007 09:18
To: Jonathan Addleman
Cc: exim-users [at] exim
Subject: Re: [exim] switching mail servers

Jonathan Addleman wrote:
> Can anyone suggest some documentation relating to moving a running
> exim installation to a new server? I have a system already in place on
> one machine, but I'm in the process of moving everything over to
> another one. Currently, mail is received locally for a number of users
> who generally access it via imap. (mail stored in ~/Maildir).

No low TTL on the MX is needed, and if you want, you can use 'perdition'
to do away with the low TTL on the imap addr.

First, I would set hold_domains.

I would add a router to the current one to deliver all mail to the new one.

I would tell users imap would be unavailable for a sort period.

move mailboxes, test nw sesrver, unhold domains, update MX.




--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


renaud at llorien

Nov 13, 2007, 4:31 AM

Post #5 of 7 (604 views)
Permalink
Re: switching mail servers [In reply to]

Andrew Johnson wrote:
> I once did a move where the servers were hosted on somebodyelses network and
> they were geographicaly seperated. I used IPTables to forward connections
> from the old server to the new one so the switchover was fully under my
> control, then the DNS changes followed later - this allowed for easy
> rollback.
>
>
>

While this may sound great, you should take great care of spamscanning when
using such a solution because all mails will appear as coming from your old
mailserver. This means you should not deny on helo/ip couple or dns
verification. You will also not be able to check for blacklists.
Attachments: smime.p7s (3.21 KB)


andrew.johnson at sappsys

Nov 13, 2007, 4:35 AM

Post #6 of 7 (595 views)
Permalink
Re: switching mail servers [In reply to]

Correct, I did indeed have to turn those bits off. But in my case, the roll
forward / roll back advantages outweighed the disadvantages. I had also set
a short ttl prior to moving, so my real dns changes could action fast.
Probably a combination of everything would be a whole solution.

Short ttl's
Multiple mx records
Port forwarding

-Andy-

-----Original Message-----
From: Renaud Allard [mailto:renaud [at] llorien]
Sent: 13 November 2007 12:31
To: andrew.johnson [at] sappsys
Cc: 'Ian P. Christian'; 'Jonathan Addleman'; exim-users [at] exim
Subject: Re: [exim] switching mail servers



Andrew Johnson wrote:
> I once did a move where the servers were hosted on somebodyelses
> network and they were geographicaly seperated. I used IPTables to
> forward connections from the old server to the new one so the
> switchover was fully under my control, then the DNS changes followed
> later - this allowed for easy rollback.
>
>
>

While this may sound great, you should take great care of spamscanning when
using such a solution because all mails will appear as coming from your old
mailserver. This means you should not deny on helo/ip couple or dns
verification. You will also not be able to check for blacklists.


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


jonathan.addleman at mail

Nov 14, 2007, 10:25 AM

Post #7 of 7 (594 views)
Permalink
Re: switching mail servers [In reply to]

Ian P. Christian wrote:
> Jonathan Addleman wrote:
>> Can anyone suggest some documentation relating to moving a running exim
>> installation to a new server? I have a system already in place on one
>> machine, but I'm in the process of moving everything over to another
>> one. Currently, mail is received locally for a number of users who
>> generally access it via imap. (mail stored in ~/Maildir).
>
> No low TTL on the MX is needed, and if you want, you can use 'perdition'
> to do away with the low TTL on the imap addr.
>
> First, I would set hold_domains.
>
> I would add a router to the current one to deliver all mail to the new one.
>
> I would tell users imap would be unavailable for a sort period.
>
> move mailboxes, test nw sesrver, unhold domains, update MX.

Move is completed, and looks like it all went smoothly. I basically did
what you suggested here, with a few tweaks:

- hold domains
- synced mailboxes
- updated dns
- then on the old machine, switch the 'local domains' to 'relay domains'
- took off the hold, so that it just delivered all those messages to the
new server.

And now everyone can enjoy the extra bandwidth on the new server! hanks
for the help.
--
Jon-o Addleman - http://www.redowl.ca

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.