[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: smtp; 500 (nameserver data inconsistency ...

> Matti,

	(Again I am sending privately addressed mail to the list,
	 but this issue has wider interest, I believe.)

> I get this bounce (zmailer 2.99.45):
> > <smtp isg_nw.cs.uni-magdeburg.de deussen@isg_nw.cs.uni-magdeburg.de 326>: ...\
> > 	expired after 3 days, problem was:
> > 	smtp; 500 (nameserver data inconsistency. No MX, no address: 'isg_nw.cs.uni-magdeburg.de', errno=Error 0)
> but there is an A record for isg_nw.cs.uni-magdeburg.de:

	UNDERSCORE in the hostname ?  Gee...

	You see, the lattest resolver codes by Paul Vixie et.al. make
	that instantly rejected target...  The  gethostbyname()  routine
	yields NULL.  (I am presuming you are using 'bundled libresolv')
	(The RFCs of the DNS tell that the character set is:
		".", "-", "A"-"Z", "a"-"z", "0"-"9"
	 and it definitely does not contain underscore..)

	Testing that underscorefull address at DEC UNIX 4.0 configured
	"--with-bundled-libresolv"  yields the same result you are seeing,
	and my "for the comparison" test at a Linux machine without that
	library SENDS OUT JUST FINE :-/

> How do I get more information on why this message bounces?
> Mail to deussen@monet.cs.uni-magdeburg.de seems to work
> fine.  `telnet isg_nw.cs.uni-magdeburg.de smtp` seems to
> work fine also.

	The telnet works ok until it too begins to use 'tightly by the specs'
	version of the resolver routines.

	I have talked with my local collegues about ZMailer development
	issues, and one of the topics is SMTP's reactions to various cases
	of "No MX, no address"-like situations.  I do agree to add some
	more tests, and different reports -- so that cases where there
	simply are no DNS data at some zones (that always yield 0 replies)
	will abort immediately, and those where we are 'the best mx', we
	be giving a better error message.

	Giving this host an instant reply of "Hostname with illegal syntax"
	might speed things up, though.  (And explain why the resolver
	rejected it..)  Have a diff (for 2.99.46p1 actually) at the end.

	Hmm.. Oh damn, now I recall why I made it to be slow at the rejection..
	Yes, it should still be slow for the case of "we be the best mx",
	and fast for all else.  As to why ?  We plan to do a few ugly tricks
	at Telecom Finland, and put ZMailer into a HighAvailability-cluster
	where the machines speak out thru their normal ethernets, and they
	can all the sudden get be assigned IP-alias of their backup machine.
	That way we may all the sudden appear as being 'the best mx' for
	that other machine, (even have its address!), and users/lists in it.

	At the end there is a diff for improved error messages.

> Bruce Wm Folliott

	/Matti Aarnio

--- transports/smtp/smtp.c~	Wed Feb  5 01:38:50 1997
+++ transports/smtp/smtp.c	Fri Feb 14 20:26:54 1997
@@ -1853,7 +1853,7 @@
 		fprintf(SS->verboselog," rc=%d, mxh[0].host=%s (host=%s)\n",
-	    hp = NULL;		/* Ruined HP within getmxrr() */
+	    hp = NULL;		/* Ruined 'hp' datas within getmxrr() */
 	    switch (rc) {
 	      /* remotemsg is generated within getmxrr */
 	    case EX_SOFTWARE:
@@ -1885,14 +1885,28 @@
 		return EX_TEMPFAIL;
-	      if (noMX)
+	      r = EX_UNAVAILABLE; /* This gives instant rejection */
+	      if (strchr(host,'_') != NULL) {
-			"smtp; 500 (configuration inconsistency. MX usage forbidden, no address in DNS: '%s', errno=%s)",
-			host,strerror(errno));
-	      else
+			"smtp; 500 (Hostname with illegal [to the DNS] underscore in it: '%s')",
+			host);
+	      } else if (noMX) {
-			"smtp; 500 (nameserver data inconsistency. No MX, no address: '%s', errno=%s)",
+			"smtp; 500 (configuration inconsistency. MX usage forbidden, no address in the DNS: '%s', errno=%s)",
+	      } else {
+		if (mxcnt > 0) {
+		  sprintf(remotemsg,
+			  "smtp; 500 (nameserver data inconsistency. All MXes rejected (we be best?), no address: '%s', errno=%s)",
+			  host,strerror(errno));
+		  r = EX_TEMPFAIL; /* This gives delayed rejection (after a timeout) */
+		} else {
+		  sprintf(remotemsg,
+			  "smtp; 500 (nameserver data inconsistency. No MX, no address: '%s', errno=%s)",
+			  host,strerror(errno));
+		}
+	      }
 	      notaryreport(NULL,FAILED,"5.4.4 (nameserver data inconsistency)",
@@ -1901,7 +1915,7 @@
 	      /* it was: EX_UNAVAILABLE, but such blocks retrying, thus
 		 current EX_TEMPFAIL, which will cause timeout latter on.. */
-	      return EX_TEMPFAIL;
+	      return r;