From owner-svn-ports-head@freebsd.org Thu Jul 23 06:43:42 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2E4A3731C1; Thu, 23 Jul 2020 06:43:42 +0000 (UTC) (envelope-from bofh@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BC2q25kngz47kL; Thu, 23 Jul 2020 06:43:42 +0000 (UTC) (envelope-from bofh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A800D14C2B; Thu, 23 Jul 2020 06:43:42 +0000 (UTC) (envelope-from bofh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06N6hgtS022914; Thu, 23 Jul 2020 06:43:42 GMT (envelope-from bofh@FreeBSD.org) Received: (from bofh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06N6hfNn022907; Thu, 23 Jul 2020 06:43:41 GMT (envelope-from bofh@FreeBSD.org) Message-Id: <202007230643.06N6hfNn022907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bofh set sender to bofh@FreeBSD.org using -f From: Muhammad Moinur Rahman Date: Thu, 23 Jul 2020 06:43:41 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r542917 - in head/mail/dbmail: . files X-SVN-Group: ports-head X-SVN-Commit-Author: bofh X-SVN-Commit-Paths: in head/mail/dbmail: . files X-SVN-Commit-Revision: 542917 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2020 06:43:43 -0000 Author: bofh Date: Thu Jul 23 06:43:41 2020 New Revision: 542917 URL: https://svnweb.freebsd.org/changeset/ports/542917 Log: mail/dbmail: Fix imap connection failure - Fix failed to retrieve fd limits PR: 247561 Submitted by: ahicks@p-o.co.uk Added: head/mail/dbmail/files/patch-src_dm__imapsession.c (contents, props changed) head/mail/dbmail/files/patch-src_dm__misc.c (contents, props changed) Modified: head/mail/dbmail/Makefile head/mail/dbmail/files/patch-acinclude.m4 Modified: head/mail/dbmail/Makefile ============================================================================== --- head/mail/dbmail/Makefile Thu Jul 23 05:50:23 2020 (r542916) +++ head/mail/dbmail/Makefile Thu Jul 23 06:43:41 2020 (r542917) @@ -4,6 +4,7 @@ PORTNAME= dbmail PORTVERSION= 3.2.4 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= mail MAINTAINER= bofh@FreeBSD.org Modified: head/mail/dbmail/files/patch-acinclude.m4 ============================================================================== --- head/mail/dbmail/files/patch-acinclude.m4 Thu Jul 23 05:50:23 2020 (r542916) +++ head/mail/dbmail/files/patch-acinclude.m4 Thu Jul 23 06:43:41 2020 (r542917) @@ -1,6 +1,6 @@ ---- acinclude.m4.orig 2015-01-25 10:20:50 UTC +--- acinclude.m4.orig 2020-06-08 07:19:38 UTC +++ acinclude.m4 -@@ -221,7 +221,7 @@ if ( test [ "x$lookforldap" != "xno" ] || test [ "x$lo +@@ -222,7 +222,7 @@ if ( test [ "x$lookforldap" != "xno" ] || test [ "x$lo dnl See if we already have the paths we need in the environment. dnl ...but only if --with-ldap was given without a specific path. if ( test [ "x$lookforldap" = "xyes" ] || test [ "x$lookforauthldap" = "xyes" ] ); then @@ -9,7 +9,7 @@ if test [ "x$LDAPLIB" != "xfailed" ]; then break fi -@@ -233,7 +233,7 @@ if ( test [ "x$lookforldap" != "xno" ] || test [ "x$lo +@@ -234,7 +234,7 @@ if ( test [ "x$lookforldap" != "xno" ] || test [ "x$lo SAVE_CFLAGS=$CFLAGS dnl The headers might be in a funny place, so we need to use -Ipath CFLAGS="$CFLAGS -L$TEST_PATH $LDAPINC" @@ -18,7 +18,7 @@ CFLAGS=$SAVE_CFLAGS if test [ "x$LDAPLIB" != "xfailed" ]; then break 2 -@@ -247,7 +247,7 @@ if ( test [ "x$lookforldap" != "xno" ] || test [ "x$lo +@@ -248,7 +248,7 @@ if ( test [ "x$lookforldap" != "xno" ] || test [ "x$lo AC_MSG_ERROR([Could not find LDAP library.]) else AC_DEFINE([AUTHLDAP], 1, [Define if LDAP will be used.]) @@ -27,7 +27,7 @@ AC_SUBST(LDAPLIB) AC_SUBST(LDAPINC) AUTHALIB="modules/.libs/libauth_ldap.a" -@@ -339,7 +341,7 @@ AC_DEFUN([DM_CHECK_EVENT], [ +@@ -334,7 +334,7 @@ AC_DEFUN([DM_CHECK_EVENT], [ AC_DEFUN([DM_CHECK_SSL], [ AC_CHECK_HEADERS([openssl/ssl.h], @@ -36,7 +36,7 @@ if test [ "x$SSLLIB" = "xfailed" ]; then AC_MSG_ERROR([Could not find OPENSSL library.]) else -@@ -539,15 +541,15 @@ AC_DEFUN([CMU_SOCKETS], [ +@@ -544,15 +544,15 @@ AC_DEFUN([CMU_SOCKETS], [ save_LIBS="$LIBS" SOCKETLIB="" AC_CHECK_FUNC(connect, :, Added: head/mail/dbmail/files/patch-src_dm__imapsession.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/dbmail/files/patch-src_dm__imapsession.c Thu Jul 23 06:43:41 2020 (r542917) @@ -0,0 +1,16 @@ +--- src/dm_imapsession.c.orig 2020-07-23 04:06:59 UTC ++++ src/dm_imapsession.c +@@ -804,9 +804,10 @@ static void _fetch_headers(ImapSession *self, body_fet + "m.mailbox_idnr = %" PRIu64 " " + "AND m.message_idnr %s " + "AND status < %d " +- //"AND n.headername %s IN ('%s') " //old, from the sql point of view is slow +- "having seq %s %d " //patch Cosmin Cioranu, removing the above conditions needs a restriction, patched added +- "ORDER BY message_idnr, seq", ++ //"AND n.headername %s IN ('%s') " //old, from the sql point of view is slow, CC 2020 ++ "GROUP By m.message_idnr, n.headername, v.headervalue " ++ "having seq %s %d " ++ "ORDER BY m.message_idnr, seq", + not?"":fieldorder->str, + DBPFX, DBPFX, DBPFX, DBPFX, + self->mailbox->id, p_string_str(range), Added: head/mail/dbmail/files/patch-src_dm__misc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/dbmail/files/patch-src_dm__misc.c Thu Jul 23 06:43:41 2020 (r542917) @@ -0,0 +1,21 @@ +--- src/dm_misc.c.orig 2020-06-29 22:53:45 UTC ++++ src/dm_misc.c +@@ -131,6 +131,10 @@ int drop_privileges(char *newuser, char *newgroup) + + int get_opened_fd_count(void) + { ++#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__SUNPRO_C) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) ++ // BSD like systems don't use proc ++ return 0; ++#else + DIR* dir = NULL; + struct dirent* entry = NULL; + char buf[32]; +@@ -147,6 +151,7 @@ int get_opened_fd_count(void) + closedir(dir); + + return fd_count - 2; /* exclude '.' and '..' entries */ ++#endif + } + + void create_unique_id(char *target, uint64_t message_idnr)