summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-08-17 09:38:08 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-08-17 09:38:08 +0000
commitd1807b77667fc347b1b7a91441ea80a8e3799358 (patch)
tree48df30ed57b7adab64b3be0507c31ce4394f0b37 /libexec
parentabaf47b87bc673076b2292921531e77c74c88cfb (diff)
impliment QUIT, beck ok
Diffstat (limited to 'libexec')
-rw-r--r--libexec/spamd/spamd.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index 7697186b396..1f85d6e4721 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.70 2004/08/08 19:32:45 deraadt Exp $ */
+/* $OpenBSD: spamd.c,v 1.71 2004/08/17 09:38:07 henning Exp $ */
/*
* Copyright (c) 2002 Theo de Raadt. All rights reserved.
@@ -624,6 +624,16 @@ match(const char *s1, const char *s2)
void
nextstate(struct con *cp)
{
+ if (match(cp->ibuf, "QUIT") && cp->state < 99) {
+ snprintf(cp->obuf, cp->osize, "221 %s\n", hostname);
+ cp->op = cp->obuf;
+ cp->ol = strlen(cp->op);
+ cp->w = t + cp->stutter;
+ cp->laststate = cp->state;
+ cp->state = 99;
+ return;
+ }
+
switch (cp->state) {
case 0:
/* banner sent; wait for input */