add DontExpandCnames option -- IETF seems to be moving in this direction
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 11 Jun 1995 09:22:46 +0000 (01:22 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 11 Jun 1995 09:22:46 +0000 (01:22 -0800)
SCCS-vsn: usr.sbin/sendmail/src/domain.c 8.43
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 8.101
SCCS-vsn: usr.sbin/sendmail/cf/m4/proto.m4 8.80
SCCS-vsn: usr.sbin/sendmail/cf/README 8.64
SCCS-vsn: usr.sbin/sendmail/doc/op/op.me 8.57

usr/src/usr.sbin/sendmail/cf/README
usr/src/usr.sbin/sendmail/cf/m4/proto.m4
usr/src/usr.sbin/sendmail/doc/op/op.me
usr/src/usr.sbin/sendmail/src/domain.c
usr/src/usr.sbin/sendmail/src/readcf.c

index 25b02d0..246f711 100644 (file)
@@ -4,7 +4,7 @@
 
                Eric Allman <eric@CS.Berkeley.EDU>
 
 
                Eric Allman <eric@CS.Berkeley.EDU>
 
-               @(#)README      8.63 (Berkeley) %G%
+               @(#)README      8.64 (Berkeley) %G%
 
 
 This document describes the sendmail configuration files being used
 
 
 This document describes the sendmail configuration files being used
@@ -1386,6 +1386,20 @@ confMAX_QUEUE_RUN_SIZE   MaxQueueRunSize If set, limit the maximum size of any
                                        so this should be as large as your
                                        system can tolerate.  If not set, there
                                        is no limit.
                                        so this should be as large as your
                                        system can tolerate.  If not set, there
                                        is no limit.
+confDONT_EXPAND_CNAMES DontExpandCnames
+                                       If set, $[ ... $] lookups that do DNS
+                                       based lookups do not expand CNAME
+                                       records.  This currently violates the
+                                       published standards, but the IETF
+                                       seems to be moving toward legalizing
+                                       this.  For example, if "FTP.Foo.ORG"
+                                       is a CNAME for "Cruft.Foo.ORG", then
+                                       with this option set a lookup of
+                                       "FTP" will return "FTP.Foo.ORG"; if
+                                       clear it returns "Cruft.FOO.ORG".  N.B.
+                                       you may not see any effect until your
+                                       downstream neighbors stop doing CNAME
+                                       lookups as well.
 
 
 +-----------+
 
 
 +-----------+
index 9765a21..fd20ec4 100644 (file)
@@ -8,7 +8,7 @@ divert(-1)
 #
 divert(0)
 
 #
 divert(0)
 
-VERSIONID(`@(#)proto.m4        8.79 (Berkeley) %G%')
+VERSIONID(`@(#)proto.m4        8.80 (Berkeley) %G%')
 
 MAILER(local)dnl
 
 
 MAILER(local)dnl
 
@@ -367,6 +367,9 @@ _OPTION(ColonOkInAddr, `confCOLON_OK_IN_ADDR')
 # how many jobs can you process in the queue?
 _OPTION(MaxQueueRunSize, `confMAX_QUEUE_RUN_SIZE', 10000)
 
 # how many jobs can you process in the queue?
 _OPTION(MaxQueueRunSize, `confMAX_QUEUE_RUN_SIZE', 10000)
 
+# shall I avoid expanding CNAMEs (violates protocols)?
+_OPTION(DontExpandCnames, `confDONT_EXPAND_CNAMES')
+
 ###########################
 #   Message precedences   #
 ###########################
 ###########################
 #   Message precedences   #
 ###########################
index e2f4429..2e9f402 100644 (file)
@@ -4,7 +4,7 @@
 .\"
 .\" %sccs.include.redist.roff%
 .\"
 .\"
 .\" %sccs.include.redist.roff%
 .\"
-.\"    @(#)op.me       8.56 (Berkeley) %G%
+.\"    @(#)op.me       8.57 (Berkeley) %G%
 .\"
 .\" eqn op.me | pic | troff -me
 .eh 'SMM:08-%''Sendmail Installation and Operation Guide'
 .\"
 .\" eqn op.me | pic | troff -me
 .eh 'SMM:08-%''Sendmail Installation and Operation Guide'
@@ -43,7 +43,7 @@ University of California, Berkeley
 Mammoth Project
 eric@CS.Berkeley.EDU
 .sp
 Mammoth Project
 eric@CS.Berkeley.EDU
 .sp
-Version 8.56
+Version 8.57
 .sp
 For Sendmail Version 8.7
 .)l
 .sp
 For Sendmail Version 8.7
 .)l
@@ -4392,6 +4392,24 @@ Units default to seconds, so
 uses a five second delay.
 Defaults to zero
 (no retry).
 uses a five second delay.
 Defaults to zero
 (no retry).
+.ip DontExpandCnames
+[no short name]
+The standards say that all host addresses used in a mail message
+must be fully canonical.
+For example, if your host is named
+.q Cruft.Foo.ORG
+and also has an alias of
+.q FTP.Foo.ORG ,
+the former name must be used at all times.
+This is enforced during host name canonification
+($[ ... $] lookups).
+If this option is set, the protocols are ignored and the
+.q wrong
+thing is done.
+However, the IETF is moving toward changing this standard,
+so the behaviour may become acceptable.
+Please note that hosts downstream may still rewrite the address
+to be the true canonical name however.
 .ip DontPruneRoutes
 [R]
 Normally,
 .ip DontPruneRoutes
 [R]
 Normally,
@@ -7414,7 +7432,7 @@ A transcript of the current session.
 .\"Eric Allman
 .\"Britton-Lee, Inc.
 .\".sp
 .\"Eric Allman
 .\"Britton-Lee, Inc.
 .\".sp
-.\"Version 8.56
+.\"Version 8.57
 .\".ce 0
 .bp 2
 .rs
 .\".ce 0
 .bp 2
 .rs
index d73d3c4..3e559a1 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #if NAMED_BIND
 
 #ifndef lint
 #if NAMED_BIND
-static char sccsid[] = "@(#)domain.c   8.42 (Berkeley) %G% (with name server)";
+static char sccsid[] = "@(#)domain.c   8.43 (Berkeley) %G% (with name server)";
 #else
 #else
-static char sccsid[] = "@(#)domain.c   8.42 (Berkeley) %G% (without name server)";
+static char sccsid[] = "@(#)domain.c   8.43 (Berkeley) %G% (without name server)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -620,6 +620,13 @@ cnameloop:
                                continue;
 
                          case T_CNAME:
                                continue;
 
                          case T_CNAME:
+                               if (DontExpandCnames)
+                               {
+                                       /* got CNAME -- guaranteed canonical */
+                                       amatch = TRUE;
+                                       break;
+                               }
+
                                if (loopcnt++ > MAXCNAMEDEPTH)
                                {
                                        /*XXX should notify postmaster XXX*/
                                if (loopcnt++ > MAXCNAMEDEPTH)
                                {
                                        /*XXX should notify postmaster XXX*/
index c2866b2..8ec2261 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)readcf.c   8.100 (Berkeley) %G%";
+static char sccsid[] = "@(#)readcf.c   8.101 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -1324,6 +1324,8 @@ struct optioninfo
 /*
        "MaxDaemonChildren",    O_MAXCHILDREN,  FALSE,
 */
 /*
        "MaxDaemonChildren",    O_MAXCHILDREN,  FALSE,
 */
+#define O_KEEPCNAMES   0x8e
+       "DontExpandCnames",     O_KEEPCNAMES,   FALSE,
 
        NULL,                   '\0',           FALSE,
 };
 
        NULL,                   '\0',           FALSE,
 };
@@ -1961,6 +1963,11 @@ setoption(opt, val, sticky)
 
          case O_MAXCHILDREN:   /* max # of children of daemon */
                MaxChildren = atoi(val);
 
          case O_MAXCHILDREN:   /* max # of children of daemon */
                MaxChildren = atoi(val);
+               break;
+
+         case O_KEEPCNAMES:    /* don't expand CNAME records */
+               DontExpandCnames = atobool(val);
+               break;
 
          default:
                if (tTd(37, 1))
 
          default:
                if (tTd(37, 1))