From owner-freebsd-questions@FreeBSD.ORG Fri Aug 7 11:47:36 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D23A1065670 for ; Fri, 7 Aug 2009 11:47:36 +0000 (UTC) (envelope-from on@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (mail.cs.ait.ac.th [192.41.170.16]) by mx1.freebsd.org (Postfix) with ESMTP id E211A8FC2E for ; Fri, 7 Aug 2009 11:47:35 +0000 (UTC) Received: from banyan.cs.ait.ac.th (banyan.cs.ait.ac.th [192.41.170.5]) by mail.cs.ait.ac.th (8.13.1/8.13.1) with ESMTP id n77BkkIT041228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Aug 2009 18:46:46 +0700 (ICT) (envelope-from on@cs.ait.ac.th) Received: (from on@localhost) by banyan.cs.ait.ac.th (8.14.3/8.14.3/Submit) id n77BlVom034358; Fri, 7 Aug 2009 18:47:31 +0700 (ICT) (envelope-from on) Date: Fri, 7 Aug 2009 18:47:31 +0700 (ICT) Message-Id: <200908071147.n77BlVom034358@banyan.cs.ait.ac.th> From: Olivier Nicole To: m.seaman@infracaninophile.co.uk In-reply-to: <4A65947B.1070905@infracaninophile.co.uk> (message from Matthew Seaman on Tue, 21 Jul 2009 11:12:11 +0100) References: <200907210458.n6L4wtYC018412@banyan.cs.ait.ac.th> <4A65947B.1070905@infracaninophile.co.uk> X-Virus-Scanned: on CSIM by amavisd-milter (http://www.amavis.org/) Cc: freebsd-questions@freebsd.org Subject: Re: Sendmail to duplicate messages X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2009 11:47:36 -0000 Hi, With some delay... Thanks Matthew, > > What rule, in what file should I set-up to have my mail sendmail mail > > server duplicate all messages to another mail server? > >=20 > > I am in the proces sof setting-up a new mail server; in the meantime I > > want all messages arriving to my current mail server under sendmail to > > be duplicated to the new mail server (under postfix, for all it > > matters); so the mailboxes are keept in sync. > >=20 > > How can I do that with sendmail? > > I believe you should be able to do this with virtusertable. You will nee= > d to > configure the new machine to accept e-mail using a distinct domain so the= > old > server can route e-mail to it, and the new server would need to accept y= > our > actual domain name for delivery too. > > Then you need is a /etc/mail/virtusertable file with contents like so: > > @your-domain.com %@new.your-domain.com > @your-domain.com % I have tried that but virtusertable is a hash table, so it can only have one line of the form @your-domain.com. > Alternately, if your back-end mail store is using IMAP, then you can use > imapsync (ports: mail/imapsync) to duplicate mail account contents from t= > he > old server to the new one. I was looking at that solution too, but it needs the passwords of the users. I ended up with mb2md (/usr/ports/mail/mb2md) that I slightly modified to fix the mode of the files created and to have a filename that suits me more. And I iterate that script on my users list. As I have only 200 users and about 4 GB of mail, it takes only 10 minutes, quite acceptable time. bests, Olivier