From owner-freebsd-questions@FreeBSD.ORG Tue Jul 31 22:19:18 2007 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 3164416A418 for ; Tue, 31 Jul 2007 22:19:18 +0000 (UTC) (envelope-from ccowart@hal.rescomp.berkeley.edu) Received: from rescomp.berkeley.edu (hal.Rescomp.Berkeley.EDU [169.229.70.150]) by mx1.freebsd.org (Postfix) with ESMTP id 1943A13C458 for ; Tue, 31 Jul 2007 22:19:18 +0000 (UTC) (envelope-from ccowart@hal.rescomp.berkeley.edu) Received: by rescomp.berkeley.edu (Postfix, from userid 1225) id C18B695A02; Tue, 31 Jul 2007 15:19:17 -0700 (PDT) Date: Tue, 31 Jul 2007 15:19:17 -0700 From: Christopher Cowart To: Michael Grant Message-ID: <20070731221917.GD5107@rescomp.berkeley.edu> Mail-Followup-To: Michael Grant , FreeBSD Questions References: <62b856460707311103j5e648552kdeb1eba9ecff06e1@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Hmb9n29fjuiORm2l" Content-Disposition: inline In-Reply-To: <62b856460707311103j5e648552kdeb1eba9ecff06e1@mail.gmail.com> Organization: RSSP-IT, UC Berkeley User-Agent: Mutt/1.5.9i Cc: FreeBSD Questions Subject: Re: relaying mail 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, 31 Jul 2007 22:19:18 -0000 --Hmb9n29fjuiORm2l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 31, 2007 at 08:03:50PM +0200, Michael Grant wrote: > In one of my domains, I have the MX record for it set up to my server. > But for one of the users within that domain, their mail needs to be > shuffled off to a different server at google. But I can't just > forward it because it's like an MX host I'd need to forward it to. > And I can't alter the MX to point to google for the entire domain > because it's only one user within that domain, the other users will be > screwed in that case. >=20 > For example, mydomain.com, let's say the mx for that comes to my box. > For joe@mydomain.com, I need to send his mail to ASPMX.L.GOOGLE.COM as > if it were the MX for mydomain.com. >=20 > In the old days, one would simply forward email to > joe%mydomain.com@ASPMX.L.GOOGLE.COM. That would cause mydomain.com's > sendmail to connect to ASPMX.L.GOOGLE.COM and shove down a message for > joe@mydomain.com. But that seems long deprecated because it didn't > seem to work. >=20 > I am using sendmail and procmail. Can anyone think of some way I can > cause something like this to happen for just one user, ideally in a > .procmailrc file? We use postfix and transport maps to accomplish this for internal mail routing (bugzilla and RT messages go to an internal web server, user messages to our internal mailserver). The map would look something like: joe@mydomain.com smtp:[ASPMX.L.GOOGLE.COM] mydomain.com local I don't know how to accomplish similar routing with sendmail. In order to solve this completely at the user level, you could write a little bit of perl that opens an SMTP connection to the server of your choosing. You could then use .forward or .procmailrc or whatever to pipe the incoming messages to this script.=20 Good luck, --=20 Chris Cowart Lead Systems Administrator Network & Infrastructure Services, RSSP-IT UC Berkeley --Hmb9n29fjuiORm2l Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFGr7VlV3SOqjnqPh0RAkJmAKCZN+FfeEouT05VuqtO2nDODwz+9ACeOAYB 6s8Lq4wIk/pVTR0C0XzewSQ= =g+7x -----END PGP SIGNATURE----- --Hmb9n29fjuiORm2l--