[comp.unix.aix] sendmail.cf for RS/6000 ??

dwatts@ki.UUCP (Dan Watts) (10/18/90)

Has anybody gotten a sendmail.cf to work on the RS/6000?
Specifically, I've got an SGI which is my UUCP link to the outside world.
Locally, I've got the RS/6000 and a Sun 4.  On the Sun 4, I defined my
SGI as my mail router and all mail to 'user@host' or 'host!user' gets
forwarded on to the SGI for delivery.  Of course, if the host is local,
then the Sun just sends the email via TCP/IP on the Ethernet.

On the RS/6000, I can't make it do this.  The only thing I've been
successful at is 'user@host' or 'host!user' where 'host' is a local
TCP/IP node on the Ethernet.  If I try to send to 'user@remoteohst'
it won't forward.  I tried defining the $U macro like they say, but
that doesn't work.  When I send to 'host!user' I get:

No '@' foudn in SMTP recipient "host!user".

If I try to send to 'user@host' it tries to send the mail via TCP/IP!

Any help would be appreciated.
-- 
#####################################################################
# CompuServe: >INTERNET:uunet.UU.NET!ki!dwatts    Dan Watts         #
# UUCP      : ...!{uunet | wgc386}!ki!dwatts      Ki Research, Inc. #
############### New Dimensions In Network Connectivity ##############

jackv@turnkey.tcc.com (Jack F. Vogel) (10/21/90)

In article <871@ki.UUCP> dwatts@ki.UUCP (Dan Watts) writes:
>
>Has anybody gotten a sendmail.cf to work on the RS/6000?
>Specifically, I've got an SGI which is my UUCP link to the outside world.
>Locally, I've got the RS/6000 and a Sun 4.  On the Sun 4, I defined my
>SGI as my mail router and all mail to 'user@host' or 'host!user' gets
>forwarded on to the SGI for delivery.  Of course, if the host is local,
>then the Sun just sends the email via TCP/IP on the Ethernet.
 
[....this isn't working on the 6000...]

I can appreciate your frustration Dan. The sendmail.cf file shipped with
AIX, and before any of you 6000 support types rise up in revolt this
applies to AIX370 and PS/2 as well :-}, is extremely simpleminded. It
has a chance of working OK on real internet-connected sites but that is
about it. If you are in an increasingly common configuration, where you
have a local domain and its network, but rely on a uucp-style connection
to an internet MX fowarder for all other domain-style addresses, it just
won't work for you as shipped. Basically, you need to do some surgery on
Ruleset Zero.

As shipped any domain-type address, meaning user@host will resolve to the
tcp mailer, what you need to do is circumvent this. What you want in the
sort of configuration I described above is basically to allow anything of
the form 'user@host.mydomain' or 'user@host.mysubdomain.mydomain' to go
ahead and resolve to tcp (assuming you talk smtp to any host in your
domain), but for all other domain addresses to be sent to your internet
forwarder (or what you may call relayhost). This is what we do internally
for locus.com and its subdomains.

Now, what do you need to do concretely? There is no one true way to set
this up, all I can do is give you one example, other schemas are possible,
and unfortunately will require a fairly good understanding of sendmail's
macros and rewrite rules. So, anyway, here goes...

First define a macro for your forwarder:

DRmy_internet_forwarder

And the mailer to use to get there, this might be tcp or uucp depending...

DMuucp

Now, the second to the last rewrite rule in sendmail.cf looks as follows:

R$*<@$+>$*	$#tcp$@$2$:$1<@$2>$3

You want to change this to the following 2 rules:

R$*<@$-.$D>$*	$#tcp$@$2.$D$:$1<@$2.$D>$3	user@host.ourdomain 
# Send all other domain addresses to the relay host
R$*<@$+>$*	$#$M$@$R$:$1<@$2>$3		user@host.otherdomains

You will need to make certain that any unqualified hostname, either in
rewrite rules or via the nameserver gets a fully qualified form before
reaching these rules!

These rules also only cover the simple case where you have a single flat
domain without subdomains, if you do have subdomains as locus.com does things
get more complex. What I would do there is make the D macro into the base
domain, i.e., in our case DDlocus.com. Next define a D class with all
the legal subdomains, eg. CDla sd bos. Then the 2 rules above would then
be changed into 3 rules as follows:

# Handle any subdomain addresses...
R$*<@$-.$=D.$D>$*	$#tcp$@$2.$3.$D$:$1<@$2.$3.$D>$3
# Addresses in the base domain...
R$*<@$-.$D>$*		$#tcp$@$2.$D$:$1<@$2.$D>$3	user@host.ourdomain 
# Send all other domain addresses to the relay host
R$*<@$+>$*	$#$M$@$R$:$1<@$2>$3		user@host.otherdomains

Making these changes should get you running, you might also take a look at
the sendmail.cf on the other machines that are working properly to see how
they implemented things.

>I tried defining the $U macro like they say, but
>that doesn't work.  When I send to 'host!user' I get:
>
>No '@' foudn in SMTP recipient "host!user".
 
Hmmm... From looking over the cf file I would have expected this would work.
You should run sendmail in Address Test Mode and follow the ruleset flow to
determine whats wrong here.

Good Luck, and as always I am available via email for further questions. Also,
you should try IBM support for help if this isn't enough to get you going.

Disclaimer: I rule the mail, but I don't speak for the company :-}.

-- 
Jack F. Vogel			jackv@locus.com
AIX370 Technical Support	       - or -
Locus Computing Corp.		jackv@turnkey.TCC.COM

paul@uxc.cso.uiuc.edu (Paul Pomes - UofIllinois CSO) (10/23/90)

dwatts@ki.UUCP (Dan Watts) writes:

>Has anybody gotten a sendmail.cf to work on the RS/6000?
>Specifically, I've got an SGI which is my UUCP link to the outside world.
>Locally, I've got the RS/6000 and a Sun 4.  On the Sun 4, I defined my
>SGI as my mail router and all mail to 'user@host' or 'host!user' gets
>forwarded on to the SGI for delivery.  Of course, if the host is local,
>then the Sun just sends the email via TCP/IP on the Ethernet.

I found the sendmail/sendmail.cf system as supplied to be more than inadequate.
We've replaced it with the IDA sendmail (V5.65+IDA-1.3.5).  It doesn't work
with frozen config files unless you supply a malloc that doesn't put critical
values in the data segment.  A getpwent.c file that hasn't been linked with
the system malloc is required as well.

What I wouldn't give for a straight 4.3 BSD-reno port for our 6K.  AIX is one
royal pain in the neck.  Btw, the IDA sendmail can be found on uxc.cso.uiuc.edu
in the pub directory.

/pbp
--
         Paul Pomes

I'm official (officially myself).  Accept no substitutes unless they pay cash.

UUCP: {att,iuvax,uunet}!uiucuxc!paul   Internet, BITNET: paul@uxc.cso.uiuc.edu
US Mail:  UofIllinois, CSO, 1304 W Springfield Ave, Urbana, IL  61801-2910

jeffe@sandino.austin.ibm.com (Peter Jeffe 512.823.4091) (10/23/90)

In article <871@ki.UUCP> dwatts@ki.UUCP (Dan Watts) writes:
>I tried defining the $U macro like they say, but
>that doesn't work.  When I send to 'host!user' I get:
>
>No '@' foudn in SMTP recipient "host!user".

I tried posting this several days ago but it got eaten.  So better late
than never: this is a bug in gold sendmail that was fixed in the 9035
build (the September update?).  Basically it complains about any address
that resolves to an smtp mailer but doesn't have an '@' in it.  After
you apply this update, you should be able to use the U macro to route
any uucp addresses (either user@host.uucp or host!user) via your uucp
relay host.

In article <1990Oct20.205159.2866@turnkey.tcc.com> jackv@turnkey.TCC.COM (Jack F. Vogel) writes:
>I can appreciate your frustration Dan. The sendmail.cf file shipped with
>AIX, and before any of you 6000 support types rise up in revolt this
>applies to AIX370 and PS/2 as well :-}, is extremely simpleminded. It
>has a chance of working OK on real internet-connected sites but that is
>about it. If you are in an increasingly common configuration, where you
>have a local domain and its network, but rely on a uucp-style connection
>to an internet MX fowarder for all other domain-style addresses, it just
>won't work for you as shipped. Basically, you need to do some surgery on
>Ruleset Zero.

I don't understand, Jack.  Why don't you use the MX record to point you
to the right host, instead of mucking about with ruleset 0 to kludge it
up?  I can understand if you want to get very granular in your routing,
but for the scenario you describe the nameserver should tell you where
to go.  And if you do want to get fancier, what stock .cf file would do
that for you?

-------------------------------------------------------------------------------
Peter Jeffe   ...uunet!cs.utexas.edu!ibmchs!auschs!sandino.austin.ibm.com!jeffe
        first they want a disclaimer, then they make you pee in a jar,
                   then they come for you in the night

jeffe@sandino.austin.ibm.com (Peter Jeffe 512.823.4091) (10/23/90)

In article <1990Oct22.193236.18485@ux1.cso.uiuc.edu> paul@uxc.cso.uiuc.edu (Paul Pomes - UofIllinois CSO) writes:
>I found the sendmail/sendmail.cf system as supplied to be more than inadequate.
>We've replaced it with the IDA sendmail (V5.65+IDA-1.3.5).

Hmmm, Paul, I'm sort of confused as to what you find so terrible about AIX3's
sendmail?  It's real close to 5.61 with several enhancements that I think are
not too shabby.  So please enlighten me as to what is in IDA's 5.65 that you
like so much more, and we'll do our best to get it into the next release!

-------------------------------------------------------------------------------
Peter Jeffe   ...uunet!cs.utexas.edu!ibmchs!auschs!sandino.austin.ibm.com!jeffe
        first they want a disclaimer, then they make you pee in a jar,
                   then they come for you in the night

jackv@turnkey.tcc.com (Jack F. Vogel) (10/24/90)

In article <3973@awdprime.UUCP> jeffe@sandino.austin.ibm.com (Peter Jeffe 512.823.4091) writes:
 
[ with regard to my suggestion to change Ruleset Zero to use relayhost...]
 
>I don't understand, Jack.  Why don't you use the MX record to point you
>to the right host, instead of mucking about with ruleset 0 to kludge it
>up?  I can understand if you want to get very granular in your routing,
>but for the scenario you describe the nameserver should tell you where
>to go.  And if you do want to get fancier, what stock .cf file would do
>that for you?
 
Well, for one thing, what if a small network/domain doesn't use a nameserver?
They might well be able to maintain a small host file. Also, maybe its just
my lack of experience in configuring a non-internet nameserver (meaning one
not talking to the real root nameservers), but is this sort of thing really
doable? The configuration I was thinking of is where what we want to do is
pass all domain addresses not in our domain via uucp to, say, uunet. Now
how is the nameserver supposed to be set up to give you an MX to something
that you don't talk SMTP to?? Should you just have some sort of wildcard
for anything outside my SOA pointing at uunet and then when my nameserver
fails to resolve that A record sendmail figures out its a uucp link?? As I
said, maybe this is just due to my lack of expertise using the nameserver,
please enlighten me, if this can be done we could change things for locus.com.

Disclaimer: I speak for myself, not LCC or IBM.

-- 
Jack F. Vogel			jackv@locus.com
AIX370 Technical Support	       - or -
Locus Computing Corp.		jackv@turnkey.TCC.COM

gs26@prism.gatech.EDU (Glenn R. Stone) (10/24/90)

In <1990Oct23.175522.10472@turnkey.tcc.com> jackv@turnkey.tcc.com (Jack F. Vogel) writes:

>In article <3973@awdprime.UUCP> jeffe@sandino.austin.ibm.com (Peter Jeffe 512.823.4091) writes:
> 
>[ with regard to my suggestion to change Ruleset Zero to use relayhost...]
> 
>>I don't understand, Jack.  Why don't you use the MX record to point you
>>to the right host, instead of mucking about with ruleset 0 to kludge it
>>up?
>Well, for one thing, what if a small network/domain doesn't use a nameserver?
.... among other things...

I run a small cluster (soon to be its own subnet) of 6k's hung off gatech's
broadband.  I have found that it's much easier to just not fool with named
at all, and just let remote nameservers do the work (if you have access to 
them) or dump mail off to an appropriate smart-host (if not).  That way
you only have one config file to muck with, ergo only one place things
can go wrong.  Occam's razor (aka the KISS principle {keep it simple, stupid})
applies.  'sides, there's plenty more people who mess with sendmail out
here on the net that can help out than those who diddle with such vagaries
as named... sendmail's even big enough to have it's own group. 

(pardon the grammar, after talking C and sendmail most of the day, it's hard to 
 think like an ordinary critter :)

-- Glenn Stone
gs26@prism.gatech.edu, glenns@eas.gatech.edu

shawn@jdyx.UUCP (Shawn Hayes) (10/24/90)

    Help!!  I'm trying to bring an RS/6000 into an ethernet network of
HP 9000s and X Terminals and I'm having lot's of problems.  I managed to
get the IBM on the network so that we could do rlogins and everything seemed
fine.  Then we had to move the HPs for a class.  Now that everything is back
in place the IBM won't talk anymore.  

   I've added the various host names through SMIT, brought up TCP/IP and the
various deamons but I'm still having troubles.  When I try to do an rlogin
from the IBM to an HP I get the message "No route to host".  If I try to
do an rlogin from the IBM to itself I get the message "Permission denied."
And finally if I try to rlogin to the IBM through the loopback host it works
fine.   Anyone have any suggestions???

Shawn

paul@uxc.cso.uiuc.edu (Paul Pomes - UofIllinois CSO) (10/25/90)

jeffe@sandino.austin.ibm.com (Peter Jeffe 512.823.4091) writes:

>Hmmm, Paul, I'm sort of confused as to what you find so terrible about AIX3's
>sendmail?  It's real close to 5.61 with several enhancements that I think are
>not too shabby.  So please enlighten me as to what is in IDA's 5.65 that you
>like so much more, and we'll do our best to get it into the next release!

I'd really like to follow up via email but things look to be very screwed up
on your DNS server and mail machine:

% mx sandino.austin.ibm.com
sandino.austin.ibm.com  preference = 10,
	mail exchanger = cs.utexas.edu.austin.ibm.com

OK, let the contact for the austin.ibm.com zone know about it:

Date:    Wed, 24 Oct 90 14:37:40 CDT
To:      <paul@ux2.cso.uiuc.edu>
From:    MAILER-DAEMON@test.austin.ibm.com (Mail Delivery Subsystem)
Subject: Returned mail: Service unavailable

   ----- Transcript of session follows -----
>>> HELO test.austin.ibm.com
<<< 553 test.austin.ibm.com Do not communicate with self
554 <root@austin.ibm.com>... Service unavailable: No such file or directory

   ----- Unsent message follows -----
Received: by test.austin.ibm.com (AIX  2.1 2/4.03)
          id AA01576; Wed, 24 Oct 90 14:37:40 CDT
Received: by ux2.cso.uiuc.edu id AA13474
  (5.65+/IDA-1.3.5 for root@austin.ibm.com); Wed, 24 Oct 90 19:37:16 GMT
Date: Wed, 24 Oct 90 19:37:16 GMT
From: Paul Pomes <paul@ux2.cso.uiuc.edu>
Message-Id: <9010241937.AA13474@ux2.cso.uiuc.edu>
To: root@austin.ibm.com
Subject: missing period in DNS records

Try printing the MX record for sandino.austin.ibm.com .

/pbp
--
         Paul Pomes

UUCP: {att,iuvax,uunet}!uiucuxc!paul   Internet, BITNET: paul@uxc.cso.uiuc.edu
US Mail:  UofIllinois, CSO, 1304 W Springfield Ave, Urbana, IL  61801-2910

jeffe@sandino.austin.ibm.com (Peter Jeffe 512.823.4091) (10/26/90)

In article <1990Oct23.175522.10472@turnkey.tcc.com> jackv@turnkey.TCC.COM (Jack F. Vogel) writes:
>> [ my suggestion to use MX records rather than hacking ruleset 0 ]
>
>Well, for one thing, what if a small network/domain doesn't use a nameserver?

Then they definitely can't query it for MX records :-)

>The configuration I was thinking of is where what we want to do is
>pass all domain addresses not in our domain via uucp to, say, uunet.

Ahhh, so sorry.  If you're trying to get out using uucp there's no way
the MX can get you there directly; sendmail will try to connect() to
whomever it's pointed to by the MX record.  But there's still a way to
do this if you designate a gateway host and point to it with the MX;
then all he needs to do is understand how to deal with the mail.  This
may be a better solution in terms of maintenance, and there may well be
a better solution than this, but I can't think of it.

In any case, I will recommend that AIX include optional rules that pass
unknown addresses to a relay host, since this seems to be a popular
mail configuration, and we should have a way of doing this without the
user having to do major rewrite rule hacking.

-------------------------------------------------------------------------------
Peter Jeffe   ...uunet!cs.utexas.edu!ibmchs!auschs!sandino.austin.ibm.com!jeffe
        first they want a disclaimer, then they make you pee in a jar,
                   then they come for you in the night