summaryrefslogtreecommitdiff
path: root/libexec/spamd/spamd.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2015-12-02 21:10:18 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2015-12-02 21:10:18 +0000
commitb445bc63fe83ad0ba0a7d67fee788ea00d3c9fd8 (patch)
tree4b5e1b533d0ada37c9e2958271a96bb428c39f21 /libexec/spamd/spamd.c
parentd5006d19717335dcc681e2b460e95d94e04e26f8 (diff)
in response to EHLO, don't offer STARTTLS if we already completed the
STARTTLS dance. ok millert
Diffstat (limited to 'libexec/spamd/spamd.c')
-rw-r--r--libexec/spamd/spamd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index 7a9bdc8333f..65b81daab3c 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.132 2015/12/02 20:58:43 henning Exp $ */
+/* $OpenBSD: spamd.c,v 1.133 2015/12/02 21:10:17 henning Exp $ */
/*
* Copyright (c) 2015 Henning Brauer <henning@openbsd.org>
@@ -831,7 +831,8 @@ nextstate(struct con *cp)
snprintf(cp->obuf, cp->osize,
"501 helo requires domain name.\r\n");
} else {
- if (tlsctx != NULL && cp->blacklists == NULL &&
+ if (cp->cctx == NULL && tlsctx != NULL &&
+ cp->blacklists == NULL &&
match(cp->ibuf, "EHLO")) {
snprintf(cp->obuf, cp->osize,
"250 STARTTLS\r\n");