[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mail server update
On Thu, Dec 06, 2001 at 08:41:21AM +0100, didier at cs-net.cd wrote:
> I would like to replace my old mail server machine with a new one.
> My problem is : how to send no-ready mail from the old machine to the new.
You mean "unread mail"?
This can be an interesting problem on very large mailservers.
If the volume is not too large, then the simple solution is just to copy the
files across. The plan would be something like this:
1. create all the accounts on the new mailserver. Test it using telnet to
the SMTP port (to deliver a message to an account) and telnet to the
POP3 port (to retrieve it)
2. reduce the TTL on your MX records to 5 minutes. Wait until caches around
the world have picked up the new records. (e.g. if your old TTL was 24
hours, then you need to wait 24 hours). You also need to reduce the TTL
on the name which your users connect to download their mail, e.g.
"pop3.yourisp.net"
3. turn off your SMTP listening daemon on the old mailserver, so no more
incoming mail is delivered. It will wait at the sending machine, or on
your backup MX host if you have one.
4. copy all the mailbox files from one machine to the other. If you are
changing storage format (e.g. from mbox to maildir), or the file
locations are different, then you will have to run conversion scripts at
the same time. Test you can collect the converted mail using POP3 on
the new mailserver
5. swing the MX records, and pop3.yourisp.net, to point at the new server
6. after a few hours, if everything is working fine, increase the TTL
in the DNS back up to 24 hours.
The actual copying of mailboxes can be done using any method you are
comfortable with - for example running tar over ssh, or NFS-mounting one box
on the other then using 'cp'. Remember to check the ownership and
permissions of the destination files. If using cp or scp, the '-p' flag
preserves permissions.
> Fir the account , I will create all user and copy the 2 files /etc/passwd
> and /etc/shadow.
Should be fine for a Linux box without indexed passwords - but then you will
find your logins get slower and slower the more users you have in
/etc/passwd, because each login is a linear scan through this file.
On a FreeBSD box, you just copy over /etc/master.passwd and then run
'pwd_mkdb -p /etc/master.passwd' which regenerates the indexed versions and
/etc/passwd
B.
-----
This is the afnog mailing list, managed by Majordomo 1.94.5
To send a message to this list, e-mail afnog at afnog.org
To send a request to majordomo, e-mail majordomo at afnog.org and put
your request in the body of the message (i.e use "help" for help)
This list is maintained by owner-afnog at afnog.org