On Tue, Apr 06, 1999 at 11:44:15AM +0200, Anders Fristedt wrote:
> Hi,
> 
> sorry for any newbie errors (better safe than sorry!).
> 
> I'd like to configure qmail to relay incoming AND outgoing
> mailconnections.
> 
> To configure it to do either of these two services is simple enough. But I
> can't see how to configure qmail to bi-directional relaying without
> loosing the security and control over my mailserver, that is withour
> permitting anyone to use my mailserver for spamming, etc.
> 
> Typically I's like to forward any mail from "the internet" to an internal
> mailserver. AND mail from the internal mailserver according to DNS
> lookups.
> 
> could anyone please crack the nut for me?

So the idea is that this is a border machine, relaying outgoing mail out from
the inside, and incoming mail in from the outside, but having no local or
virtual domains of its own?

If that's the general idea, add all of your domains to rcpthosts but *not* to
locals or virtualdomains. Your locals and virtualdomains files should be empty.
For each of your domains, add an entry to smtproutes like this:

your.domain.name:your.internal.mail.host

The rcpthosts entries will ensure that mail for your domains will be accepted
from anywhere, and the smtproutes entries will make qmail-remote skip DNS
lookups for your domains and just send everything to your internal mail server.  

The above covers relaying from the outside to the inside. You can set up
selective relaying in the normal way to allow relaying from the inside to the
outside.

Chris

Reply via email to