Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!zombie.ncsc.mil!news.duke.edu!agate!howland.reston.ans.net!newsfeed.internetmci.com!quanta.com!rsww From: rsww@quanta.com (Ross Walker) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Sendmail to the local host Date: 3 Jan 1996 17:19:10 GMT Organization: Quanta Communications, Inc. Lines: 72 Distribution: inet Message-ID: <4cedqe$qih@news.quanta.com> References: <4brvia$5vr@osprey.unf.edu> <4c495f$f8v@uriah.heep.sax.de> NNTP-Posting-Host: quanta.quanta.com X-Newsreader: TIN [version 1.2 PL2] J Wunsch (j@uriah.heep.sax.de) wrote: : caddy@osprey.unf.edu (Cliff Addy) writes: : > However, if I try to mail to admin@addy.com, : > the mailer complains about that "mail loops back to myself." : Basic configuration error. :-) : You try to alias a mail domain to a host in that domain. : Cw addy.com : is your friend. : (either in your .mc file, or directly in sendmail.cf) I did things a little more involved. I set it up with rewrites, so it can handle all types of domain cases. Here is what I put up top: Cwlocalhost quanta.com mailhost.quanta.com CAquanta.com mwm.com bckyrd.com gswine.com Then down in Ruleset 96 I inserted two entries. (ignore put in here for placement reference) # pass UUCP addresses straight through R$* < @ $+ . UUCP > $* $@ $1 < @ $2 . UUCP . > $3 1) This makes mail to MX domains that have a host part get the host part stripped. # trunc MX domains with hosts R$* < @ $+ . $=A > $* $: $1 < @ $3 . > $4 2) Just below that I put an entry (the middle one) that will turn the stripped entry canonical. # local host aliases and pseudo-domains are always canonical R$* < @ $=w > $* $: $1 < @ $2 . > $3 R$* < @ $* $=A > $* $: $1 < @ $3 . > $4 R$* < @ $* . . > $* $1 < @ $2 . > $3 Then down in Rule Set 98, which is blank from the start for local hacks I have: S98 R$* < @ $=A . > $* $#local $: $1 This one makes the MX domain mail local - and off it goes. That was all she wrote. I have other hacks in the cf file to make all mail coming from hosts inside the local domain get their host part stripped and of course all mail going out also gets the host part stripped. All the hosts forward their mail to the mailhost and then out it goes. For a large network with multiple mailhosts in a load-balance scheme this will need fixed, but it works like a charm right now. If I add a new MX domain I just enter it on the CA line and I know that it will handle the mail correctly. Cheers, Ross Walker -- ------------------------------------------------------------------------------ | /\/ | Ross S. W. Walker (rsww@quanta.com) | \/\ | | | |\ | finger rsww@quanta.com for PGP key _____________________________ | |___|/ | | Quanta Communications, Inc. ------------------------------------------------------------------------------