Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Feb 2009 20:59:49 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        <Greg.Stark@sungard.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Sendmail to Relay different domains to different hosts
Message-ID:  <87vdrns862.fsf@kobe.laptop>
In-Reply-To: <EE14DD41CD710E48908C707C66E2B4BC03838F09@VOO-EXCHANGE05.internal.sungard.corp> (Greg Stark's message of "Fri, 6 Feb 2009 13:15:02 -0500")
References:  <EE14DD41CD710E48908C707C66E2B4BC03838F09@VOO-EXCHANGE05.internal.sungard.corp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 6 Feb 2009 13:15:02 -0500, <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?

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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87vdrns862.fsf>