diff options
author | mef <mef@pkgsrc.org> | 2016-05-01 05:56:40 +0000 |
---|---|---|
committer | mef <mef@pkgsrc.org> | 2016-05-01 05:56:40 +0000 |
commit | c18f61f0eba54861dc5b152311017ee2b0a9572d (patch) | |
tree | 5a1314a061f34b45bc3ef9f9490956a6ade3a140 /mail | |
parent | 5dec6bb8f4e37c8609b6c54940d045be6bba0806 (diff) | |
download | pkgsrc-c18f61f0eba54861dc5b152311017ee2b0a9572d.tar.gz |
Updated to mail/opensmtpd-5.7.3p2 (from 5.3.3p1)
- Based on PR pkg/51107 by ISIHARA Takanori
------------------------------------------------
Announce: #OpenSMTPD 5.7.3p2 released
- fixes crash when used with #OpenSSL 1.0.2f - portable only
Diffstat (limited to 'mail')
-rw-r--r-- | mail/opensmtpd/Makefile | 26 | ||||
-rw-r--r-- | mail/opensmtpd/PLIST | 14 | ||||
-rw-r--r-- | mail/opensmtpd/distinfo | 17 | ||||
-rw-r--r-- | mail/opensmtpd/files/mailer.conf | 10 | ||||
-rw-r--r-- | mail/opensmtpd/patches/patch-configure.ac | 12 | ||||
-rw-r--r-- | mail/opensmtpd/patches/patch-mk_smtpd_Makefile.am (renamed from mail/opensmtpd/patches/patch-smtpd_Makefile.am) | 14 | ||||
-rw-r--r-- | mail/opensmtpd/patches/patch-smtpd_queue__fs.c | 19 | ||||
-rw-r--r-- | mail/opensmtpd/patches/patch-smtpd_queue_fsqueue.c | 18 | ||||
-rw-r--r-- | mail/opensmtpd/patches/patch-smtpd_smtp__session.c | 69 |
9 files changed, 142 insertions, 57 deletions
diff --git a/mail/opensmtpd/Makefile b/mail/opensmtpd/Makefile index 6725d23a674..a2874a9f22b 100644 --- a/mail/opensmtpd/Makefile +++ b/mail/opensmtpd/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.7 2016/03/05 11:28:49 jperkin Exp $ +# $NetBSD: Makefile,v 1.8 2016/05/01 05:56:40 mef Exp $ -VERSION= 5.3.3p1 +VERSION= 5.7.3p2 DISTNAME= opensmtpd-${VERSION} -PKGREVISION= 2 CATEGORIES= mail net MASTER_SITES= http://www.opensmtpd.org/archives/ @@ -13,7 +12,7 @@ LICENSE= isc AND modified-bsd AND 2-clause-bsd CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 sendmail-[0-9]* CONFLICTS+= esmtp>=1.2 nullmailer-[0-9]* postfix-[0-9]* -BROKEN_FOR_PLATFORM+= OpenBSD-*-* +BROKEN_FOR_PLATFORM= OpenBSD-*-* BUILD_DEFS+= VARBASE @@ -25,12 +24,21 @@ USE_TOOLS+= automake aclocal autoheader autoconf SMTPD_HOME= ${VARBASE}/chroot/smtpd OWN_DIRS= ${SMTPD_HOME} -PKG_GROUPS= _smtpd -PKG_USERS= _smtpd:_smtpd +PKG_GROUPS= _smtpd _smtpq +PKG_USERS= _smtpd:_smtpd _smtpq:_smtpq PKG_GECOS._smtpd= OpenSMTPD pseudo-user PKG_HOME._smtpd= ${SMTPD_HOME} +PKG_GECOS._smtpq= OpenSMTPD pseudo-user +PKG_HOME._smtpq= ${SMTPD_HOME} GNU_CONFIGURE= yes +USE_DB185= yes +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} +CONFIGURE_ARGS+= --with-mantype=man +CONFIGURE_ARGS+= --with-privsep-path=${SMTPD_HOME} +CONFIGURE_ARGS+= --with-ssl-dir=${SSLBASE:Q} +CONFIGURE_ARGS+= --enable-table-db +CONFIGURE_ARGS+= --without-zlib-version-check EXAMPLEDIR= ${PREFIX}/share/examples/opensmtpd CONF_FILES= ${EXAMPLEDIR}/smtpd.conf ${PKG_SYSCONFDIR}/smtpd.conf @@ -45,7 +53,7 @@ SUBST_STAGE.paths= post-patch SUBST_CLASSES+= exampledir SUBST_STAGE.exampledir= pre-configure SUBST_MESSAGE.exampledir= Fixing exampledir path -SUBST_FILES.exampledir= smtpd/Makefile.am +SUBST_FILES.exampledir= mk/smtpd/Makefile.am SUBST_SED.exampledir+= -e 's,@EXAMPLE_DIR@,${EXAMPLEDIR},' post-extract: @@ -62,7 +70,9 @@ post-install: ${INSTALL_DATA} ${WRKDIR}/mailer.conf \ ${DESTDIR}${EXAMPLEDIR}/mailer.conf -.include "../../databases/db/buildlink3.mk" +.include "../../databases/db5/buildlink3.mk" .include "../../devel/libevent/buildlink3.mk" .include "../../devel/zlib/buildlink3.mk" +.include "../../net/libasr/buildlink3.mk" +.include "../../security/openssl/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/mail/opensmtpd/PLIST b/mail/opensmtpd/PLIST index 290e093c42c..771ba0d6812 100644 --- a/mail/opensmtpd/PLIST +++ b/mail/opensmtpd/PLIST @@ -1,17 +1,19 @@ -@comment $NetBSD: PLIST,v 1.2 2014/03/11 14:05:04 jperkin Exp $ -bin/mailq -bin/newaliases -bin/smtpscript -libexec/mail.local -libexec/opensmtpd/makemap +@comment $NetBSD: PLIST,v 1.3 2016/05/01 05:56:40 mef Exp $ +bin/sendmail +libexec/opensmtpd/encrypt +libexec/opensmtpd/mail.local man/man5/aliases.5 man/man5/forward.5 man/man5/smtpd.conf.5 +man/man5/table.5 man/man8/makemap.8 man/man8/newaliases.8 +man/man8/sendmail.8 man/man8/smtpctl.8 man/man8/smtpd.8 +sbin/mailq sbin/makemap +sbin/newaliases sbin/smtpctl sbin/smtpd share/examples/opensmtpd/mailer.conf diff --git a/mail/opensmtpd/distinfo b/mail/opensmtpd/distinfo index f5c977ca748..16682ebcf2f 100644 --- a/mail/opensmtpd/distinfo +++ b/mail/opensmtpd/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.3 2015/11/03 23:27:11 agc Exp $ +$NetBSD: distinfo,v 1.4 2016/05/01 05:56:40 mef Exp $ -SHA1 (opensmtpd-5.3.3p1.tar.gz) = a7fc3a15b5dc622410fcedf51bbe62e6b6d64df3 -RMD160 (opensmtpd-5.3.3p1.tar.gz) = 97f63e37fa6ce1f5f58d816088c5b356f99167c3 -SHA512 (opensmtpd-5.3.3p1.tar.gz) = 8ea72773dca4f907d2b8285fc7abcd5c4c19ceb50b547cc4a217ec296a222f8134bfc4bc7707439b0c5d58b5354f92ebed65966179d7598c4793cad4370b087b -Size (opensmtpd-5.3.3p1.tar.gz) = 343733 bytes -SHA1 (patch-configure.ac) = ed819952951700c057c11200095a72972aafc1f9 -SHA1 (patch-smtpd_Makefile.am) = 4267002ecadceaf68868b9d782d5e6f8571ebc36 -SHA1 (patch-smtpd_queue_fsqueue.c) = 80dae37705378c022c1a76d31ea54a3f907b6c1a +SHA1 (opensmtpd-5.7.3p2.tar.gz) = 4d1edc5811a80ec26de040227a298a742c494e72 +RMD160 (opensmtpd-5.7.3p2.tar.gz) = 5d6faebea3a303e5effeafbef5def597bfac434e +SHA512 (opensmtpd-5.7.3p2.tar.gz) = bac0b8d6a6969a5e49a1d45b2c74cb2f3da44d06b12c7162500adf3ca312751020762bc8301075a9d7634d94cf51f978d04fac327f843680646e9e687737c42f +Size (opensmtpd-5.7.3p2.tar.gz) = 709074 bytes +SHA1 (patch-configure.ac) = bcf442cf536b44019d25a1e4e9ac2812fc76d928 +SHA1 (patch-mk_smtpd_Makefile.am) = ebc62819300d3ddd824178c08a5630ca85dc6fdc +SHA1 (patch-smtpd_queue__fs.c) = f13d1bf1d26544b3c81e5e2c813d2fe5e917b96b +SHA1 (patch-smtpd_smtp__session.c) = f9c034827519a02b97cadb3c034ad1e84abc805a diff --git a/mail/opensmtpd/files/mailer.conf b/mail/opensmtpd/files/mailer.conf index 18c70d3f15a..0cd17abbb46 100644 --- a/mail/opensmtpd/files/mailer.conf +++ b/mail/opensmtpd/files/mailer.conf @@ -1,7 +1,9 @@ -# $NetBSD: mailer.conf,v 1.1 2013/11/18 22:50:01 pettai Exp $ +# $NetBSD: mailer.conf,v 1.2 2016/05/01 05:56:40 mef Exp $ # # Use "opensmtpd" replacements # -sendmail @PREFIX@/libexec/mail.local -mailq @PREFIX@/bin/mailq -newaliases @PREFIX@/bin/newaliases +sendmail @PREFIX@/sbin/smtpctl +send-mail @PREFIX@/sbin/smtpctl +mailq @PREFIX@/sbin/mailq +makemap @PREFIX@/sbin/makemap +newaliases @PREFIX@/sbin/newaliases diff --git a/mail/opensmtpd/patches/patch-configure.ac b/mail/opensmtpd/patches/patch-configure.ac index 04f8f7e1508..c10552f9f29 100644 --- a/mail/opensmtpd/patches/patch-configure.ac +++ b/mail/opensmtpd/patches/patch-configure.ac @@ -1,14 +1,14 @@ -$NetBSD: patch-configure.ac,v 1.1 2013/11/18 22:50:01 pettai Exp $ +$NetBSD: patch-configure.ac,v 1.2 2016/05/01 05:56:40 mef Exp $ -Add sys/statvfs for NetBSD +Add sys/statvfs for NetBSD. ---- configure.ac.orig 2013-05-16 15:19:59.000000000 +0000 +--- configure.ac.orig 2016-02-02 07:40:06.000000000 +0000 +++ configure.ac -@@ -261,6 +261,7 @@ AC_CHECK_HEADERS([ \ +@@ -338,6 +338,7 @@ AC_CHECK_HEADERS([ \ sys/ndir.h \ sys/pstat.h \ sys/statfs.h \ + sys/statvfs.h \ + sys/time.h \ sys/un.h \ - ucred.h \ - util.h \ + time.h \ diff --git a/mail/opensmtpd/patches/patch-smtpd_Makefile.am b/mail/opensmtpd/patches/patch-mk_smtpd_Makefile.am index a5c0087c47c..5c3baf10517 100644 --- a/mail/opensmtpd/patches/patch-smtpd_Makefile.am +++ b/mail/opensmtpd/patches/patch-mk_smtpd_Makefile.am @@ -1,10 +1,10 @@ -$NetBSD: patch-smtpd_Makefile.am,v 1.1 2013/11/18 22:50:01 pettai Exp $ +$NetBSD: patch-mk_smtpd_Makefile.am,v 1.1 2016/05/01 05:56:40 mef Exp $ -Install the configuration file in the example directory +Install the configuration file in the example directory. ---- smtpd/Makefile.am.orig 2013-03-08 18:22:39.000000000 +0000 -+++ smtpd/Makefile.am -@@ -154,17 +154,16 @@ $(CONFIGFILES): $(CONFIGFILES_IN) +--- mk/smtpd/Makefile.am.orig 2016-02-02 07:40:06.000000000 +0000 ++++ mk/smtpd/Makefile.am +@@ -151,17 +151,16 @@ $(CONFIGFILES): $(CONFIGFILES_IN) # smtpd.conf # newaliases makemap @@ -25,5 +25,5 @@ Install the configuration file in the example directory - fi + $(INSTALL) -m 644 smtpd.conf.out $(DESTDIR)$(EXAMPLE_DIR)/smtpd.conf - ln -f $(DESTDIR)$(sbindir)/smtpctl$(EXEEXT) \ - $(DESTDIR)$(bindir)/mailq$(EXEEXT); + $(INSTALL) -m 644 aliases.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/aliases.5 + $(INSTALL) -m 644 forward.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/forward.5 diff --git a/mail/opensmtpd/patches/patch-smtpd_queue__fs.c b/mail/opensmtpd/patches/patch-smtpd_queue__fs.c new file mode 100644 index 00000000000..62d9ccf3237 --- /dev/null +++ b/mail/opensmtpd/patches/patch-smtpd_queue__fs.c @@ -0,0 +1,19 @@ +$NetBSD: patch-smtpd_queue__fs.c,v 1.1 2016/05/01 05:56:40 mef Exp $ + +NetBSD use statvfs, not statfs. + +--- smtpd/queue_fs.c.orig 2016-02-02 07:40:06.000000000 +0000 ++++ smtpd/queue_fs.c +@@ -30,6 +30,12 @@ + #ifdef HAVE_SYS_STATFS_H + #include <sys/statfs.h> + #endif ++#ifdef HAVE_SYS_STATVFS_H ++#include <sys/statvfs.h> ++#ifdef __NetBSD__ ++#define statfs statvfs ++#endif ++#endif + + #include <ctype.h> + #include <dirent.h> diff --git a/mail/opensmtpd/patches/patch-smtpd_queue_fsqueue.c b/mail/opensmtpd/patches/patch-smtpd_queue_fsqueue.c deleted file mode 100644 index 99ad4e428a2..00000000000 --- a/mail/opensmtpd/patches/patch-smtpd_queue_fsqueue.c +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-smtpd_queue_fsqueue.c,v 1.1 2013/11/18 22:50:01 pettai Exp $ - -NetBSD use statvfs, not statfs. - ---- smtpd/queue_fsqueue.c.orig 2013-05-16 15:19:59.000000000 +0000 -+++ smtpd/queue_fsqueue.c -@@ -26,5 +26,11 @@ - #ifdef HAVE_SYS_STATFS_H - #include <sys/statfs.h> - #endif -+#ifdef HAVE_SYS_STATVFS_H -+#include <sys/statvfs.h> -+#ifdef __NetBSD__ -+#define statfs statvfs -+#endif -+#endif - #include <sys/param.h> - #include <sys/mount.h> diff --git a/mail/opensmtpd/patches/patch-smtpd_smtp__session.c b/mail/opensmtpd/patches/patch-smtpd_smtp__session.c new file mode 100644 index 00000000000..32d32d9564a --- /dev/null +++ b/mail/opensmtpd/patches/patch-smtpd_smtp__session.c @@ -0,0 +1,69 @@ +$NetBSD: patch-smtpd_smtp__session.c,v 1.1 2016/05/01 05:56:40 mef Exp $ + +Add a patch to handle long usernames during SMTP authentication, +e.g. often username exceeds the limit when it contains @host.name +part. + +From FreeBSD's ports. + +cf.http://svnweb.freebsd.org/ports?view=revision&revision=394424 + +--- smtpd/smtp_session.c.orig 2016-02-02 07:40:06.000000000 +0000 ++++ smtpd/smtp_session.c +@@ -84,6 +84,7 @@ enum session_flags { + SF_BADINPUT = 0x0080, + SF_FILTERCONN = 0x0100, + SF_FILTERDATA = 0x0200, ++ SF_USERTOOLONG = 0x0400, + }; + + enum message_flags { +@@ -133,7 +134,7 @@ struct smtp_session { + + char helo[LINE_MAX]; + char cmd[LINE_MAX]; +- char username[LOGIN_NAME_MAX]; ++ char username[LOGIN_NAME_MAX+HOST_NAME_MAX+1]; + + struct envelope evp; + +@@ -986,6 +987,15 @@ smtp_session_imsg(struct mproc *p, struc + + s = tree_xpop(&wait_parent_auth, reqid); + strnvis(user, s->username, sizeof user, VIS_WHITE | VIS_SAFE); ++ ++ if (s->flags & SF_USERTOOLONG) { ++ log_info("smtp-in: sesson %016"PRIx64 ++ ": auth failed because username too long", ++ s->id); ++ s->flags &= (~SF_USERTOOLONG); ++ success = LKA_PERMFAIL; ++ } ++ + if (success == LKA_OK) { + log_info("smtp-in: session %016"PRIx64 + ": authentication successful for user %s ", +@@ -1925,7 +1935,7 @@ smtp_rfc4954_auth_plain(struct smtp_sess + user++; /* skip NUL */ + if (strlcpy(s->username, user, sizeof(s->username)) + >= sizeof(s->username)) +- goto abort; ++ s->flags |= SF_USERTOOLONG; + + pass = memchr(user, '\0', len - (user - buf)); + if (pass == NULL || pass >= buf + len - 2) +@@ -1965,9 +1975,12 @@ smtp_rfc4954_auth_login(struct smtp_sess + + case STATE_AUTH_USERNAME: + memset(s->username, 0, sizeof(s->username)); +- if (base64_decode(arg, (unsigned char *)s->username, +- sizeof(s->username) - 1) == -1) ++ if (base64_decode(arg, (unsigned char *)buf, ++ sizeof(buf) - 1) == -1) + goto abort; ++ if (strlcpy(s->username, buf, sizeof(s->username)) ++ >= sizeof(s->username)) ++ s->flags |= SF_USERTOOLONG; + + smtp_enter_state(s, STATE_AUTH_PASSWORD); + smtp_reply(s, "334 UGFzc3dvcmQ6"); |