[Exim] Exim rejects valid IPv6 literal in EHLO.

Góra strony
Delete this message
Reply to this message
Autor: David Woodhouse
Data:  
Dla: exim-users
Temat: [Exim] Exim rejects valid IPv6 literal in EHLO.
EHLO [IPv6:2002:c1ed:8229:10:202:2dff:fe07:a42a]
501 Syntactically invalid EHLO argument(s)
EHLO [2002:c1ed:8229:10:202:2dff:fe07:a42a]
250-pentafluge.infradead.org Hello [2002:c1ed:8229:10:202:2dff:fe07:a42a] [2002:c1ed:8229:10:202:2dff:fe07:a42a]

Bad Exim. The first one was right... see §4.1.3 of RFC2821.

Untested, uncompiled...

--- smtp_in.c.orig      2003-09-25 21:43:42.000000000 +0100
+++ smtp_in.c   2003-09-25 21:49:35.000000000 +0100
@@ -679,7 +679,12 @@
     if (end[-1] == ']')
       {
       end[-1] = 0;
-      yield = string_is_ip_address(start+1, NULL);
+#if HAVE_IPV6
+      if (!Ustrncmp(s, "[IPv6:", 6))
+       yield = (string_is_ip_address(start+6, NULL) == 6);
+      else
+#endif
+       yield = (string_is_ip_address(start+1, NULL) == 4);
       end[-1] = ']';
       }
     }


--
dwmw2