Index: head/mail/rspamd/Makefile =================================================================== --- head/mail/rspamd/Makefile (revision 463668) +++ head/mail/rspamd/Makefile (revision 463669) @@ -1,102 +1,103 @@ # $FreeBSD$ PORTNAME= rspamd PORTVERSION= 1.6.6 +PORTREVISION= 1 CATEGORIES= mail MAINTAINER= vsevolod@FreeBSD.org COMMENT= Fast spam filtering system LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libpcre.so:devel/pcre \ libevent.so:devel/libevent \ libluajit-5.1.so:lang/luajit \ libfann.so:math/fann \ libicui18n.so:devel/icu BUILD_DEPENDS= ragel:devel/ragel CONFLICTS_INSTALL= rspamd-devel OPTIONS_DEFINE= GPERF GD CGP OPTIONS_DEFINE_amd64= HYPERSCAN CGP_DESC= Install Communigate Pro(tm) helper GD_DESC= Enable libgd support for images fuzzy hashes GPERF_DESC= Google perf-tools profiling HYPERSCAN_DESC= Use hyperscan optimizations (amd64 only) USE_RC_SUBR= rspamd SUB_FILES= pkg-message rspamd.newsyslog.conf.sample PLIST_SUB+= ETCDIR=etc/rspamd \ RSPAMDVERSION=${PORTVERSION} CMAKE_ARGS+= -DCONFDIR=${PREFIX}/etc/rspamd \ -DLOGDIR=/var/log/rspamd \ -DDBDIR=/var/db/rspamd \ -DRUNDIR=/var/run/rspamd \ -DMANDIR=${MANPREFIX}/man \ -DCMAKE_INSTALL_PREFIX=${PREFIX} \ -DBUILD_PORT=yes \ -DLIBDIR=${PREFIX}/lib/rspamd \ -DNO_SHARED=ON \ -DENABLE_FANN=ON USES= cmake:outsource pkgconfig perl5 \ compiler:c11 sqlite ssl USE_LDCONFIG= yes USE_PERL5= build run USE_GNOME= glib20 USE_GITHUB= yes GH_ACCOUNT= vstakhov .include .if ${PORT_OPTIONS:MGD} CMAKE_ARGS+= -DENABLE_GD=ON LIB_DEPENDS+= libgd.so:graphics/gd .else CMAKE_ARGS+= -DENABLE_GD=OFF .endif .if ${PORT_OPTIONS:MGPERF} CMAKE_ARGS+= -DENABLE_GPERF_TOOLS=ON LIB_DEPENDS+= libprofiler.so:devel/google-perftools .endif .if ${PORT_OPTIONS:MHYPERSCAN} CMAKE_ARGS+= -DENABLE_HYPERSCAN=ON LIB_DEPENDS+= libhs.so:devel/hyperscan .endif .if ${PORT_OPTIONS:MCGP} PLIST_SUB+= CGP="" RUN_DEPENDS+= \ p5-AnyEvent-HTTP>=0:www/p5-AnyEvent-HTTP \ p5-AnyEvent>=0:devel/p5-AnyEvent \ p5-EV>=0:devel/p5-EV \ p5-JSON-XS>=0:converters/p5-JSON-XS .else PLIST_SUB+= CGP="@comment " .endif post-install: @${MKDIR} \ ${STAGEDIR}/var/log/rspamd \ ${STAGEDIR}/var/db/rspamd \ ${STAGEDIR}/var/run/rspamd # Linux specific ${RM} ${STAGEDIR}/${ETCDIR}/rspamd.systemd.conf # No need, since rspamd.conf.sample is a same ${RM} ${STAGEDIR}/${ETCDIR}/rspamd.sysvinit.conf ${INSTALL_DATA} ${WRKDIR}/rspamd.newsyslog.conf.sample ${STAGEDIR}${ETCDIR} @${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d ${LN} -s ${ETCDIR}/rspamd.newsyslog.conf ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d .if ${PORT_OPTIONS:MCGP} ${INSTALL_SCRIPT} ${WRKSRC}/utils/cgp_rspamd.pl ${STAGEDIR}${PREFIX}/bin/rspamd-cgp-helper .endif .include Index: head/mail/rspamd/files/patch-src_libserver_milter.c =================================================================== --- head/mail/rspamd/files/patch-src_libserver_milter.c (nonexistent) +++ head/mail/rspamd/files/patch-src_libserver_milter.c (revision 463669) @@ -0,0 +1,113 @@ +--- src/libserver/milter.c.orig 2017-10-22 16:16:54 UTC ++++ src/libserver/milter.c +@@ -99,6 +99,8 @@ rspamd_milter_session_reset (struct rspa + guint i; + + if (how & RSPAMD_MILTER_RESET_IO) { ++ msg_debug_milter ("cleanup IO on abort"); ++ + DL_FOREACH_SAFE (priv->out_chain, obuf, obuf_tmp) { + rspamd_milter_obuf_free (obuf); + } +@@ -111,8 +113,11 @@ rspamd_milter_session_reset (struct rspa + } + + if (how & RSPAMD_MILTER_RESET_COMMON) { ++ msg_debug_milter ("cleanup common data on abort"); ++ + if (session->message) { + session->message->len = 0; ++ msg_debug_milter ("cleanup message on abort"); + } + + if (session->rcpts) { +@@ -120,30 +125,38 @@ rspamd_milter_session_reset (struct rspa + rspamd_email_address_unref (cur); + } + ++ msg_debug_milter ("cleanup %d recipients on abort", ++ (gint)session->rcpts->len); ++ + g_ptr_array_free (session->rcpts, TRUE); + session->rcpts = NULL; + } + + if (session->from) { ++ msg_debug_milter ("cleanup from"); + rspamd_email_address_unref (session->from); + session->from = NULL; + } + + if (session->helo) { ++ msg_debug_milter ("cleanup helo"); + session->helo->len = 0; + } + + if (session->hostname) { ++ msg_debug_milter ("cleanup hostname"); + session->hostname->len = 0; + } + + if (priv->headers) { ++ msg_debug_milter ("cleanup headers"); + g_hash_table_remove_all (priv->headers); + } + } + + if (how & RSPAMD_MILTER_RESET_ADDR) { + if (session->addr) { ++ msg_debug_milter ("cleanup addr"); + rspamd_inet_address_free (session->addr); + session->addr = NULL; + } +@@ -151,6 +164,7 @@ rspamd_milter_session_reset (struct rspa + + if (how & RSPAMD_MILTER_RESET_MACRO) { + if (session->macros) { ++ msg_debug_milter ("cleanup macros"); + g_hash_table_unref (session->macros); + session->macros = NULL; + } +@@ -1545,7 +1559,7 @@ rspamd_milter_send_task_results (struct + msg_err_milter ("cannot find scan results, tempfail"); + rspamd_milter_send_action (session, RSPAMD_MILTER_TEMPFAIL); + +- return; ++ goto cleanup; + } + + elt = ucl_object_lookup (results, "action"); +@@ -1554,7 +1568,7 @@ rspamd_milter_send_task_results (struct + msg_err_milter ("cannot find action in results, tempfail"); + rspamd_milter_send_action (session, RSPAMD_MILTER_TEMPFAIL); + +- return; ++ goto cleanup; + } + + rspamd_action_from_str (ucl_object_tostring (elt), &action); +@@ -1614,7 +1628,6 @@ rspamd_milter_send_task_results (struct + } + + rspamd_milter_set_reply (session, rcode, xcode, reply); +- rspamd_milter_send_action (session, RSPAMD_MILTER_REJECT); + } + break; + case METRIC_ACTION_SOFT_REJECT: +@@ -1629,7 +1642,6 @@ rspamd_milter_send_task_results (struct + } + + rspamd_milter_set_reply (session, rcode, xcode, reply); +- rspamd_milter_send_action (session, RSPAMD_MILTER_REJECT); + break; + + case METRIC_ACTION_REWRITE_SUBJECT: +@@ -1674,6 +1686,8 @@ cleanup: + rspamd_fstring_free (rcode); + rspamd_fstring_free (xcode); + rspamd_fstring_free (reply); ++ ++ rspamd_milter_session_reset (session, RSPAMD_MILTER_RESET_ABORT); + } + + void Property changes on: head/mail/rspamd/files/patch-src_libserver_milter.c ___________________________________________________________________ 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