Subject: Re: Sendmail in weird environment
To: None <port-mac68k@netbsd.org>
From: Chris Brown <cblist@cityb.net>
List: port-mac68k
Date: 11/02/1999 16:02:24
On Tue, Nov 02, 1999 at 09:29:31AM -0800, David A. Gatwood wrote:
> On Tue, 2 Nov 1999, Jon Lindgren wrote:
>
> > > > Problem is all my scripts call sendmail and send-mail bone-headedly
> > > > assumes that it shouldn't use smtp for delivering messages to local users,
> > > > even if I specify a FQDN. I've tried every parameter I could think of
> > > > trying to override this behaviour and force it to use smtp for local users
> > > > to no avail.
> >
> > Wouldn't this create a looping type of problem? If the local sendmail
> > uses smtp to deliver locally, it would connect with itself in a loop. Or
> > did I miss something?
>
> Only if sendmail were actuallly running as a background daemon. What I'm
> trying to do is have ssh port forwarding listening on that port instead.
> Thus, in effect, mklinux.org's sendmail is listening on the SMTP port
> instead. There is no reason to deliver anything locally on ftp2 (except
> perhaps root's mail, but... I'll even take that forwarded if it
> simiplifies things.
>
David, thinking about this last night I thought of something else you might
try -- set the "Smart relay" host in sendmail.cf:
# "Smart" relay host (may be null)
DSlocalhost:2525
Then setup ssh to forward port 2525 on the local machine to port 25 on the
remote machine. All non-local mail is forwarded through the smart relay, if
set. Local mail can be forwarded through it as well by using /etc/aliases
or /etc/mail/virtusertable .
As an alternative, to only forward mail to the mklinux.org domain you could do
something like the following in /etc/mail/virtusertable :
@mklinux.org @localhost:2525
Again, then you would use ssh to forward from port 2525 on the local
machine to port 25 on the remote machine.
I have no clue if either of these massive kludges will work, but give them a
try :)