From owner-freebsd-questions@FreeBSD.ORG Fri Feb 6 19:03:14 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 14D0D1065679 for ; Fri, 6 Feb 2009 19:03:14 +0000 (UTC) (envelope-from steve@ibctech.ca) Received: from ibctech.ca (v6.ibctech.ca [IPv6:2607:f118::b6]) by mx1.freebsd.org (Postfix) with SMTP id A324C8FC08 for ; Fri, 6 Feb 2009 19:03:13 +0000 (UTC) (envelope-from steve@ibctech.ca) Received: (qmail 81562 invoked by uid 89); 6 Feb 2009 19:03:30 -0000 Received: from unknown (HELO ?IPv6:2607:f118::5?) (steve@ibctech.ca@2607:f118::5) by v6.ibctech.ca with ESMTPA; 6 Feb 2009 19:03:30 -0000 Message-ID: <498C896A.6000000@ibctech.ca> Date: Fri, 06 Feb 2009 14:03:06 -0500 From: Steve Bertrand User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Greg.Stark@sungard.com References: In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Sendmail to Relay different domains to different hosts 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, 06 Feb 2009 19:03:14 -0000 Greg.Stark@sungard.com wrote: > I am using Sendmail on a FreeBSD7.0 server as a mail relay for some of > our servers. These servers relay messages to both internal recipients > and external customers. I need to be able to relay mail destined to our > internal domain recipients to our corporate mail servers but relay > everything else out to our usual smart host. So basically, I am > looking to relay emails destined for a certain domain to one host and > the rest of the mail to another. > Does anyone know how I could configure > sendmail to accomplish this? Yes. Take a look at the `mailertable.sample' file. Create an empty 'mailertable' file in /etc/mail, and add the domain-to-server maps to it: corporate.com smtp:relay.corporate.com other.com smtp:some.other.server.com ...and then IIRC: # cd /etc/mail # makemap hash mailertable < mailertable Steve