Bryan Ischo <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Bryan Ischo wrote:
> >
> > Hi all.
> >
> > I have a somewhat complicated situation for which the simplest solution
> > is
> > a mail relay.  I want a completely open mail relay that will accept mail
> > to be delivered to any domain whatsoever BUT I want it to only relay
> > through> > one destination SMTP host.

[snip]

> Hi again.  If anyone is interested, it is actually quite easy to
> set up qmail to work this way if you hack the source a bit.  The
> source is very well-organized and easy to hack.  I simply #if'ed
> out the place where it checks the rcpthosts file, and the place
> where it checks the locals file.  Viola.  Now I have a qmail
> installation that will accept anything at all and just forward it
> on to the host listed in the smtproutes file.

Hi Bryan,

There is a simpler way: just delete rcpthosts altogether!

However, RELAYCLIENT should work OK even with rcpthosts - it's what I do on
my home network.  I have a Linux box running qmail under tcpserver and allow
relaying from any of the hosts on my internal network (192.168.0.*) by
setting RELAYCLIENT="" in the tcprules file for qmail-smtpd:

127.0.0.:allow,RELAYCLIENT=""
192.168.0.:allow,RELAYCLIENT=""

That, in conjunction with a suitable smtproutes entry should do what you
want.

I notice you're still using inetd; it's honestly worth moving to tcpserver.
There are some sample scripts on the qmail home page, and I believe Dave
Sill's "Living with Qmail" is useful reading.

R.

Reply via email to