From owner-freebsd-questions@FreeBSD.ORG Fri Feb 6 19:00:01 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 2F0A61065672 for ; Fri, 6 Feb 2009 19:00:01 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 728808FC1C for ; Fri, 6 Feb 2009 19:00:00 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl91-225.kln.forthnet.gr [77.49.58.225]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id n16IxoXu017590 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 6 Feb 2009 20:59:56 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n16IxoQ5051308; Fri, 6 Feb 2009 20:59:50 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n16IxnA2051307; Fri, 6 Feb 2009 20:59:49 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: References: Date: Fri, 06 Feb 2009 20:59:49 +0200 In-Reply-To: (Greg Stark's message of "Fri, 6 Feb 2009 13:15:02 -0500") Message-ID: <87vdrns862.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: n16IxoXu017590 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.869, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.53, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No 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:00:01 -0000 On Fri, 6 Feb 2009 13:15:02 -0500, 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? That's what `mailertable' is for. Enable in your `sendmail.mc' file the mailertable feature: FEATURE(`mailertable', `hash /etc/mail/mailertable') Then create an `/etc/mail/mailertable' map with something like: @internal.domain esmtp:[internal.relay.host] Generate the `mailertable.db' map with makemap: # cd /etc/mail # makemap hash mailertable < mailertable and you're done.