summaryrefslogtreecommitdiff
path: root/mail/maildrop
diff options
context:
space:
mode:
authorhauke <hauke@pkgsrc.org>2019-05-24 13:17:57 +0000
committerhauke <hauke@pkgsrc.org>2019-05-24 13:17:57 +0000
commit4c2c12c771f006eceed5e7ced6fc181e92417a1d (patch)
tree70ac2d6e20c36400b106db2a2f88c90f2ab2e0fa /mail/maildrop
parent0ef3d16e1ad44058eac8e61338bcbfa367826d9d (diff)
downloadpkgsrc-4c2c12c771f006eceed5e7ced6fc181e92417a1d.tar.gz
Upgrade mail/maildrop to v3.0.0
o new dependencies: courier-unicode (split out library), libidn o install text READMe files over html ones o add options.mk - optionally authenticate against dovecot user db - make locking configurable (I have seen locking rows between dovecot and mailfilter that lead to delivery failures) o re-work patches From the upstream changelog (yes, it's been eight years): 3.0.0 2018-07-31 Sam Varshavchik <mrsam@courier-mta.com> * rfc2045/reformime: parse utf-8 address types in DSNs. 2018-07-30 Sam Varshavchik <mrsam@courier-mta.com> * maildrop: explicitly require libidn to build maildrop. 2018-07-29 Sam Varshavchik <mrsam@courier-mta.com> * mailbot: generate message/global, message/global-delivery-status, and message/global-headers, when needed, when formatting autoreplies. * reformime: -m option uses message/global instead of message/rfc822 for UTF8 messages. 2018-06-25 Sam Varshavchik <mrsam@courier-mta.com> * rfc2045/reformime.c (main2): fix crash if -x or -X is specified without the corresponding -s option. 2018-02-16 Sam Varshavchik <mrsam@courier-mta.com> * libs/maildrop/search.C: ":H" pattern matching option, matching only the main message headers. 2018-01-08 Osamu Aoki <osamu@debian.org> * libs/maildrop/deliver.C (delivery): Always return 75 upon delivery failure, for the standalone maildrop build. 2017-12-26 Sam Varshavchik <mrsam@courier-mta.com> * libs/maildir/maildirmake.c (main): maildirmake's -q option will create the maildir if it does not exist. * libs/rfc2045/reformime.c (main2): Added -rU option, and a new internal RFC2045_RW_8BIT_ALWAYS conversion option. * libs/rfc2045/reformime.c (main2): Fix crash when the -s option is not valid. 2.9.3 2017-11-26 Sam Varshavchik <mrsam@courier-mta.com> * libs/rfc2045/rfc2045reply.c (mkreply): Fix null pointer dereferences. 2.9.2 2017-10-03 Sam Varshavchik <mrsam@courier-mta.com> * reformail: fix use after free with -f1 2017-09-27 Giovanni Bechis <giovanni@paclan.it> * Fix to configure.ac 2017-09-19 Sam Varshavchik <mrsam@courier-mta.com> * courier: switch default header encoding to UTF-8. 2.9.0 2017-06-17 Sam Varshavchik <mrsam@courier-mta.com> * libs/maildir/maildirquota.c (docheckquota): Skip DT_LNK. 2017-03-11 Sam Varshavchik <mrsam@courier-mta.com> * courier-unicode library API update. 2017-01-27 "Stefan Hornburg (Racke)" <racke@linuxia.de> * Merge several Debian patches: 0001-Include-cstdio-in-afx.h.patch 0005-Ignore-and-.dpkg-a-z-files.patch 0007-Fix-bashisms.patch 0009-Fix-linking-in-upstream-Makefiles.patch 0012-Define-and-use-PEMFILE-in-mkesmtpdcert.patch (*) with some changes. 0013-Add-P-to-ghostscript-invocation.patch 0014-Improve-error-reporting-in-preline.c.patch 0017-Fix-formatting-errors-in-syslog-calls.patch 0020-Add-perl-stanza-to-perlfilter-scripts.patch 2.8.5 2016-09-20 "Hanno Böck" <hanno@hboeck.de> * libs/maildrop/maildir.C (MaildirSave): Fix new/delete mismatch. 2.8.4 2016-08-03 Sam Varshavchik <mrsam@courier-mta.com> * reformime: do not abort due to invalid encoding of the "name" attributes. 2015-12-20 Sam Varshavchik <mrsam@courier-mta.com> * maildrop: implement the FLAGS variable. 2015-12-16 Andreas Kinzler <ml-ak@posteo.de> * maildrop: fix maildrop not searching last line of text. 2015-07-19 Sam Varshavchik <mrsam@courier-mta.com> * maildrop: fix parsing of a message without a body. 2.8.3 2015-06-27 "Hanno Böck" <hanno@hboeck.de> * libs/maildrop/mailbot.c: Fix bad malloc for --feedback-* command line parameters. 2015-06-20 Sam Varshavchik <mrsam@courier-mta.com> * maildrop: Implement option to automatically create home directories. 2015-05-09 "Jö Fahlke" <jorrit@jorrit.de> * maildrop: Don't include matched subpatterns in foreach. 2.8.2 2015-04-25 Giovanni Bechis <giovanni@openbsd.org> * maildircache.c: fix use after free. * mkdhparams: make compatible with libressl 2015-02-28 Sam Varshavchik <mrsam@courier-mta.com> * Update to courier-unicode 1.2. 2015-02-16 "Hanno Böck" <hanno@hboeck.de> * Fix compilation warning, testsuite. 2.8.0 2014-12-13 Sam Varshavchik <mrsam@courier-mta.com> * Update autotools 2.7.2 2014-07-21 Sam Varshavchik <mrsam@courier-mta.com> * gpglib, rfc2045: fix makefiles. * maildrop: fix parsing of headers added by the -A option. 2014-07-13 Sam Varshavchik <mrsam@courier-mta.com> * liblock, couriertls: fix compilation for OpenBSD -- based on a patch from Giovanni Bechis <giovanni@paclan.it>. 2014-06-23 Sam Varshavchik <mrsam@courier-mta.com> * libs/gpglib/Makefile.am: Fix -lunicode linkage. * libs/rfc2045/Makefile.am: Fix -lunicode linkage. * libs/rfc2045/rfc2045decodemsgtoutf8.c (rfc2045_decodemsgtoutf8): recognize "message" MIME content type, in addition to "text". 2014-06-18 Sam Varshavchik <mrsam@courier-mta.com> * maildrop: -d option changes groupid only when effective group id is root. Addresses Debian bug 564601. * mailbot: Add -T replydraft/-l options. 2014-02-02 Osamu Aoki <osamu_aoki_home@nifty.com> * Makefile.am: install makedat.1 and makedat.html 2014-01-15 Sam Varshavchik <mrsam@courier-mta.com> * libs/maildrop/search.C (search_cb): Fix logged patterns getting garbled, in log output. 2014-01-12 Sam Varshavchik <mrsam@courier-mta.com> * Factored out the unicode library into a separate package. 2.7.1 2013-11-25 Sam Varshavchik <mrsam@courier-mta.com> * Fix various compiler warnings about unchecked results from setuid and setgid calls. 2.7.0 2013-08-28 Sam Varshavchik <mrsam@courier-mta.com> * maildrop: pattern searches are now specified in UTF-8. maildrop MIME-decodes the search pattern, and transcodes it to the UTF-8 character set, for searching purposes. 2012-12-04 Alessandro Vesely <vesely@tana.it> * rfc2045/makemime.c (openfile_or_pipe): Do not dup stdin filedesc, sometimes the stdin buffer already gets filled. 2.6.0 2012-09-05 Sam Varshavchik <mrsam@courier-mta.com> * maildir/maildiraclt.c (maildir_acl_delete): Fix double-free on error path of an ENOMEM. 2012-06-18 Sam Varshavchik <mrsam@courier-mta.com> * maildrop: make a mention of reformail -D's locking in the manual pages. 2012-06-17 Osamu Aoki <osamu@debian.org> * maildrop/formatmbox.C (GetLineBuffer): Do not skip whitespaces looking for From: and Subject: headers, to log. 2012-05-05 Sam Varshavchik <mrsam@courier-mta.com> * rfc2045/rfc2045mkboundary.c (rfc2045_mk_boundary): truncate the hostname portion of the boundary to 30 chars. 2012-04-22 Sam Varshavchik <mrsam@courier-mta.com> * liblock/mail.c (dotlock_exists): Quell a compiler warning. 2012-02-23 Osamu Aoki <osamu@debian.org> * Miscellaneous spelling fixes. 2.5.5 2011-11-25 Sam Varshavchik <mrsam@courier-mta.com> * rfc2045/rfc2045reply.c (mkreply): Fix copying of the contents of the original message. * rfc2045/reformime.c (do_print_info): rfc2231_udecodeDisposition() failure is not fatal. * rfc2045/reformime.c (get_suitable_filename): Ditto. 2011-09-06 Sam Varshavchik <mrsam@courier-mta.com> * rfc2045/reformime.c (main2): Fixed segfault on some arches from an initial null given to strtok. 2011-08-31 Sam Varshavchik <mrsam@courier-mta.com> * mailbot: add "feedback" and "replyfeedback" formats, generating RFC 5965-formatted feedback report. -a option attaches the entire original message, instead of only its headers, for "replydsn", "feedback", and "replyfeedback" formats. 2011-08-14 Sam Varshavchik <mrsam@courier-mta.com> * rfc2045/reformime.c (main2): On ia64 and arm, argv is in readonly memory.
Diffstat (limited to 'mail/maildrop')
-rw-r--r--mail/maildrop/Makefile40
-rw-r--r--mail/maildrop/PLIST13
-rw-r--r--mail/maildrop/distinfo16
-rw-r--r--mail/maildrop/options.mk44
-rw-r--r--mail/maildrop/patches/patch-Makefile.in79
-rw-r--r--mail/maildrop/patches/patch-aa72
-rw-r--r--mail/maildrop/patches/patch-ab31
-rw-r--r--mail/maildrop/patches/patch-libs_maildrop_configure25
-rw-r--r--mail/maildrop/patches/patch-libs_maildrop_main.C (renamed from mail/maildrop/patches/patch-ac)14
9 files changed, 188 insertions, 146 deletions
diff --git a/mail/maildrop/Makefile b/mail/maildrop/Makefile
index 14647231a75..361ea244808 100644
--- a/mail/maildrop/Makefile
+++ b/mail/maildrop/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.65 2018/08/22 09:45:26 wiz Exp $
+# $NetBSD: Makefile,v 1.66 2019/05/24 13:17:57 hauke Exp $
-DISTNAME= maildrop-2.5.5
-PKGREVISION= 7
+DISTNAME= maildrop-3.0.0
+#PKGREVISION= 1
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/}
EXTRACT_SUFX= .tar.bz2
@@ -12,17 +12,15 @@ HOMEPAGE= http://www.courier-mta.org/maildrop/
DEPENDS+= courier-maildir>=${COURIER_VERSION}:../../mail/courier-maildir
-USE_TOOLS+= gmake perl
+USE_TOOLS+= gmake perl pkg-config
USE_TOOLS+= cat:run # used by makedat(1)
USE_LANGUAGES= c c++
-PKG_OPTIONS_VAR= PKG_OPTIONS.maildrop
-PKG_SUPPORTED_OPTIONS= authlib
-PKG_SUGGESTED_OPTIONS= authlib
-
-.include "../../mk/bsd.options.mk"
+.include "options.mk"
.include "../../mail/courier-mta/Makefile.common"
+DOCFILES= README README.postfix README.dovecotauth maildroptips.txt
+
# These are the users that may invoke maildrop with the "-d user"
# argument (mailbox delivery mode).
MAILDROP_TRUSTED_USERS?=${REAL_ROOT_USER} ${COURIER_USER} ${QMAIL_DAEMON_USER}
@@ -39,16 +37,6 @@ CONFIGURE_ARGS+= --enable-trusted-users=${MAILDROP_TRUSTED_USERS:Q}
CONFIGURE_ARGS+= --enable-trusted-groups=${COURIER_GROUP}
CONFIGURE_ARGS+= --enable-syslog=1
-###
-### Support using courier-authlib to look up mail account information.
-###
-.if !empty(PKG_OPTIONS:Mauthlib)
-CONFIGURE_ARGS+= --enable-authlib
-. include "../../security/courier-authlib/buildlink3.mk"
-.else
-CONFIGURE_ARGS+= --disable-authlib
-.endif
-
INSTALL_AM_MAKEFLAGS+= htmldir=${DOCDIR:Q}
INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} AM_MAKEFLAGS=${INSTALL_AM_MAKEFLAGS:Q}
@@ -65,10 +53,12 @@ SPECIAL_PERMS+= bin/maildrop ${REAL_ROOT_USER} ${COURIER_GROUP} 4555
INSTALLATION_DIRS= libexec/courier ${DOCDIR}/maildrop share/courier
post-install:
- ${INSTALL_DATA} ${WRKSRC}/README.postfix ${DESTDIR}${DOCDIR}
- ${INSTALL_DATA} ${WRKSRC}/maildrop/maildroptips.html ${DESTDIR}${DOCDIR}
- ${INSTALL_DATA} ${WRKSRC}/maildrop/README.html ${DESTDIR}${DOCDIR}/maildrop
- ${INSTALL_DATA} ${WRKSRC}/maildrop/makedat.html ${DESTDIR}${DOCDIR}
- ${INSTALL_MAN} ${WRKSRC}/maildrop/makedat.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
-
+.for aaa in ${DOCFILES}
+ ${INSTALL_DATA} ${WRKSRC}/${aaa} ${DESTDIR}${DOCDIR}/maildrop
+.endfor
+ ${INSTALL_MAN} ${WRKSRC}/libs/maildrop/makedat.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+# ${INSTALL_DATA} ${WRKSRC}/libs/maildrop/makedat.html ${DESTDIR}${DOCDIR}
+
+.include "../../mail/courier-unicode/buildlink3.mk"
+.include "../../devel/libidn/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/maildrop/PLIST b/mail/maildrop/PLIST
index 8418abaa5ad..f7fe4303f37 100644
--- a/mail/maildrop/PLIST
+++ b/mail/maildrop/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.9 2010/11/05 14:15:02 adam Exp $
+@comment $NetBSD: PLIST,v 1.10 2019/05/24 13:17:57 hauke Exp $
bin/lockmail
bin/mailbot
bin/maildrop
@@ -19,15 +19,16 @@ man/man1/reformime.1
man/man7/maildropex.7
man/man7/maildropfilter.7
man/man7/maildropgdbm.7
-share/doc/courier/README.postfix
share/doc/courier/lockmail.html
share/doc/courier/mailbot.html
share/doc/courier/maildrop.html
-share/doc/courier/maildrop/README.html
+share/doc/courier/maildrop/README
+share/doc/courier/maildrop/README.dovecotauth
+share/doc/courier/maildrop/README.postfix
+share/doc/courier/maildrop/maildroptips.txt
share/doc/courier/maildropex.html
share/doc/courier/maildropfilter.html
share/doc/courier/maildropgdbm.html
-share/doc/courier/maildroptips.html
share/doc/courier/makedat.html
share/doc/courier/makemime.html
share/doc/courier/manpage.css
@@ -35,3 +36,7 @@ share/doc/courier/reformail.html
share/doc/courier/reformime.html
share/doc/courier/rfc2045.html
share/doc/courier/rfc822.html
+@pkgdir share/courier
+@pkgdir man/man8
+@pkgdir man/man5
+@pkgdir man/man3
diff --git a/mail/maildrop/distinfo b/mail/maildrop/distinfo
index 4fb7a7f45e2..9f99472c9fe 100644
--- a/mail/maildrop/distinfo
+++ b/mail/maildrop/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.19 2015/11/03 23:27:08 agc Exp $
+$NetBSD: distinfo,v 1.20 2019/05/24 13:17:57 hauke Exp $
-SHA1 (maildrop-2.5.5.tar.bz2) = 57b307972b884b4f8fea840c56d2ff37f95139a3
-RMD160 (maildrop-2.5.5.tar.bz2) = a614d3761c8b35cee0ea838d6ab5239bde4e08dd
-SHA512 (maildrop-2.5.5.tar.bz2) = ffafe3372739a5cc64a5b5bcad5e028539888d828a789698fb6962fe5394daa0bc8a8b637da855fb10890141ef18dd9a29c3bcc9ed0f2b49e1261cd0c34b9c7b
-Size (maildrop-2.5.5.tar.bz2) = 2158846 bytes
-SHA1 (patch-aa) = 5f888d5304107ef52af2faf9516c69501bb0b98e
-SHA1 (patch-ab) = 448fb6c46f05e634534c4a7c1547d54323b24dfa
-SHA1 (patch-ac) = 2dbda2413f35808ce6805289f1a44be3dfa59ea3
+SHA1 (maildrop-3.0.0.tar.bz2) = d982d4d9d4ee2fa8637102049126c5202eb82c73
+RMD160 (maildrop-3.0.0.tar.bz2) = 9be87d2615f49bb02702c88ade8ebc3260c03e51
+SHA512 (maildrop-3.0.0.tar.bz2) = 1f1e1682ec7c2d0c1f2e71059f186d9a9d3118194b1e558d3a6e5826721fb14a661f4d75df42ce2626430ac072b50e723b563ae00c1ebdeb4da96abfeb534eff
+Size (maildrop-3.0.0.tar.bz2) = 2091018 bytes
+SHA1 (patch-Makefile.in) = 82153fdba4f9ef69d694672d97a68bb55d84765a
+SHA1 (patch-libs_maildrop_configure) = 76b12b194463095a65cde90d992ac6b023b694e2
+SHA1 (patch-libs_maildrop_main.C) = e8d4229e6ae742876bef0134af41134fd53f5850
diff --git a/mail/maildrop/options.mk b/mail/maildrop/options.mk
new file mode 100644
index 00000000000..9cefb0154d2
--- /dev/null
+++ b/mail/maildrop/options.mk
@@ -0,0 +1,44 @@
+# $NetBSD: options.mk,v 1.1 2019/05/24 13:17:57 hauke Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.maildrop
+PKG_SUPPORTED_OPTIONS= authlib dovecot-auth dotlock flock
+PKG_SUGGESTED_OPTIONS= authlib flock
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Support using courier-authlib to look up mail account information.
+###
+.if !empty(PKG_OPTIONS:Mauthlib)
+CONFIGURE_ARGS+= --enable-authlib
+. include "../../security/courier-authlib/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-authlib
+.endif
+
+###
+### Support using dovecot auth to look up mail account information.
+###
+.if !empty(PKG_OPTIONS:Mdovecot-auth)
+CONFIGURE_ARGS+= --enable-dovecotauth
+. include "../../mail/dovecot2/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-dovecotauth
+.endif
+
+###
+### Select mailbox locking mechanism in accordance with other mail agents
+###
+.if !empty(PKG_OPTIONS:Mdotlock)
+CONFIGURE_ARGS+= --enable-use-dotlock=1
+.else
+CONFIGURE_ARGS+= --enable-use-dotlock=0
+.endif
+
+# 'flock' stands for whatever configure finds most suitable on this
+# machine from fcntl(2), lockf(3), flock(2)
+.if !empty(PKG_OPTIONS:Mflock)
+CONFIGURE_ARGS+= --enable-use-flock=1
+.else
+CONFIGURE_ARGS+= --enable-use-flock=0
+.endif
diff --git a/mail/maildrop/patches/patch-Makefile.in b/mail/maildrop/patches/patch-Makefile.in
new file mode 100644
index 00000000000..41d1e8e00ae
--- /dev/null
+++ b/mail/maildrop/patches/patch-Makefile.in
@@ -0,0 +1,79 @@
+$NetBSD: patch-Makefile.in,v 1.1 2019/05/24 13:17:57 hauke Exp $
+
+Do not install maildir related tools & doc - they presumably get
+installed by some other courier-* package if you want them.
+
+Install system binaries in {libexecdir} where applicable.
+
+--- Makefile.in.orig 2018-09-13 23:21:07.000000000 +0000
++++ Makefile.in
+@@ -429,17 +429,17 @@ EXTRA_DIST = README.html INSTALL.html UP
+ maildroptips.txt COPYING.GPL manpage.css $(HTMLWWW)
+
+ scriptdir = $(pkgdatadir)/scripts
+-DELIVERQUOTAHTMLSOURCE = maildirquota.html deliverquota.html
+-DELIVERQUOTAHTML = $(DELIVERQUOTAHTMLSOURCE)
+-DELIVERQUOTAMAN = maildirquota.7 deliverquota.8
+-MAILDROPHTML = lockmail.html maildiracl.html maildirkw.html \
+- maildirmake.html maildropex.html maildir.html \
++DELIVERQUOTAHTMLSOURCE =
++DELIVERQUOTAHTML =
++DELIVERQUOTAMAN =
++MAILDROPHTML = lockmail.html \
++ maildropex.html \
+ maildropfilter.html maildropgdbm.html maildrop.html \
+ mailbot.html makemime.html reformail.html reformime.html \
+ $(am__append_1)
+-MAILDROPMAN = lockmail.1 maildirmake.1 maildrop.1 mailbot.1 \
+- maildropex.7 maildir.5 maildropfilter.7 maildropgdbm.7 \
+- makemime.1 reformail.1 reformime.1 $(am__append_2)
++MAILDROPMAN = lockmail.1 maildrop.1 mailbot.1 \
++ maildropex.7 maildropfilter.7 maildropgdbm.7 \
++ makemime.1 reformail.1 reformime.1
+ EXTRA_LTLIBRARIES = librfc822.la librfc2045.la
+ @DEVEL_TRUE@DEVEL_MAN = rfc822.3 rfc2045.3
+ sysincludedir = $(includedir)
+@@ -1282,12 +1282,8 @@ uninstall-man: uninstall-man1 uninstall-
+ # Create a soft link from bindir/deliverquota to libdir/bin/deliverquota
+
+ install-deliverquota:
+- $(mkinstalldirs) $(DESTDIR)$(bindir)
+- $(INSTALL_PROGRAM) libs/maildir/deliverquota $(DESTDIR)$(bindir)/deliverquota
+- cd $(DESTDIR)$(bindir); rm -f maildrop.deliverquota
+
+ uninstall-deliverquota:
+- rm -f $(DESTDIR)$(bindir)/deliverquota
+
+ install-data-local: install-man install-deliverquota install-maildrop
+
+@@ -1315,23 +1311,24 @@ install-maildrop:
+ $(INSTALL_PROGRAM) libs/maildrop/$$f $(DESTDIR)$(bindir)/$$f ; \
+ done
+ $(INSTALL_PROGRAM) libs/liblock/lockmail $(DESTDIR)$(bindir)/lockmail
+- $(INSTALL_PROGRAM) libs/maildir/maildirmake $(DESTDIR)$(bindir)/maildirmake
+ $(INSTALL_PROGRAM) libs/rfc2045/reformime $(DESTDIR)$(bindir)/reformime
+ $(INSTALL_PROGRAM) libs/rfc2045/makemime $(DESTDIR)$(bindir)/makemime
+ test "@USE_DB@@USE_GDBM@" = "00" && exit 0; \
+- $(INSTALL_PROGRAM) libs/makedat/makedatprog $(DESTDIR)$(bindir)/makedatprog
++ $(INSTALL_PROGRAM) libs/makedat/makedatprog $(DESTDIR)$(libexecdir)/makedatprog
++ $(LN_S) $(libexecdir)/makedatprog $(DESTDIR)$(bindir)/makedatprog
+ test "@USE_DB@@USE_GDBM@" = "00" && exit 0; \
+- $(INSTALL_SCRIPT) libs/makedat/makedat $(DESTDIR)$(bindir)/makedat
++ $(INSTALL_SCRIPT) libs/makedat/makedat $(DESTDIR)$(libexecdir)/makedat
++ $(LN_S) $(libexecdir)/makedat $(DESTDIR)$(bindir)/makedat
+ . libs/maildrop/uidgid ; test -z "$$gid" && exit 0; test -w /etc || exit 0; cd $(DESTDIR)$(bindir) && chgrp $$gid maildrop lockmail
+ . libs/maildrop/uidgid ; test -z "$$uid" && exit 0; test -w /etc || exit 0; cd $(DESTDIR)$(bindir) && chown $$uid maildrop lockmail && chmod 755 maildrop lockmail
+
+ uninstall-maildrop:
+- for f in maildrop mailbot maildirmake reformail lockmail makemime reformime; do \
++ for f in maildrop mailbot reformail lockmail makemime reformime; do \
+ rm -f $(DESTDIR)$(bindir)/$$f ; \
+ done
+ test "@USE_DB@@USE_GDBM@" = "00" && exit 0; \
+- rm -f $(DESTDIR)$(bindir)/makedat ; \
+- rm -f $(DESTDIR)$(bindir)/makedatprog
++ rm -f $(DESTDIR)$(libexecdir)/makedat ; \
++ rm -f $(DESTDIR)$(libexecdir)/makedatprog
+
+ all-recursive: all-make-check
+
diff --git a/mail/maildrop/patches/patch-aa b/mail/maildrop/patches/patch-aa
deleted file mode 100644
index 306288222c6..00000000000
--- a/mail/maildrop/patches/patch-aa
+++ /dev/null
@@ -1,72 +0,0 @@
-$NetBSD: patch-aa,v 1.9 2012/06/09 11:50:20 adam Exp $
-
---- Makefile.in.orig 2011-12-03 21:26:32.000000000 +0000
-+++ Makefile.in
-@@ -295,17 +295,15 @@ EXTRA_DIST = README.html INSTALL.html UP
- maildroptips.txt COPYING.GPL manpage.css pgpkeys.txt
-
- scriptdir = $(pkgdatadir)/scripts
--DELIVERQUOTAHTMLSOURCE = maildirquota.html deliverquota.html
--DELIVERQUOTAHTML = $(DELIVERQUOTAHTMLSOURCE)
--DELIVERQUOTAMAN = maildirquota.7 deliverquota.8
--MAILDROPHTML = lockmail.html maildiracl.html maildirkw.html \
-- maildirmake.html maildropex.html \
-- maildir.html \
-+DELIVERQUOTAHTMLSOURCE =
-+DELIVERQUOTAHTML =
-+DELIVERQUOTAMAN =
-+MAILDROPHTML = lockmail.html \
-+ maildropex.html \
- maildropfilter.html maildropgdbm.html maildrop.html mailbot.html \
- makemime.html reformail.html reformime.html
-
--MAILDROPMAN = lockmail.1 maildirmake.1 maildrop.1 mailbot.1 maildropex.7 \
-- maildir.5 \
-+MAILDROPMAN = lockmail.1 maildrop.1 mailbot.1 maildropex.7 \
- maildropfilter.7 maildropgdbm.7 makemime.1 reformail.1 reformime.1
-
- EXTRA_LTLIBRARIES = librfc822.la librfc2045.la
-@@ -1143,12 +1141,8 @@ uninstall-man: uninstall-man1 uninstall-
- # Create a soft link from bindir/deliverquota to libdir/bin/deliverquota
-
- install-deliverquota:
-- $(mkinstalldirs) $(DESTDIR)$(bindir)
-- $(INSTALL_PROGRAM) maildir/deliverquota $(DESTDIR)$(bindir)/deliverquota
-- cd $(DESTDIR)$(bindir); rm -f maildrop.deliverquota
-
- uninstall-deliverquota:
-- rm -f $(DESTDIR)$(bindir)/deliverquota
-
- install-data-local: install-man install-deliverquota install-maildrop
-
-@@ -1176,23 +1170,24 @@ install-maildrop:
- $(INSTALL_PROGRAM) maildrop/$$f $(DESTDIR)$(bindir)/$$f ; \
- done
- $(INSTALL_PROGRAM) liblock/lockmail $(DESTDIR)$(bindir)/lockmail
-- $(INSTALL_PROGRAM) maildir/maildirmake $(DESTDIR)$(bindir)/maildirmake
- $(INSTALL_PROGRAM) rfc2045/reformime $(DESTDIR)$(bindir)/reformime
- $(INSTALL_PROGRAM) rfc2045/makemime $(DESTDIR)$(bindir)/makemime
- test "@USE_DB@@USE_GDBM@" = "00" && exit 0; \
-- $(INSTALL_PROGRAM) makedat/makedatprog $(DESTDIR)$(bindir)/makedatprog
-+ $(INSTALL_PROGRAM) makedat/makedatprog $(DESTDIR)$(libexecdir)/makedatprog
-+ $(LN_S) $(libexecdir)/makedatprog $(DESTDIR)$(bindir)/makedatprog
- test "@USE_DB@@USE_GDBM@" = "00" && exit 0; \
-- $(INSTALL_SCRIPT) makedat/makedat $(DESTDIR)$(bindir)/makedat
-+ $(INSTALL_SCRIPT) makedat/makedat $(DESTDIR)$(libexecdir)/makedat
-+ $(LN_S) $(libexecdir)/makedat $(DESTDIR)$(bindir)/makedat
- . maildrop/uidgid ; test -z "$$gid" && exit 0; test -w /etc || exit 0; cd $(DESTDIR)$(bindir) && chgrp $$gid maildrop lockmail
- . maildrop/uidgid ; test -z "$$uid" && exit 0; test -w /etc || exit 0; cd $(DESTDIR)$(bindir) && chown $$uid maildrop lockmail && chmod 755 maildrop lockmail
-
- uninstall-maildrop:
-- for f in maildrop mailbot maildirmake reformail lockmail makemime reformime; do \
-+ for f in maildrop mailbot reformail lockmail makemime reformime; do \
- rm -f $(DESTDIR)$(bindir)/$$f ; \
- done
- test "@USE_DB@@USE_GDBM@" = "00" && exit 0; \
-- rm -f $(DESTDIR)$(bindir)/makedat ; \
-- rm -f $(DESTDIR)$(bindir)/makedatprog
-+ rm -f $(DESTDIR)$(libexecdir)/makedat ; \
-+ rm -f $(DESTDIR)$(libexecdir)/makedatprog
-
- all-recursive: all-make-check
-
diff --git a/mail/maildrop/patches/patch-ab b/mail/maildrop/patches/patch-ab
deleted file mode 100644
index 13588379b47..00000000000
--- a/mail/maildrop/patches/patch-ab
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-ab,v 1.5 2010/06/15 23:14:47 pettai Exp $
-
---- maildrop/configure.orig 2007-04-22 11:24:25.000000000 -0400
-+++ maildrop/configure
-@@ -19066,7 +19066,7 @@ fi
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
--if test -d $srcdir/../courier
-+if true || test -d $srcdir/../courier
- then
- #
- # This version of maildrop is integrated into Courier mail server
-@@ -19203,7 +19203,7 @@ SPOOLDIR="$DIR"
-
- get_spooldir() {
-
--if test -d $srcdir/../courier
-+if true || test -d $srcdir/../courier
- then
- MBOX_RESET_GID=1
- SPOOLDIR="./Maildir"
-@@ -19270,7 +19270,7 @@ if test "${with_default_maildrop+set}" =
- else
- # Courier defaults to ./Maildir
-
-- if test -d $srcdir/../courier
-+ if true || test -d $srcdir/../courier
- then
- maildrop_cv_SYS_INSTALL_MBOXDIR=./Maildir
- fi
diff --git a/mail/maildrop/patches/patch-libs_maildrop_configure b/mail/maildrop/patches/patch-libs_maildrop_configure
new file mode 100644
index 00000000000..4e26829521e
--- /dev/null
+++ b/mail/maildrop/patches/patch-libs_maildrop_configure
@@ -0,0 +1,25 @@
+$NetBSD: patch-libs_maildrop_configure,v 1.1 2019/05/24 13:17:58 hauke Exp $
+
+Since this is a standalone install, do not check for surrounding
+Courier source tree.
+
+--- libs/maildrop/configure.orig 2018-09-13 23:21:35.000000000 +0000
++++ libs/maildrop/configure
+@@ -18252,7 +18252,7 @@ fi
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+-if test -d $srcdir/../../courier
++if true || test -d $srcdir/../../courier
+ then
+ #
+ # This version of maildrop is integrated into Courier mail server
+@@ -18272,7 +18272,7 @@ else
+ #
+ # When maildrop is configured as part of courier, MTA is fixed to use Courier.
+ #
+- if test -d $srcdir/../../courier
++ if true || test -d $srcdir/../../courier
+ then
+ eval "prefix=$prefix"
+ eval "exec_prefix=$exec_prefix"
diff --git a/mail/maildrop/patches/patch-ac b/mail/maildrop/patches/patch-libs_maildrop_main.C
index 8414332fc1c..3b411af59a8 100644
--- a/mail/maildrop/patches/patch-ac
+++ b/mail/maildrop/patches/patch-libs_maildrop_main.C
@@ -1,8 +1,10 @@
-$NetBSD: patch-ac,v 1.4 2010/06/15 23:14:47 pettai Exp $
+$NetBSD: patch-libs_maildrop_main.C,v 1.1 2019/05/24 13:17:58 hauke 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();
+Make this maildrop install usable by both Courier and other MTAs.
+
+--- libs/maildrop/main.C.orig 2018-09-13 23:22:17.000000000 +0000
++++ libs/maildrop/main.C
+@@ -754,7 +754,7 @@ uid_t my_u=getuid();
if (!found)
{
#if HAVE_COURIER
@@ -11,7 +13,7 @@ $NetBSD: patch-ac,v 1.4 2010/06/15 23:14:47 pettai Exp $
#endif
{
my_pw=getpwuid(my_u);
-@@ -635,6 +635,14 @@ Buffer value;
+@@ -814,6 +814,14 @@ Buffer value;
{
const char *p;
@@ -26,7 +28,7 @@ $NetBSD: patch-ac,v 1.4 2010/06/15 23:14:47 pettai Exp $
if ((p=getenv("HOME")) && *p)
maildrop.init_home=p;
-@@ -659,6 +667,8 @@ Buffer value;
+@@ -838,6 +846,8 @@ Buffer value;
if ((p=getenv("MAILDIRQUOTA")) && *p)
maildrop.init_quota=p;