From owner-freebsd-questions@FreeBSD.ORG Tue Jul 21 10:12:47 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 2C8C5106567A for ; Tue, 21 Jul 2009 10:12:47 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id A624C8FC08 for ; Tue, 21 Jul 2009 10:12:46 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id n6LACIto025070; Tue, 21 Jul 2009 11:12:19 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp.infracaninophile.co.uk n6LACIto025070 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1248171139; bh=2usE5D2zflQHuv1sr5gMyAGLsJc9seLtSxEf6aYEHDA=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Cc:Content-Type:Date:From:In-Reply-To: Message-ID:Mime-Version:References:To; z=Message-ID:=20<4A65947B.1070905@infracaninophile.co.uk>|Date:=20T ue,=2021=20Jul=202009=2011:12:11=20+0100|From:=20Matthew=20Seaman= 20|Organization:=20Infracaninophi le|User-Agent:=20Thunderbird=202.0.0.22=20(X11/20090625)|MIME-Vers ion:=201.0|To:=20Olivier=20Nicole=20|CC:=20freebs d-questions@freebsd.org|Subject:=20Re:=20Sendmail=20to=20duplicate =20messages|References:=20<200907210458.n6L4wtYC018412@banyan.cs.a it.ac.th>|In-Reply-To:=20<200907210458.n6L4wtYC018412@banyan.cs.ai t.ac.th>|X-Enigmail-Version:=200.95.6|Content-Type:=20multipart/si gned=3B=20micalg=3Dpgp-sha256=3B=0D=0A=20protocol=3D"application/p gp-signature"=3B=0D=0A=20boundary=3D"------------enig356CB6C20DB70 7E1F4D2F8B3"; b=MnpaYwmcmbEQ6xOIctSZBevC9oNkuh+rDmQrviQVe4KLPpKe5kDU/gs/P4qTGvsYm D4U4dl27GltBvPuBxDi4XfRzukgtJQx4OP4ifN9HhnKVncs69ThI3D6Oz+UYCiSNSd +bL8CRrY7wHvncgdodZ7UrtaVLMoSqDMPo1vO+NI= X-Authentication-Warning: happy-idiot-talk.infracaninophile.co.uk: Host localhost [IPv6:::1] claimed to be happy-idiot-talk.infracaninophile.co.uk Message-ID: <4A65947B.1070905@infracaninophile.co.uk> Date: Tue, 21 Jul 2009 11:12:11 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.22 (X11/20090625) MIME-Version: 1.0 To: Olivier Nicole References: <200907210458.n6L4wtYC018412@banyan.cs.ait.ac.th> In-Reply-To: <200907210458.n6L4wtYC018412@banyan.cs.ait.ac.th> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig356CB6C20DB707E1F4D2F8B3" X-Virus-Scanned: clamav-milter 0.95.2 at happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk 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: Tue, 21 Jul 2009 10:12:47 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig356CB6C20DB707E1F4D2F8B3 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Olivier Nicole wrote: > Hi, >=20 > 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 % This should have the effect that e-mail for 'foo@your-domain.com' is delivered to 'foo@new.your-domain.com' (your new mail server) and to 'foo' -- a local username on the old server. This should only modify the= envelope addresses, not rewrite the headers in the message itself. You might need to add=20 VIRTUSER_DOMAIN(`your-domain.com') to your $(hostname).mc file, but it should just work with the standard freebsd.mc configuration, so long as 'your-domain.com' appears in /etc/ma= il/local-host-names. For more information see entries matching=20 virtusertable in /usr/share/sendmail/cf/README 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. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig356CB6C20DB707E1F4D2F8B3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkpllIIACgkQ8Mjk52CukIwG8ACcC4wMCzFmxf9JEM3vkuq8/LjT PFUAn2c2WJK01OBGLSVw8YjD63I3rxem =+9Gz -----END PGP SIGNATURE----- --------------enig356CB6C20DB707E1F4D2F8B3--