summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2004-11-10 15:21:16 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2004-11-10 15:21:16 +0000
commit981756dbc52b48a213522a9b0fcae82dfcf59352 (patch)
treef626434e5d677963f9bf093130438a83c0a8ce64
parent7c7ad977d3b0fd01340ece89b898bad1a35c8c05 (diff)
downloadexim4-981756dbc52b48a213522a9b0fcae82dfcf59352.tar.gz
Set protocol to "smtps" after EHLO->STARTTLS->HELO (was "smtp").
-rw-r--r--doc/doc-txt/ChangeLog5
-rw-r--r--src/src/smtp_in.c23
2 files changed, 16 insertions, 12 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index fc77a704a..d1c3802d9 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.20 2004/11/10 14:15:20 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.21 2004/11/10 15:21:16 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -74,6 +74,9 @@ Exim version 4.44
handles timeouts, both on the server side and network timeouts. Renamed the
CONNECT parameter as NETTIMEOUT (but kept the old name for compatibility).
+21. The rare case of EHLO->STARTTLS->HELO was setting the protocol to "smtp".
+ It is now set to "smtps".
+
Exim version 4.43
-----------------
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index e3b4dcece..9b25c2333 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/smtp_in.c,v 1.4 2004/11/04 12:19:48 ph10 Exp $ */
+/* $Cambridge: exim/src/src/smtp_in.c,v 1.5 2004/11/10 15:21:16 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -167,17 +167,18 @@ static smtp_cmd_list *cmd_list_end =
#define CMD_LIST_STARTTLS 4
static uschar *protocols[] = {
- US"local-smtp",
- US"local-esmtp",
- US"local-esmtpa",
- US"local-esmtps",
- US"local-esmtpsa"
+ US"local-smtp", /* HELO */
+ US"local-smtps", /* The rare case EHLO->STARTTLS->HELO */
+ US"local-esmtp", /* EHLO */
+ US"local-esmtps", /* EHLO->STARTTLS->EHLO */
+ US"local-esmtpa", /* EHLO->AUTH */
+ US"local-esmtpsa" /* EHLO->STARTTLS->EHLO->AUTH */
};
#define pnormal 0
-#define pextend 1
-#define pauthed 1 /* added to pextend */
-#define pcrpted 2 /* added to pextend */
+#define pextend 2
+#define pcrpted 1 /* added to pextend or pnormal */
+#define pauthed 2 /* added to pextend */
#define pnlocal 6 /* offset to remove "local" */
/* When reading SMTP from a remote host, we have to use our own versions of the
@@ -2362,7 +2363,7 @@ while (done <= 0)
((sender_host_authenticated != NULL)? pauthed : 0) +
((tls_active >= 0)? pcrpted : 0)]
:
- protocols[pnormal])
+ protocols[pnormal + ((tls_active >= 0)? pcrpted : 0)])
+
((sender_host_address != NULL)? pnlocal : 0);
@@ -3182,7 +3183,7 @@ while (done <= 0)
protocols[pextend + pcrpted +
((sender_host_authenticated != NULL)? pauthed : 0)]
:
- protocols[pnormal])
+ protocols[pnormal + pcrpted])
+
((sender_host_address != NULL)? pnlocal : 0);