diff options
Diffstat (limited to 'usr.sbin/smtpd/queue.c')
-rw-r--r-- | usr.sbin/smtpd/queue.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c index f552d1950b1..bc6635827c6 100644 --- a/usr.sbin/smtpd/queue.c +++ b/usr.sbin/smtpd/queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: queue.c,v 1.139 2012/10/14 18:45:34 eric Exp $ */ +/* $OpenBSD: queue.c,v 1.140 2012/10/25 09:51:08 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -48,12 +48,9 @@ static void queue_pass_to_scheduler(struct imsgev *, struct imsg *); static void queue_shutdown(void); static void queue_sig_handler(int, short, void *); -#define MDA_RUNMAX 50 - static void queue_imsg(struct imsgev *iev, struct imsg *imsg) { - static size_t mda_running; static uint64_t batch_id; struct submit_status ss; struct envelope *e, evp; @@ -167,17 +164,9 @@ queue_imsg(struct imsgev *iev, struct imsg *imsg) id = *(uint64_t*)(imsg->data); if (queue_envelope_load(id, &evp) == 0) errx(1, "cannot load evp:%016" PRIx64, id); - if (mda_running >= MDA_RUNMAX) { - imsg_compose_event(env->sc_ievs[PROC_SCHEDULER], - IMSG_QUEUE_DELIVERY_TEMPFAIL, 0, 0, -1, - &evp, sizeof evp); - return; - } evp.lasttry = time(NULL); - fd = queue_message_fd_r(evpid_to_msgid(id)); imsg_compose_event(env->sc_ievs[PROC_MDA], - IMSG_MDA_SESS_NEW, 0, 0, fd, &evp, sizeof evp); - mda_running += 1; + IMSG_MDA_SESS_NEW, 0, 0, -1, &evp, sizeof evp); return; case IMSG_SMTP_ENQUEUE: @@ -224,8 +213,6 @@ queue_imsg(struct imsgev *iev, struct imsg *imsg) imsg_compose_event(env->sc_ievs[PROC_SCHEDULER], IMSG_QUEUE_DELIVERY_OK, 0, 0, -1, &e->id, sizeof e->id); - if (iev->proc == PROC_MDA) - mda_running--; return; case IMSG_QUEUE_DELIVERY_TEMPFAIL: @@ -235,8 +222,6 @@ queue_imsg(struct imsgev *iev, struct imsg *imsg) imsg_compose_event(env->sc_ievs[PROC_SCHEDULER], IMSG_QUEUE_DELIVERY_TEMPFAIL, 0, 0, -1, e, sizeof *e); - if (iev->proc == PROC_MDA) - mda_running--; return; case IMSG_QUEUE_DELIVERY_PERMFAIL: @@ -246,8 +231,6 @@ queue_imsg(struct imsgev *iev, struct imsg *imsg) imsg_compose_event(env->sc_ievs[PROC_SCHEDULER], IMSG_QUEUE_DELIVERY_PERMFAIL, 0, 0, -1, &e->id, sizeof e->id); - if (iev->proc == PROC_MDA) - mda_running--; return; case IMSG_QUEUE_DELIVERY_LOOP: @@ -257,8 +240,6 @@ queue_imsg(struct imsgev *iev, struct imsg *imsg) imsg_compose_event(env->sc_ievs[PROC_SCHEDULER], IMSG_QUEUE_DELIVERY_LOOP, 0, 0, -1, &e->id, sizeof e->id); - if (iev->proc == PROC_MDA) - mda_running--; return; } } |