Re: QMail as open relay

1999-09-27 Thread Robin Bowes

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.




Re: QMail as open relay

1999-09-27 Thread Bryan Ischo

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.
> 
> We are setting up a "temporary" mail relay which catches mail sent to
> the address of a mail server which is no longer the MX for our site, but
> which may have mail sent to it by sites whose DNS hasn't updated to our
> new MX records yet.  I simply want our relay system to accept any mail
> whatsoever, destined for anybody whatsoever (in essense, an "open
> relay")
> but relay all mail directly to our real mail server.  The real mail
> server will handle the virtual domains, and bouncing mail, etc, all
> itself.
> 
> Is there an easy way to set qmail up this way?  I set the smtproutes
> file
> to route mail to the new mail server, and everything works for our
> actual domain (plumbdesign.com) as I have plumbdesign.com in the "me"
> file of the relay.  The problem comes with virtual domains - I don't
> want to have to
> set up virtual domains on the relay server just to have it route mail
> for those domains; I just want it to catch all mail destined for anybody
> and relay the mail to the real mail server, letting the real mail server
> handle virtual domains and bounces, etc.
> 
> In order to cause our qmail-smtpd to accept mail destined for any host
> whatsoever, I set the "RELAYCLIENT" environment variable in the shell
> that runs qmail-smtpd from inetd.

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.

Thanks, and best wishes,
Bryan

-- 

Bryan Ischop l u m b d e s i g n
[EMAIL PROTECTED]http://www.plumbdesign.com



QMail as open relay

1999-09-27 Thread Bryan Ischo

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.

We are setting up a "temporary" mail relay which catches mail sent to
the address of a mail server which is no longer the MX for our site, but
which may have mail sent to it by sites whose DNS hasn't updated to our
new MX records yet.  I simply want our relay system to accept any mail
whatsoever, destined for anybody whatsoever (in essense, an "open
relay")
but relay all mail directly to our real mail server.  The real mail
server will handle the virtual domains, and bouncing mail, etc, all
itself.

Is there an easy way to set qmail up this way?  I set the smtproutes
file
to route mail to the new mail server, and everything works for our
actual domain (plumbdesign.com) as I have plumbdesign.com in the "me"
file of the relay.  The problem comes with virtual domains - I don't
want to have to
set up virtual domains on the relay server just to have it route mail
for those domains; I just want it to catch all mail destined for anybody
and relay the mail to the real mail server, letting the real mail server
handle virtual domains and bounces, etc.

In order to cause our qmail-smtpd to accept mail destined for any host
whatsoever, I set the "RELAYCLIENT" environment variable in the shell
that runs qmail-smtpd from inetd.

Here is an example bounce message:


Return-Path: 
Received: by plumbdesign.com (SMI-8.6/SMI-SVR4) id KAA24448; Mon, 27 Sep
1999 10:39:40 -0400
Message-ID: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 24435 invoked by alias); 27 Sep 1999 14:39:39 -
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 24430 invoked for bounce); 27 Sep 1999 14:39:38 -
Date: 27 Sep 1999 14:39:38 -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: failure notice
Content-Type: text
Content-Length: 891


Hi. This is the qmail-send program at plumbdesign.com.
I'm afraid I wasn't able to deliver your message to the following
addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<[EMAIL PROTECTED]>:
Sorry. Although I'm listed as a best-preference MX or A for that host,
it isn't in my control/locals file, so I don't treat it as local.
(#5.4.6)

--- Below this line is a copy of the message.

Return-Path: <[EMAIL PROTECTED]>
Received: (qmail 24428 invoked from network); 27 Sep 1999 14:39:38 -
Received: from kelvin.plumbdesign.com (HELO plumbdesign.com)
(209.116.169.97)
  by level.plumbdesign.com with SMTP; 27 Sep 1999 14:39:38 -
Received: (qmail 2046 invoked from network); 27 Sep 1999 14:40:41 -
Received: from millennium.plumbdesign.com ([EMAIL PROTECTED])
  by kelvin.plumbdesign.com with SMTP; 27 Sep 1999 14:40:41 -
This is a test.


So to distill my question down to something very simple:

How can I configure qmail to relay all mail, regardless of the
destination, to another mail host?  Or is there a better way to
do what I am trying to do?

Thanks,
Bryan

-- 

Bryan Ischop l u m b d e s i g n
[EMAIL PROTECTED]http://www.plumbdesign.com