Path: utzoo!attcan!uunet!lll-winken!elroy.jpl.nasa.gov!turnkey!jackv From: jackv@turnkey.tcc.com (Jack F. Vogel) Newsgroups: comp.unix.aix Subject: Re: sendmail.cf for RS/6000 ?? Message-ID: <1990Oct20.205159.2866@turnkey.tcc.com> Date: 20 Oct 90 20:51:59 GMT References: <871@ki.UUCP> Reply-To: jackv@turnkey.TCC.COM (Jack F. Vogel) Organization: Turnkey Computer Consultants, Westchester, CA Lines: 93 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