pkgsrc/mail/maildrop/patches/patch-ac
pettai 8ea9780f4a maildrop-2.5.0:
* maildrop/mailbot.c (main): Set close-on-exec bit on opened files.
* rfc2045/rfc2045reply.c (mkreply): Fix sender's name in the
  reply salutation.
* rfc2045/reformime.sgml: Document the -c option to reformime.
* Big quota patch (with some changes).

(See the Changelog for the previous releases)

Based on patch(es) from PR pkg/42989 by Brian Candler
2010-06-15 23:14:47 +00:00

37 lines
824 B
Text

$NetBSD: patch-ac,v 1.4 2010/06/15 23:14:47 pettai Exp $
--- maildrop/main.C.orig 2006-10-01 20:03:37.000000000 -0400
+++ maildrop/main.C
@@ -575,7 +575,7 @@ uid_t my_u=getuid();
if (!found)
{
#if HAVE_COURIER
- if (!deliverymode)
+ if (!deliverymode || !getenv("COURIER_MTA"))
#endif
{
my_pw=getpwuid(my_u);
@@ -635,6 +635,14 @@ Buffer value;
{
const char *p;
+ /*
+ * To allow one maildrop to be used by both courier MTA
+ * and others, we require courier MTA to set COURIER_MTA
+ * in the environment before running maildrop.
+ */
+ if (getenv("COURIER_MTA"))
+ { /* COURIER_MTA */
+
if ((p=getenv("HOME")) && *p)
maildrop.init_home=p;
@@ -659,6 +667,8 @@ Buffer value;
if ((p=getenv("MAILDIRQUOTA")) && *p)
maildrop.init_quota=p;
+
+ } /* COURIER_MTA */
}
#endif