demco@relay.ubc.ca (John Demco) (08/13/88)
I ran into the same problem here, i.e. the canonicalizing operator not canonicalizing the way I expected. I too wanted to use Doug Alan's suggestion about a.b.c. resolving to a.b.c if a.b.c is known to the nameserver, in order to decide whether to route via the Internet or by some other means. What I noticed in sendmail 5.59 is that the search in getcanonname() is explicitly for the CNAME resource record. In previous versions the search had been a wildcard search, so even if there was no CNAME record you would get back the actual name from some resource record. I also explicitly set the default domain name to "." in /etc/resolv.conf. to avoid the possibility of returning incorrect names from the wildcard search. You could probably manage the same thing in getcanonname(), perhaps by turning off the RES_DEFNAMES resolver option, or by using res_mkquery() and res_send() instead of using res_search(). I hope this is some help. Please let me know if you find a better method. John Demco demco@ean.ubc.ca CDNnet Headquarters userjcd2@ubcmtsg.bitnet University of British Columbia ...!ubc-cs!ean.ubc.ca!demco 309 - 6356 Agricultural Road +1 604-228-6537 Vancouver, B.C. Canada V6T 1W5