aggarwal@jvnc.net (Vikas Aggarwal) (05/08/91)
I am running the MX version of sendmail from Berkeley on a Sun system. What exactly is the '$[name$]' rule supposed to do ? The paper (written sometime in 1987) says that it replaces the `name' with the cname, and I was hoping that it would do the same for the MX entries. However, in address test mode, if I just add the following rule to ruleset 0, R$*<@$*>$* $:$1<@$[$2$]>$3 even though it does a proper ANY query from the nameserver, it doesn't replace the '$2' with the MX entry for '$2' - any idea if its supposed to or what I am supposed to do to make it replace the '$2' with the MX entry ? Grrr,,, these cryptic unix developers.... -vikas vikas@jvnc.net (609) 258-2403 --------------------------------------------------------------------------
rickert@mp.cs.niu.edu (Neil Rickert) (05/08/91)
In article <1991May7.190309.26723@jvnc.net> vikas@r2d2.jvnc.net (Vikas Aggarwal) writes: >I am running the MX version of sendmail from Berkeley on a Sun system. > >What exactly is the '$[name$]' rule supposed to do ? The paper (written >sometime in 1987) says that it replaces the `name' with the cname, and >I was hoping that it would do the same for the MX entries. It is supposed to return the official name of the domain, or the original argument if the nameserver does not recognize the name. Thus if you use: $[ SRI-NIC.ARPA $] you should get: NIC.DDN.MIL (always assuming that CNAME records is present). Likewise, if there is an MX record for 'foo.your.domain', and if you built sendmail with NO_WILDCARD_MX defined, then: $[ foo $] should return: foo.your.domain >However, in address test mode, if I just add the following rule to >ruleset 0, > >R$*<@$*>$* $:$1<@$[$2$]>$3 > >even though it does a proper ANY query from the nameserver, it doesn't >replace the '$2' with the MX entry for '$2' - any idea if its supposed >to or what I am supposed to do to make it replace the '$2' with the >MX entry ? That is because it is not supposed to make such a replacement. If it did so all kinds of bad things would happen, such as iteratively looking up the MX of the MX. Or of rewriting the address 'postmaster@foo.your.domain' as 'postmaster@bar.your.domain' just because you (in host 'bar') are trying to do MX forwarding for 'foo'. If there is an MX record, say: foo.your.domain. MX 10 bar.other.domain. then sendmail uses this when it establishes the connection. In otherwords, when your mailer selection rules say to forward the message to domain 'foo.bar.domain', sendmail at that time looks up MX records, and attempts to send to the best preference MX host, or if this fails to the next, etc. >Grrr,,, these cryptic unix developers.... They are just following what the RFCs call for. -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science <rickert@cs.niu.edu> Northern Illinois Univ. DeKalb, IL 60115 +1-815-753-6940