On Tue, Jul 31, 2001 at 10:38:07AM +0800, Ami Shamril wrote:
> This server (ServerA) is in our internal network. Now we want to install
> qmail to act only as mail relay server (ServerB) to put in our DMZ. So all
> incoming email will go to ServerB first & ServerB will forward to ServerA.
> Same goes to outgoing email. All outgoing email from ServerA will go to
> ServerB first & ServerB will send it out.
> 
> My questions are
> 1. How to configure qmail to act as mail relay server (ServerB) & how to
> confiruge it to forward all incoming email to ServerA.?

Put all of the domains that ServerA hosts in ServerB's rcpthosts file (but not
in locals or virtualdomains!). Then, for each domain that you just put in
rcpthosts, make an entry in /var/qmail/control/smtproutes like this:

domain.dom:a.b.c.d

where domain.dom is the domain and a.b.c.d is the IP address of ServerA. This
is all you have to do on ServerB, and you don't even have to restart any of the
qmail programs.

> 2. In ServerA, how I want to configure qmail to forward all outgoing email
> go to ServerB?

Put:

:e.f.g.h

in /var/qmail/control/smtproutes, where e.f.g.h is the IP address of ServerB.
This is a wildcard entry that tells qmail-remote on ServerA to skip DNS lookups
and send everything to ServerB.

It's just that easy!

Chris

PGP signature

Reply via email to