From owner-freebsd-questions Sat Feb 2 22:23:30 2002 Delivered-To: freebsd-questions@freebsd.org Received: from dns2.digitalglobe.com (dns2.digitalglobe.com [205.166.175.35]) by hub.freebsd.org (Postfix) with ESMTP id ACE4937B404 for ; Sat, 2 Feb 2002 22:23:22 -0800 (PST) Received: from dhcp14.digitalglobe.com (dhcp14.digitalglobe.com [10.10.44.14]) by dns2.digitalglobe.com (8.11.4/8.11.4) with ESMTP id g136MMs10558; Sat, 2 Feb 2002 23:22:23 -0700 (MST) Subject: Re: Migrating mail to a new server? From: John-David Childs To: Todd Martin Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0 (Preview Release) Date: 02 Feb 2002 23:22:58 -0700 Message-Id: <1012717378.23911.0.camel@dhcp14> Mime-Version: 1.0 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 2002-02-02 at 22:49, Todd Martin wrote: > Hi all, > > How do I move/migrate user mail when I upgrade to a new box? I've done this so many times, I can almost do it in my sleep. In fact, I'm about to do it again tomorrow :) The following examples use Sendmail, but the pattern is the same for any MTA. > > I've got about 30 user mail boxes on an old Linux box. New box is > FBSD 4.5. Most importantly: check your sendmail.cf files. You need to know, at minimum, the following things: MTA on both platforms. (Hopefully they're the same :-) Minor revision differences are ok (e.g. Sendmail 8.10.X, 8.11.X, 8.12.X), but a major revision difference between the two should make you re-triple check your configuration files (/etc/sendmail.cf, /etc/aliases, /etc/mail/*). Are you running smrsh on the old machine? How 'bout procmail mail delivery? Make sure those programs are in the right place on the new machine, if applicable. Mailing lists? Majordomo/Mailman?? Set up some test lists on the new box and make sure you can receive mail. Send mail from the new box and make sure the headers (domain name, host name, etc) look ok. Go back to step one if they don't (check your sendmail.cf, /etc/mail/* files). The new box can have the same hostname as the old box, but obviously not the same IP address, and it can't be in DNS until you're ready. Speaking of DNS...are you moving the host.your.domain to a new IP address? If so, set your DNS time-to-live down to an our or less, and set the refresh to something ridiculous (like 10 minutes). If your mail server isn't heavily used...these values can be 1-2 hours. As for getting mail off the old box onto the new one after reboot...do the following: Assuming you have a backup MX host and you're bringing up the new box at the same IP address as the old one, shut off the sendmail program on the old box, scp the mailboxes from old hold to new host, down the old host, bring up the new host, and the backup MX server will "discover" the new box and deliver mail to it. If you don't have a backup MX server...either set one up, or configure the old box to have a DIFFERENT IP address once you reboot it (set values in /etc/hosts, etc/sysconfig/network, /etc/sysconfig/network-scripts/ifup-eth0, etc). Reboot old mailhost and new mailhost at (nearly) the same time...then scp the user's mail files from old mailhost to new mailhost IN A DIFFERENT directory than the default mail dropbox (i.e. NOT /var/mail/ or /var/spool/mail or whatever), then use a foreach loop to diff the mailboxes (csh: other shells have a similar constructs). The transition needs to be quick -- turn off old box, > reboot new box with duplicated settings. Any new mail should get > delivered on the new box. How do I get the "leftover" mail off the > old, and onto the new? > > ~Todd > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- jd To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message