aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgilles <gilles@openbsd.org>2020-02-01 12:54:38 +0000
committergilles <gilles@openbsd.org>2020-02-01 12:54:38 +0000
commitfc7f88cf208e67b54f2210cca649e2ae05c2a4f1 (patch)
tree7c7c79dda8e028608815104e6a4946d29c517c01
parentintroduce mda_mbox() to handle mbox delivery in its own code path, and make (diff)
downloadOpenSMTPD-fc7f88cf208e67b54f2210cca649e2ae05c2a4f1.tar.xz
OpenSMTPD-fc7f88cf208e67b54f2210cca649e2ae05c2a4f1.zip
condition to enter mda_mbox() is too strict, if user have commands in their
forward file they're not supposed to enter that code path.
-rw-r--r--smtpd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/smtpd.c b/smtpd.c
index 98b73422..5341b6c6 100644
--- a/smtpd.c
+++ b/smtpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.c,v 1.329 2020/01/31 22:01:20 gilles Exp $ */
+/* $OpenBSD: smtpd.c,v 1.330 2020/02/01 12:54:38 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -1534,7 +1534,9 @@ forkmda(struct mproc *p, uint64_t id, struct deliver *deliver)
/* avoid hangs by setting 5m timeout */
alarm(300);
- if (dsp->u.local.is_mbox && dsp->u.local.mda_wrapper == NULL)
+ if (dsp->u.local.is_mbox &&
+ dsp->u.local.mda_wrapper == NULL &&
+ deliver->mda_exec[0] == '\0')
mda_mbox(deliver);
else
mda_unpriv(dsp, deliver, pw_name, pw_dir);