diff options
author | vsevolod <vsevolod@FreeBSD.org> | 2011-02-02 23:40:58 +0800 |
---|---|---|
committer | vsevolod <vsevolod@FreeBSD.org> | 2011-02-02 23:40:58 +0800 |
commit | 7dc97add2a277c2892b42c25973ce90ce5ad5136 (patch) | |
tree | c27c1831d5db08b397d03aa5940b9b3cab064d3e /mail | |
parent | 0a025395c5ed67cd5f0a5e39428dcac935dce8b6 (diff) | |
download | freebsd-ports-gnome-7dc97add2a277c2892b42c25973ce90ce5ad5136.tar.gz freebsd-ports-gnome-7dc97add2a277c2892b42c25973ce90ce5ad5136.tar.zst freebsd-ports-gnome-7dc97add2a277c2892b42c25973ce90ce5ad5136.zip |
Add rspamd - fast and modular spam filtering system written in C
in event driven paradigma.
Reviewed by: az
Feature safe: yes
Diffstat (limited to 'mail')
-rw-r--r-- | mail/Makefile | 1 | ||||
-rw-r--r-- | mail/rspamd/Makefile | 72 | ||||
-rw-r--r-- | mail/rspamd/distinfo | 2 | ||||
-rw-r--r-- | mail/rspamd/files/redirector.sh.in | 33 | ||||
-rw-r--r-- | mail/rspamd/files/rspamd.sh.in | 52 | ||||
-rw-r--r-- | mail/rspamd/pkg-descr | 5 | ||||
-rw-r--r-- | mail/rspamd/pkg-plist | 32 |
7 files changed, 197 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile index efa91d84c98d..c577d9aa3c57 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -601,6 +601,7 @@ SUBDIR += roundcube-mobilecube SUBDIR += roundcube-mvision2 SUBDIR += roundcube-umich + SUBDIR += rspamd SUBDIR += rss2email SUBDIR += ruby-rfilter SUBDIR += ruby-rmail diff --git a/mail/rspamd/Makefile b/mail/rspamd/Makefile new file mode 100644 index 000000000000..58f5a588c7ac --- /dev/null +++ b/mail/rspamd/Makefile @@ -0,0 +1,72 @@ +# New ports collection makefile for: rspamd +# Date created: 2010-09-27 +# Whom: Vsevolod Stakhov <vsevolod@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= rspamd +PORTVERSION= 0.3.5 +CATEGORIES= mail +MASTER_SITES= http://highsecure.ru/ + +MAINTAINER= vsevolod@FreeBSD.org +COMMENT= Fast spam filtering system + +LIB_DEPENDS= pcre.0:${PORTSDIR}/devel/pcre \ + gmime-2.0:${PORTSDIR}/mail/gmime2 \ + event-1.4:${PORTSDIR}/devel/libevent + +OPTIONS= RSPAMD_GPERF "Enable google perf-tools profiling" off \ + RSPAMD_JUDY "Enable Judy arrays usage for performance" off \ + RSPAMD_REDIRECTOR "Install HTTP redirector" off + +USE_RC_SUBR= rspamd.sh + +LICENSE= BSD + +PLIST_SUB+= ETCDIR=etc/rspamd \ + RSPAMDVERSION=${PORTVERSION} +CMAKE_ARGS+= -DETC_PREFIX=${PREFIX}/etc -DPREFIX=${PREFIX} \ + -DBUILD_PORT=yes + +USE_CMAKE= yes +USE_LDCONFIG= yes + +USE_GNOME= glib20 +USE_LUA= 5.1- + +.include <bsd.port.pre.mk> + +.if defined(WITH_RSPAMD_GPERF) + CMAKE_ARGS+= -DENABLE_GPERF_TOOLS=ON + LIB_DEPENDS+= profiler.0:${PORTSDIR}/devel/google-perftools +.endif + +.if defined(WITH_RSPAMD_JUDY) + LIB_DEPENDS+= Judy:${PORTSDIR}/devel/judy +.endif + +.if defined(WITH_RSPAMD_REDIRECTOR) + USE_PERL= 5.8+ + CMAKE_ARGS+= -DENABLE_REDIRECTOR=ON + PLIST_SUB+= REDIRECTOR="" + USE_RC_SUBR+= redirector.sh + RUN_DEPENDS+= \ + p5-IO-Socket-SSL>=0:${PORTSDIR}/security/p5-IO-Socket-SSL \ + p5-IO-String>=0:${PORTSDIR}/devel/p5-IO-String \ + p5-XML-Parser>=0:${PORTSDIR}/textproc/p5-XML-Parser \ + p5-Term-ReadKey>=0:${PORTSDIR}/devel/p5-Term-ReadKey \ + p5-POE-Component-Client-DNS>=0:${PORTSDIR}/dns/p5-POE-Component-Client-DNS \ + p5-POE-Component-Client-HTTP>=0:${PORTSDIR}/www/p5-POE-Component-Client-HTTP \ + p5-POE-Component-Server-HTTP>=0:${PORTSDIR}/www/p5-POE-Component-Server-HTTP \ + p5-Cache-Memcached-Fast>=0:${PORTSDIR}/databases/p5-Cache-Memcached-Fast \ + p5-Proc-PidUtil>=0:${PORTSDIR}/sysutils/p5-Proc-PidUtil \ + p5-Proc-Daemon>=0:${PORTSDIR}/devel/p5-Proc-Daemon \ + p5-Digest-SHA256>=0:${PORTSDIR}/security/p5-Digest-SHA256 \ + p5-SWF-File>=0:${PORTSDIR}/graphics/p5-SWF-File +.else + PLIST_SUB+= REDIRECTOR="@comment " +.endif + +.include <bsd.port.post.mk> diff --git a/mail/rspamd/distinfo b/mail/rspamd/distinfo new file mode 100644 index 000000000000..f38a0a2875ce --- /dev/null +++ b/mail/rspamd/distinfo @@ -0,0 +1,2 @@ +SHA256 (rspamd-0.3.5.tar.gz) = 23e5b834cf1846efec1a7913563a65f98be0065e621b601fb7150ad275c4af96 +SIZE (rspamd-0.3.5.tar.gz) = 707938 diff --git a/mail/rspamd/files/redirector.sh.in b/mail/rspamd/files/redirector.sh.in new file mode 100644 index 000000000000..8c24e624d5a4 --- /dev/null +++ b/mail/rspamd/files/redirector.sh.in @@ -0,0 +1,33 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: rspamd_redirector +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable countd: +# rspamd-redirector (bool): Set to "NO" by default. +# Set it to "YES" to enable redirector. + +. /etc/rc.subr + +name="rspamd_redirector" +rcvar=`set_rcvar` +procname="%%PREFIX%%/bin/rspamd-redirector" + +load_rc_config $name + +: ${rspamd_redirector_enable="NO"} +: ${rspamd_redirector_pidfile="/var/run/rspamd/redirector.pid"} + +stop_postcmd="rm -f $rspamd_redirector_pidfile" + +extra_commands="reload" +sig_reload="USR1" + +command="$procname" +command_interpreter="/usr/bin/perl" + +run_rc_command "$1" diff --git a/mail/rspamd/files/rspamd.sh.in b/mail/rspamd/files/rspamd.sh.in new file mode 100644 index 000000000000..2c9f20c3527b --- /dev/null +++ b/mail/rspamd/files/rspamd.sh.in @@ -0,0 +1,52 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: rspamd +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable countd: +# rspamd (bool): Set to "NO" by default. +# Set it to "YES" to enable rspamd. + +. /etc/rc.subr + +name="rspamd" +rcvar=`set_rcvar` +procname="%%PREFIX%%/bin/rspamd" +restart_precmd="rspamd_checkconfig" +reload_precmd="rspamd_checkconfig" +configtest_cmd="rspamd_checkconfig" +reopenlog_cmd="reopenlog_cmd" + +load_rc_config $name + +: ${rspamd_enable="NO"} +: ${rspamd_pidfile="/var/run/rspamd/rspamd.pid"} +: ${rspamd_user="nobody"} +: ${rspamd_group="nobody"} + +pidfile="$rspamd_pidfile" + +stop_postcmd="rm -f $rspamd_pidfile" + +rspamd_checkconfig() +{ + echo "Performing sanity check on rspamd configuration:" + eval ${command} -t +} + +reopenlog_cmd() +{ + pkill -USR1 -F $rspamd_pidfile +} + +extra_commands="reload configtest reopenlog" +sig_reload="HUP" + +command="$procname" +command_args="-u ${rspamd_user} -g ${rspamd_group} -c /usr/local/etc/rspamd.xml" + +run_rc_command "$1" diff --git a/mail/rspamd/pkg-descr b/mail/rspamd/pkg-descr new file mode 100644 index 000000000000..a2795d35dc1e --- /dev/null +++ b/mail/rspamd/pkg-descr @@ -0,0 +1,5 @@ +Rspamd is fast, modular and lightweight spam filter. It is designed to work +with big ammount of mail and can be easily extended with own filters written in +lua. + +WWW: http://bitbucket.org/vstakhov/rspamd/wiki/Home diff --git a/mail/rspamd/pkg-plist b/mail/rspamd/pkg-plist new file mode 100644 index 000000000000..aadf233d75b9 --- /dev/null +++ b/mail/rspamd/pkg-plist @@ -0,0 +1,32 @@ +bin/rspamd-%%RSPAMDVERSION%% +bin/rspamd +bin/rspamc-%%RSPAMDVERSION%% +bin/rspamc +%%REDIRECTOR%%bin/rspamd-redirector +etc/rspamd.xml.sample +%%ETCDIR%%/2tld.inc +%%ETCDIR%%/2tld.inc.orig +%%ETCDIR%%/plugins/lua/forged_recipients.lua +%%ETCDIR%%/plugins/lua/maillist.lua +%%ETCDIR%%/plugins/lua/multimap.lua +%%ETCDIR%%/plugins/lua/once_received.lua +%%ETCDIR%%/plugins/lua/received_rbl.lua +%%ETCDIR%%/plugins/lua/whitelist.lua +%%ETCDIR%%/plugins/lua/phishing.lua +%%ETCDIR%%/plugins/lua/trie.lua +%%ETCDIR%%/lua/regexp/drugs.lua +%%ETCDIR%%/lua/regexp/fraud.lua +%%ETCDIR%%/lua/regexp/headers.lua +%%ETCDIR%%/lua/regexp/lotto.lua +%%ETCDIR%%/lua/rspamd.lua +lib/librspamd_ipmark.so +lib/librspamd_regmark.so +lib/librspamdclient.so.%%RSPAMDVERSION%% +lib/librspamdclient.so +lib/librspamdclient_static.a +include/librspamdclient.h +@dirrmtry %%ETCDIR%%/plugins/lua +@dirrmtry %%ETCDIR%%/plugins/ +@dirrmtry %%ETCDIR%%/lua/regexp +@dirrmtry %%ETCDIR%%/lua/ +@dirrmtry %%ETCDIR%% |