ph10 2006/07/27 12:29:32 BST
Modified files:
exim-doc/doc-txt ChangeLog
exim-src/src smtp_in.c
exim-test/scripts/0000-Basic 0089
exim-test/stdout 0089
Log:
Exim was not testing for a space following SMTP commands such as EHLO
that require one. Thus, EHLORHUBARB was interpreted as a valid command.
This bug exists in every version of Exim that I still have, right back
to 0.12.
Revision Changes Path
1.383 +5 -0 exim/exim-doc/doc-txt/ChangeLog
1.41 +4 -1 exim/exim-src/src/smtp_in.c
1.2 +4 -0 exim/exim-test/scripts/0000-Basic/0089
1.2 +4 -0 exim/exim-test/stdout/0089
Index: ChangeLog
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
retrieving revision 1.382
retrieving revision 1.383
diff -u -r1.382 -r1.383
--- ChangeLog 27 Jul 2006 10:36:34 -0000 1.382
+++ ChangeLog 27 Jul 2006 11:29:32 -0000 1.383
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.382 2006/07/27 10:36:34 ph10 Exp $
+$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.383 2006/07/27 11:29:32 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -134,6 +134,11 @@
PH/24 Re-jigged the order of the tests in the default configuration so that the
tests for valid domains and recipients precede the DNS black list and CSA
tests, on the grounds that those ones are more expensive.
+
+PH/25 Exim was not testing for a space following SMTP commands such as EHLO
+ that require one. Thus, EHLORHUBARB was interpreted as a valid command.
+ This bug exists in every version of Exim that I still have, right back to
+ 0.12.
Exim version 4.62
Index: smtp_in.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/smtp_in.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- smtp_in.c 27 Jul 2006 10:13:52 -0000 1.40
+++ smtp_in.c 27 Jul 2006 11:29:32 -0000 1.41
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/smtp_in.c,v 1.40 2006/07/27 10:13:52 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/smtp_in.c,v 1.41 2006/07/27 11:29:32 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -523,7 +523,10 @@
for (p = cmd_list; p < cmd_list_end; p++)
{
- if (strncmpic(smtp_cmd_buffer, US p->name, p->len) == 0)
+ if (strncmpic(smtp_cmd_buffer, US p->name, p->len) == 0 &&
+ (smtp_cmd_buffer[p->len-1] == ':' || /* "mail from:" or "rcpt to:" */
+ smtp_cmd_buffer[p->len] == 0 ||
+ smtp_cmd_buffer[p->len] == ' '))
{
if (smtp_inptr < smtp_inend && /* Outstanding input */
p->cmd < sync_cmd_limit && /* Command should sync */
Index: 0089
===================================================================
RCS file: /home/cvs/exim/exim-test/scripts/0000-Basic/0089,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 0089 7 Feb 2006 10:54:33 -0000 1.1
+++ 0089 27 Jul 2006 11:29:32 -0000 1.2
@@ -16,6 +16,10 @@
mail from:<root>
rcpt to:<xx@???>
rcpt to:<yy@???>
+rset
+helorhubarb
+mailfrom:<>
+rsettling
quit
****
2
Index: 0089
===================================================================
RCS file: /home/cvs/exim/exim-test/stdout/0089,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- 0089 7 Feb 2006 10:47:37 -0000 1.1
+++ 0089 27 Jul 2006 11:29:32 -0000 1.2
@@ -25,6 +25,10 @@
250 OK
250 Accepted
550 relay not permitted
+250 Reset OK
+500 unrecognized command
+500 unrecognized command
+500 unrecognized command
221 myhost.test.ex closing connection
abcd@???
router = select, transport = dummy