From ce9702dd233a0b8df63b892871fb1283622c70bc Mon Sep 17 00:00:00 2001 From: schmonz Date: Mon, 2 Jan 2017 02:19:46 +0000 Subject: Update to 2.12. From the changelog: - Added ability for rbl plugin to capture messages before rejecting them. - Fixed broken use of -lbg-sysdeps in modules. - Fixed missing plugin-rbl in installed image. - Updated for bglibs v2 - Added new "rbl" plugin, to block messages from IPs in an RBL. - Added new "queuedir" backend, to save messages to simple files. - Make sure plugin reset functions get called before exiting. - Added missing plugin-starttls-ucspi to installed files. - Added support for limiting the number of messages to plugin-counters. - This version updates the plugin API to add new features: - Capabilities reported by the SMTP EHLO response can be added by plugins. - Plugins are passed any SMTP parameters given with the sender and recipient commands. - Plugins can add new commands to the SMTP protocol. Plugins compiled for previous versions of mailfront will not work without recompiling. The short-circuit on accept logic has also been eliminated to fix a semantic issue. - SMTP AUTH support has been moved into a new plugin, cvm-authenticate. Existing installations relying on SMTP AUTH support will need to make sure they are using this new plugin. The smtpfront-qmail wrapper has been modified to provide this additional plugin. - Fixed plugin-add-received to add the "IPv6:" prefix in the Received: header when the protocol is TCP6. - Added plugin starttls-ucspi to implement STARTTLS using ucspi-tls. - SMTP AUTH can now be restricted to TLS-enabled sessions. - Added controls for pop3front-auth to limit the number of USER commands and authentication failures allowed per session. - Added control to imapfront-auth to limit the number of authentication failures allowed per session. - Modified the clamav plugin to use the newer INSTREAM protocol. - imapfront-auth now sets $DOVECONF_ENV in Dovecot mode in order to avoid having Dovecot imapd reset it through doveconf. - Added Lua scripting plugin (optional, build with 'make lua'). - Modified the qmail backend to evaluate $QMAILQUEUE as late as possible. This allows more options for changing $QMAILQUEUE in plugins. - Added support for running Dovecot IMAP from imapfront-auth. See imapfront.html for details on how to set this up. - Added support for rejecting whole messages when the recipient count is exceeded in plugin-counters. - Made the check-fqdn plugin explicitly reject empty recipients. - Added a sender domain restriction to the check-fqdn plugin. - Added missing plugin-spamassassin.so to installation. - Fix bug in handling invalid message numbers in retrieving messages in pop3front-maildir. - Added a SpamAssassin scanning plugin. - Optimized pop3front-maildir to avoid stat'ing each message twice, and to use sizes recorded in the filename to avoid stat'ing entirely. See pop3front.html for details on the filenames. pkgsrc changes: - Libtoolize to fix build on OS X. --- mail/mailfront/Makefile | 14 +++++--- mail/mailfront/PLIST | 16 ++++++--- mail/mailfront/distinfo | 13 ++++---- mail/mailfront/patches/patch-INSTHIER | 62 +++++++++++++++++++++++++++++++++++ mail/mailfront/patches/patch-Makefile | 46 ++++++++++++++++++++++++++ mail/mailfront/patches/patch-aa | 17 ---------- 6 files changed, 137 insertions(+), 31 deletions(-) create mode 100644 mail/mailfront/patches/patch-INSTHIER create mode 100644 mail/mailfront/patches/patch-Makefile delete mode 100644 mail/mailfront/patches/patch-aa (limited to 'mail') diff --git a/mail/mailfront/Makefile b/mail/mailfront/Makefile index 04bedbdb027..eca1cc85a5d 100644 --- a/mail/mailfront/Makefile +++ b/mail/mailfront/Makefile @@ -1,28 +1,32 @@ -# $NetBSD: Makefile,v 1.12 2012/10/08 12:19:15 asau Exp $ +# $NetBSD: Makefile,v 1.13 2017/01/02 02:19:46 schmonz Exp $ # -DISTNAME= mailfront-1.12 +DISTNAME= mailfront-2.12 CATEGORIES= mail MASTER_SITES= ${HOMEPAGE}archive/ MAINTAINER= schmonz@NetBSD.org HOMEPAGE= http://untroubled.org/mailfront/ COMMENT= Mail server network protocol front-ends +LICENSE= gnu-gpl-v2 DEPENDS+= daemontools-[0-9]*:../../sysutils/daemontools DEPENDS_QMAIL= qmail>=1.03nb8:../../mail/qmail DEPENDS+= ${DEPENDS_QMAIL} +# XXX optional: lua 5 or later ("make lua") + DJB_RESTRICTED= NO DJB_MAKE_TARGETS= NO DJB_CONFIG_CMDS+= ${ECHO} ${PREFIX}/include > conf-include; \ - ${ECHO} ${PREFIX}/lib/${PKGBASE} > conf-modules;\ - ${ECHO} ${PREFIX}/lib > conf-cvmlibs + ${ECHO} ${PREFIX}/lib/${PKGBASE} > conf-modules; RCD_SCRIPTS= smtpfront INSTALLATION_DIRS= share/doc/mailfront INSTALL_ENV+= install_prefix=${DESTDIR:Q} +MAKE_JOBS_SAFE= no # due to hacky libtoolization + .include "../../mk/bsd.prefs.mk" post-install: @@ -45,7 +49,9 @@ MAKEVARS+= PKG_SYSCONFDIR.mailfront . endif .endif +BUILDLINK_API_DEPENDS.bglibs+= bglibs>=2.01 .include "../../devel/bglibs/buildlink3.mk" +BUILDLINK_API_DEPENDS.cvm+= cvm>=0.97 .include "../../security/cvm/buildlink3.mk" .include "../../mk/djbware.mk" .include "../../mk/bsd.pkg.mk" diff --git a/mail/mailfront/PLIST b/mail/mailfront/PLIST index 6b3eced9328..2daaa6ad1eb 100644 --- a/mail/mailfront/PLIST +++ b/mail/mailfront/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.4 2014/03/11 14:05:03 jperkin Exp $ +@comment $NetBSD: PLIST,v 1.5 2017/01/02 02:19:46 schmonz Exp $ bin/imapfront-auth bin/mailfront bin/pop3front-auth @@ -14,17 +14,19 @@ include/mailfront/mailfront.h include/mailfront/responses.h lib/mailfront/backend-echo.so lib/mailfront/backend-qmail.so +lib/mailfront/backend-queuedir.so lib/mailfront/plugin-add-received.so lib/mailfront/plugin-check-fqdn.so lib/mailfront/plugin-clamav.so lib/mailfront/plugin-counters.so +lib/mailfront/plugin-cvm-authenticate.so lib/mailfront/plugin-cvm-validate.so lib/mailfront/plugin-mailrules.so lib/mailfront/plugin-patterns.so lib/mailfront/plugin-qmail-validate.so -lib/mailfront/plugin-reject.so -lib/mailfront/plugin-relayclient.so -lib/mailfront/plugin-require-auth.so +lib/mailfront/plugin-rbl.so +lib/mailfront/plugin-spamassassin.so +lib/mailfront/plugin-starttls-ucspi.so lib/mailfront/protocol-qmqp.so lib/mailfront/protocol-qmtp.so lib/mailfront/protocol-smtp.so @@ -33,6 +35,7 @@ share/doc/mailfront/NEWS share/doc/mailfront/README share/doc/mailfront/backend-echo.html share/doc/mailfront/backend-qmail.html +share/doc/mailfront/backend-queuedir.html share/doc/mailfront/imapfront.html share/doc/mailfront/mailfront.html share/doc/mailfront/mailrules.html @@ -46,14 +49,19 @@ share/doc/mailfront/plugin-api.html share/doc/mailfront/plugin-check-fqdn.html share/doc/mailfront/plugin-clamav.html share/doc/mailfront/plugin-counters.html +share/doc/mailfront/plugin-cvm-authenticate.html share/doc/mailfront/plugin-cvm-validate.html share/doc/mailfront/plugin-force-file.html +share/doc/mailfront/plugin-lua.html share/doc/mailfront/plugin-mailrules.html share/doc/mailfront/plugin-patterns.html share/doc/mailfront/plugin-qmail-validate.html +share/doc/mailfront/plugin-rbl.html share/doc/mailfront/plugin-reject.html share/doc/mailfront/plugin-relayclient.html share/doc/mailfront/plugin-require-auth.html +share/doc/mailfront/plugin-spamassassin.html +share/doc/mailfront/plugin-starttls-ucspi.html share/doc/mailfront/plugin-template.html share/doc/mailfront/pop3front.html share/doc/mailfront/protocol-qmqp.html diff --git a/mail/mailfront/distinfo b/mail/mailfront/distinfo index 473e9595b83..00fd3b3afd9 100644 --- a/mail/mailfront/distinfo +++ b/mail/mailfront/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.7 2015/11/03 23:27:08 agc Exp $ +$NetBSD: distinfo,v 1.8 2017/01/02 02:19:46 schmonz Exp $ -SHA1 (mailfront-1.12.tar.gz) = 498cfd1af47dfba45671e731c4f0666fc1c930f9 -RMD160 (mailfront-1.12.tar.gz) = 17f06377d6de8f11d12c1585d55c9e7f8aa97bbc -SHA512 (mailfront-1.12.tar.gz) = 26a5dc791b810ecb9fa262d7263499774201d1a2aeaad997e959daa2cb9ed35b49a12800df29ea17136e32877a4b81bd93998da3748f7e25403f35507a9ca898 -Size (mailfront-1.12.tar.gz) = 104598 bytes -SHA1 (patch-aa) = 3d24a89e07f1d6eae5d80c922b93a35750b3359a +SHA1 (mailfront-2.12.tar.gz) = 87715ddaf78ea98cab9c4d86dddc51e76d05d114 +RMD160 (mailfront-2.12.tar.gz) = cbef138672051eb631155c33163d1482fb193b1c +SHA512 (mailfront-2.12.tar.gz) = 7d98b32b78370e5640c6d3b4268f3cb67baff386ecb7f2e2b982cc2e10b04d75d6ceed692000af4ec3a08bfd40577107d569e64e75b087662e8d66725f7817f8 +Size (mailfront-2.12.tar.gz) = 123228 bytes +SHA1 (patch-INSTHIER) = 41863dc1456663025b901d9b56c3e04ee7460ea4 +SHA1 (patch-Makefile) = 5f15651bc170f773d9fe3f98a69c1251c68fed16 diff --git a/mail/mailfront/patches/patch-INSTHIER b/mail/mailfront/patches/patch-INSTHIER new file mode 100644 index 00000000000..7c154e40e4d --- /dev/null +++ b/mail/mailfront/patches/patch-INSTHIER @@ -0,0 +1,62 @@ +$NetBSD: patch-INSTHIER,v 1.1 2017/01/02 02:19:47 schmonz Exp $ + +Libtoolize, and set reasonable permissions on installed headers. + +--- INSTHIER.orig 2015-02-12 14:10:37.000000000 +0000 ++++ INSTHIER +@@ -1,3 +1,4 @@ ++ + >bin + c:::755::imapfront-auth + c:::755::mailfront +@@ -11,28 +12,28 @@ c:::755::smtpfront-echo + c:::755::smtpfront-qmail + + >modules +-c:::755::backend-echo.so +-c:::755::backend-qmail.so +-c:::755::backend-queuedir.so +-c:::755::plugin-add-received.so +-c:::755::plugin-check-fqdn.so +-c:::755::plugin-clamav.so +-c:::755::plugin-counters.so +-c:::755::plugin-cvm-authenticate.so +-c:::755::plugin-cvm-validate.so +-c?:::755::plugin-lua.so +-c:::755::plugin-mailrules.so +-c:::755::plugin-patterns.so +-c:::755::plugin-qmail-validate.so +-c:::755::plugin-rbl.so +-c:::755::plugin-spamassassin.so +-c:::755::plugin-starttls-ucspi.so +-c:::755::protocol-qmqp.so +-c:::755::protocol-qmtp.so +-c:::755::protocol-smtp.so ++c:::755::backend-echo.so:.libs/backend-echo.0.so ++c:::755::backend-qmail.so:.libs/backend-qmail.0.so ++c:::755::backend-queuedir.so:.libs/backend-queuedir.0.so ++c:::755::plugin-add-received.so:.libs/plugin-add-received.0.so ++c:::755::plugin-check-fqdn.so:.libs/plugin-check-fqdn.0.so ++c:::755::plugin-clamav.so:.libs/plugin-clamav.0.so ++c:::755::plugin-counters.so:.libs/plugin-counters.0.so ++c:::755::plugin-cvm-authenticate.so:.libs/plugin-cvm-authenticate.0.so ++c:::755::plugin-cvm-validate.so:.libs/plugin-cvm-validate.0.so ++c?:::755::plugin-lua.so:.libs/plugin-lua.0.so ++c:::755::plugin-mailrules.so:.libs/plugin-mailrules.0.so ++c:::755::plugin-patterns.so:.libs/plugin-patterns.0.so ++c:::755::plugin-qmail-validate.so:.libs/plugin-qmail-validate.0.so ++c:::755::plugin-rbl.so:.libs/plugin-rbl.0.so ++c:::755::plugin-spamassassin.so:.libs/plugin-spamassassin.0.so ++c:::755::plugin-starttls-ucspi.so:.libs/plugin-starttls-ucspi.0.so ++c:::755::protocol-qmqp.so:.libs/protocol-qmqp.0.so ++c:::755::protocol-qmtp.so:.libs/protocol-qmtp.0.so ++c:::755::protocol-smtp.so:.libs/protocol-smtp.0.so + + >include + d:::755:mailfront +-c:::755:mailfront:constants.h +-c:::755:mailfront:mailfront.h +-c:::755:mailfront:responses.h ++c:::644:mailfront:constants.h ++c:::644:mailfront:mailfront.h ++c:::644:mailfront:responses.h diff --git a/mail/mailfront/patches/patch-Makefile b/mail/mailfront/patches/patch-Makefile new file mode 100644 index 00000000000..02a9adfc6ef --- /dev/null +++ b/mail/mailfront/patches/patch-Makefile @@ -0,0 +1,46 @@ +$NetBSD: patch-Makefile,v 1.1 2017/01/02 02:19:47 schmonz Exp $ + +Libtoolize and avoid "echo -n" in subshells to fix build on OS X. + +--- Makefile.orig 2015-02-12 14:10:37.000000000 +0000 ++++ Makefile +@@ -56,7 +56,7 @@ dl.lib: compile load + @echo 'main() { ; }' >trylib-ldl.c + @{ ./compile trylib-ldl.c && ./load trylib-ldl -ldl; } >/dev/null 2>&1 \ + && { echo -ldl >dl.lib; echo yes; } \ +- || { echo -n >dl.lib; echo no; } ++ || { : >dl.lib; echo no; } + @rm -f trylib-ldl.c trylib-ldl.o trylib-ldl + + docs: +@@ -103,11 +103,25 @@ makelib: + ) >makelib + chmod 755 makelib + +-makeso: conf-ccso conf-ld +- ( echo '#!/bin/sh'; \ +- echo 'source=$$1; shift'; \ +- echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \ +- echo exec `head -n 1 conf-ccso` -DSHARED -I. -L. '-o $${base}.so $$source $${1+"$$@"}'; \ ++makeso: conf-cc conf-ld conf-modules ++ ( if libtool --tag=CC --help >/dev/null 2>&1; then tag='--tag=CC'; fi; \ ++ echo '#!/bin/sh'; \ ++ echo 'FIRSTOBJ=; ALLOBJS=; OTHERARGS='; \ ++ echo 'while [ $$# -gt 0 ]; do'; \ ++ echo ' source=$$1'; \ ++ echo ' base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \ ++ echo ' if [ "$$base" = "$$source" ]; then'; \ ++ echo ' OTHERARGS="$${OTHERARGS} $$source"'; \ ++ echo ' else'; \ ++ echo ' if [ "x$$FIRSTOBJ" = "x" ]; then'; \ ++ echo ' FIRSTOBJ="$${base}.la"'; \ ++ echo ' fi'; \ ++ echo ' ALLOBJS="$${ALLOBJS} $${base}.lo"'; \ ++ echo ' libtool --mode=compile --silent $$tag '`head -n 1 conf-cc`' -I. -Iinclude/bglibs -Iinclude -o $${base}.lo -c $$source'; \ ++ echo ' fi'; \ ++ echo ' shift'; \ ++ echo 'done'; \ ++ echo libtool --mode=link --silent $$tag `head -n 1 conf-ld` -L. '-module -o $${FIRSTOBJ} $${ALLOBJS} $${OTHERARGS} -rpath' `head -n 1 conf-modules`;\ + ) >makeso + chmod 755 makeso + diff --git a/mail/mailfront/patches/patch-aa b/mail/mailfront/patches/patch-aa deleted file mode 100644 index 75d6a13a028..00000000000 --- a/mail/mailfront/patches/patch-aa +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-aa,v 1.2 2009/04/08 01:44:04 schmonz Exp $ - ---- Makefile.orig 2009-02-16 17:35:19.000000000 -0500 -+++ Makefile -@@ -98,10 +98,11 @@ makelib: - makeso: conf-ccso conf-ld conf-bgincs conf-bglibs - ( bgincs=`head -n 1 conf-bgincs`; \ - bglibs=`head -n 1 conf-bglibs`; \ -+ cvmlibs=`head -n 1 conf-cvmlibs`; \ - echo '#!/bin/sh'; \ - echo 'source=$$1; shift'; \ - echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \ -- echo exec `head -n 1 conf-ccso` -DSHARED -I. "-I'$${bgincs}'" -L. "-L'$${bglibs}'" '-o $${base}.so $$source $${1+"$$@"}'; \ -+ echo exec `head -n 1 conf-ccso` -DSHARED -I. "-I'$${bgincs}'" -L. "-L'$${bglibs}'" "-Wl,-R'$${bglibs}'" "-L'$${cvmlibs}'" "-Wl,-R'$${cvmlibs}'" '-o $${base}.so $$source $${1+"$$@"}'; \ - ) >makeso - chmod 755 makeso - -- cgit v1.2.3