Index: head/mail/dovecot2/Makefile =================================================================== --- head/mail/dovecot2/Makefile (revision 444809) +++ head/mail/dovecot2/Makefile (revision 444810) @@ -1,163 +1,164 @@ # Created by: Nagy, Attila # $FreeBSD$ ###################################################################### # Anytime PORTVERSION changes please bump PORTREVISION of # # mail/dovecot2-pigeonhole and also mail/dovecot2-antispam-plugin. # # Please see ports/135311 and ports/146029 for an explanation. # # # # Please be careful when updating this port as changes to this port # # can break mail/dovecot2-pigeonhole. In order to ensure the least # # amount of breakage possible please consult the maintainer of that # # port before updating this one. # ###################################################################### PORTNAME= dovecot PORTVERSION= 2.2.31 +PORTREVISION= 1 CATEGORIES= mail ipv6 MASTER_SITES= https://www.dovecot.org/releases/2.2/ PKGNAMESUFFIX= 2 MAINTAINER= adamw@FreeBSD.org COMMENT= Secure, fast and powerful IMAP and POP3 server LICENSE= LGPL21 MIT LICENSE_COMB= dual CONFLICTS= dovecot-1.[0-9]* USES= cpe iconv libtool ssl USE_RC_SUBR= dovecot GNU_CONFIGURE= yes CONFIGURE_ARGS= --localstatedir=/var \ --with-statedir=/var/db/dovecot \ --without-shadow \ --with-ssl=openssl \ --with-docs USE_LDCONFIG= ${PREFIX}/lib/dovecot INSTALL_TARGET= install-strip USERS= dovecot dovenull GROUPS= ${USERS} OPTIONS_DEFINE= KQUEUE LIBWRAP LZ4 VPOPMAIL DOCS EXAMPLES OPTIONS_DEFAULT=KQUEUE GSSAPI_NONE OPTIONS_SUB= yes OPTIONS_GROUP= DB FTS OPTIONS_GROUP_DB= CDB LDAP MYSQL PGSQL SQLITE OPTIONS_GROUP_FTS= ICU LUCENE SOLR TEXTCAT OPTIONS_SINGLE= GSSAPI OPTIONS_SINGLE_GSSAPI= GSSAPI_NONE GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT KQUEUE_DESC= kqueue(2) support LZ4_DESC= LZ4 compression support VPOPMAIL_DESC= vpopmail support DB_DESC= Database support CDB_DESC= CDB database support FTS_DESC= Full text search plugins ICU_DESC= Use libicu for FTS unicode normalization LUCENE_DESC= CLucene FTS support SOLR_DESC= Solr FTS support TEXTCAT_DESC= Libtextcat FTS support GSSAPI_NONE_DESC= Build without GSSAPI support GSSAPI_BASE_DESC= Use GSSAPI from base GSSAPI_HEIMDAL_DESC= Use Heimdal GSSAPI from security/heimdal GSSAPI_MIT_DESC= Use MIT GSSAPI from security/krb5 # General options KQUEUE_CONFIGURE_OFF= --with-ioloop=poll --with-notify=none KQUEUE_CONFIGURE_ON= --with-ioloop=kqueue --with-notify=kqueue LIBWRAP_CONFIGURE_WITH= libwrap LZ4_CONFIGURE_WITH= lz4 LZ4_LIB_DEPENDS= liblz4.so:archivers/liblz4 VPOPMAIL_BUILD_DEPENDS= vpopmail>=0:mail/vpopmail VPOPMAIL_CONFIGURE_WITH=vpopmail # Databases CDB_CONFIGURE_WITH= cdb CDB_LIB_DEPENDS= libcdb.so:databases/tinycdb LDAP_USE= OPENLDAP=yes LDAP_CONFIGURE_WITH= ldap MYSQL_USES= mysql MYSQL_CONFIGURE_WITH= mysql PGSQL_USES= pgsql PGSQL_CONFIGURE_WITH= pgsql SQLITE_USES= sqlite:3 SQLITE_CONFIGURE_WITH= sqlite # FTS ICU_CONFIGURE_WITH= icu ICU_LIB_DEPENDS= libicui18n.so:devel/icu ICU_USES= pkgconfig LUCENE_CONFIGURE_WITH= lucene LUCENE_LIB_DEPENDS= libclucene-core.so:textproc/clucene SOLR_CONFIGURE_WITH= solr SOLR_LIB_DEPENDS= libcurl.so:ftp/curl \ libexpat.so:textproc/expat2 TEXTCAT_CONFIGURE_WITH= textcat TEXTCAT_LIB_DEPENDS= libtextcat.so:textproc/libtextcat # GSSAPI GSSAPI_NONE_CONFIGURE_ON= --without-gssapi GSSAPI_NONE_CONFIGURE_OFF= --with-gssapi ${GSSAPI_CONFIGURE_ARGS} GSSAPI_BASE_USES= gssapi GSSAPI_HEIMDAL_USES= gssapi:heimdal GSSAPI_MIT_USES= gssapi:mit DOCS= AUTHORS COPYING COPYING.LGPL COPYING.MIT INSTALL NEWS TODO README PORTDOCS= * PORTEXAMPLES= * # Default requirement for dovecot rc script _REQUIRE= LOGIN LDAP_VARS= _REQUIRE+=slapd MYSQL_VARS= _REQUIRE+=mysql PGSQL_VARS= _REQUIRE+=postgresql SUB_LIST+= REQUIRE="${_REQUIRE}" SUB_FILES+= pkg-message CPPFLAGS+= -I${LOCALBASE}/include -I${OPENSSLINC} LDFLAGS+= -L${LOCALBASE}/lib -L${OPENSSLLIB} post-patch: @${REINPLACE_CMD} -e 's,/etc/dovecot,${PREFIX}/etc/dovecot,g; \ s,sysconfdir=/etc,sysconfdir=${PREFIX}/etc,g' \ ${WRKSRC}/doc/example-config/*.conf ${WRKSRC}/doc/example-config/conf.d/* @${REINPLACE_CMD} -e '/^LIBS =/s/$$/ @LTLIBICONV@/' \ ${WRKSRC}/src/lib-mail/Makefile.in # Install the sample config files into ETCDIR/example-config/ @${REINPLACE_CMD} -e '/^exampledir =/s|\$$(docdir)|${ETCDIR}|' \ ${WRKSRC}/doc/example-config/Makefile.in \ ${WRKSRC}/doc/example-config/conf.d/Makefile.in @${REINPLACE_CMD} -e '/^[^#]/s|/usr|${LOCALBASE}|' \ ${WRKSRC}/src/plugins/fts/decode2text.sh post-install: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${MV} ${STAGEDIR}${DOCSDIR}/dovecot-openssl.cnf ${STAGEDIR}${EXAMPLESDIR} ${MV} ${STAGEDIR}${DOCSDIR}/mkcert.sh ${STAGEDIR}${EXAMPLESDIR} post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}) .include Index: head/mail/dovecot2/files/patch-UPSTREAM-notify =================================================================== --- head/mail/dovecot2/files/patch-UPSTREAM-notify (nonexistent) +++ head/mail/dovecot2/files/patch-UPSTREAM-notify (revision 444810) @@ -0,0 +1,84 @@ +NOTIFY was broken since 2.2.31, and this patch reverts that breakage, using two +upstream commits: + +* https://github.com/dovecot/core/commit/bcb321bc62117d30bc53a872ca1154c0100aeefd +* https://github.com/dovecot/core/commit/8b2d740b8182c63b76ff7ef0dd5e01710228705a + +From bcb321bc62117d30bc53a872ca1154c0100aeefd Mon Sep 17 00:00:00 2001 +From: Timo Sirainen +Date: Fri, 30 Jun 2017 17:33:15 +0300 +Subject: [PATCH] imap: Fix NOTIFY parameter parsing by reverting earlier + change + +I misread the RFC and wrote broken tests. +Reverts 64d2efdc4b0bdf92249840e9db89b91c8dc0f3a3 + + +From 8b2d740b8182c63b76ff7ef0dd5e01710228705a Mon Sep 17 00:00:00 2001 +From: Timo Sirainen +Date: Fri, 30 Jun 2017 17:51:34 +0300 +Subject: [PATCH] imap: Add more error checking to NOTIFY parameter parsing + +This should make it clearer to realize when invalid syntax is being used +rather than just ignoring the problem. + + +--- src/imap/cmd-notify.c.orig 2017-06-30 21:31:28 UTC ++++ src/imap/cmd-notify.c +@@ -41,6 +41,8 @@ static int + cmd_notify_parse_fetch(struct imap_notify_context *ctx, + const struct imap_arg *list) + { ++ if (list->type == IMAP_ARG_EOL) ++ return -1; /* at least one attribute must be set */ + return imap_fetch_att_list_parse(ctx->client, ctx->pool, list, + &ctx->fetch_ctx, &ctx->error); + } +@@ -59,11 +61,17 @@ cmd_notify_set_selected(struct imap_noti + strcasecmp(str, "NONE") == 0) { + /* no events for selected mailbox. this is also the default + when NOTIFY command doesn't specify it explicitly */ ++ if (events[1].type != IMAP_ARG_EOL) ++ return -1; /* no extra parameters */ + return 0; + } + + if (!imap_arg_get_list(events, &list)) + return -1; ++ if (events[1].type != IMAP_ARG_EOL) ++ return -1; /* no extra parameters */ ++ if (list->type == IMAP_ARG_EOL) ++ return -1; /* at least one event */ + + for (; list->type != IMAP_ARG_EOL; list++) { + if (cmd_notify_parse_event(list, &event) < 0) +@@ -292,10 +300,10 @@ cmd_notify_set(struct imap_notify_contex + ctx->send_immediate_status = TRUE; + args++; + } ++ for (; args->type != IMAP_ARG_EOL; args++) { ++ if (!imap_arg_get_list(args, &event_group)) ++ return -1; + +- if (!imap_arg_get_list(args, &event_group)) +- return -1; +- for (; event_group->type != IMAP_ARG_EOL; event_group++) { + /* filter-mailboxes */ + if (!imap_arg_get_atom(event_group, &filter_mailboxes)) + return -1; +@@ -322,6 +330,15 @@ cmd_notify_set(struct imap_notify_contex + if (event_group->type == IMAP_ARG_EOL) + return -1; + mailboxes = event_group++; ++ /* check that the mailboxes parameter is valid */ ++ if (IMAP_ARG_IS_ASTRING(mailboxes)) ++ ; ++ else if (!imap_arg_get_list(mailboxes, &list)) ++ return -1; ++ else if (list->type == IMAP_ARG_EOL) { ++ /* should have at least one mailbox */ ++ return -1; ++ } + } else { + mailboxes = NULL; + } Property changes on: head/mail/dovecot2/files/patch-UPSTREAM-notify ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property