summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2012-10-14 20:18:23 +0000
committerEric Faurot <eric@cvs.openbsd.org>2012-10-14 20:18:23 +0000
commit91030918e27082ba4df83095ddc36e91e829b575 (patch)
tree753fef479bcf79c0c8952a0c85c7e154dff8ac7a /usr.sbin/smtpd
parent709b250b365eda812bc0f6b8f5aa4c43adca8273 (diff)
As discussed with gilles@, actually impose the per-user limit regardless
of the delivery method. Bump the limit a bit. requested by and ok gilles@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/mda.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.sbin/smtpd/mda.c b/usr.sbin/smtpd/mda.c
index 8dc33539a31..b6aacc73e2a 100644
--- a/usr.sbin/smtpd/mda.c
+++ b/usr.sbin/smtpd/mda.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mda.c,v 1.79 2012/10/14 18:50:25 eric Exp $ */
+/* $OpenBSD: mda.c,v 1.80 2012/10/14 20:18:22 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -41,7 +41,7 @@
#include "smtpd.h"
#include "log.h"
-#define MDA_MAXPERUSER 5
+#define MDA_MAXPERUSER 7
struct mda_session {
struct envelope msg;
@@ -101,8 +101,7 @@ mda_imsg(struct imsgev *iev, struct imsg *imsg)
return;
}
- if (ep->agent.mda.method == A_MDA &&
- mda_user_increment(ep->agent.mda.user) == -1) {
+ if (mda_user_increment(ep->agent.mda.user) == -1) {
envelope_set_errormsg(ep, "mda limit reached");
imsg_compose_event(env->sc_ievs[PROC_QUEUE],
IMSG_QUEUE_DELIVERY_TEMPFAIL, 0, 0, -1, ep,
@@ -246,8 +245,7 @@ mda_imsg(struct imsgev *iev, struct imsg *imsg)
log_envelope(&s->msg, NULL, error ? stat : "Delivered");
- if(s->msg.agent.mda.method == A_MDA)
- mda_user_decrement(s->msg.agent.mda.user);
+ mda_user_decrement(s->msg.agent.mda.user);
/* destroy session */
if (s->w.fd != -1)