spmfilter is a high-performance mail filtering framework, written in C.

It attempts to be a general filtering framework for any purposes.
Filtering mechanisms are provided by plugins, the API enables spmfilter
plugins to access messages as they are being processed by the MTA.
This allows them to examine and modify message content and
meta-information during the SMTP transaction. Plugins are loaded at
runtime and can be processed in any sequence, the processing chain
can also be altered by a single plugin

WWW: http://www.spmfilter.org/

PR:		ports/145673
Submitted by:	Frank Wall <fw at moov.de>
Reworked by:	sahil@ (myself)
Approved by:	wxs@ (mentor)
This commit is contained in:
Sahil Tandon 2010-04-27 02:31:59 +00:00
parent f63d29be37
commit e98328f755
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=253327
6 changed files with 171 additions and 0 deletions

View File

@ -645,6 +645,7 @@
SUBDIR += spamprobe
SUBDIR += spamstats
SUBDIR += spfval
SUBDIR += spmfilter
SUBDIR += spruce
SUBDIR += sqlgrey
SUBDIR += squirrelmail

102
mail/spmfilter/Makefile Normal file
View File

@ -0,0 +1,102 @@
# New ports collection makefile for: spmfilter
# Date created: 2010-04-12
# Whom: Frank Wall <fw@moov.de>
#
# $FreeBSD$
#
PORTNAME= spmfilter
PORTVERSION= 0.4.0
CATEGORIES= mail
MASTER_SITES= http://www.${PORTNAME}.org/attachments/download/51/
MAINTAINER= fw@moov.de
COMMENT= Spmfilter is a high-performance mail filtering framework, written in C
BUILD_DEPENDS= gmime>=2.2:${PORTSDIR}/mail/gmime2 \
libesmtp>=1.0:${PORTSDIR}/mail/libesmtp \
glib>=2.04:${PORTSDIR}/devel/glib20 \
pcre>=6.0:${PORTSDIR}/devel/pcre
RUN_DEPENDS= gmime>=2.2:${PORTSDIR}/mail/gmime2 \
libesmtp>=1.0:${PORTSDIR}/mail/libesmtp \
glib>=2.04:${PORTSDIR}/devel/glib20 \
pcre>=6.0:${PORTSDIR}/devel/pcre
USE_CMAKE= yes
CMAKE_ARGS+= -DCMAKE_INCLUDE_PATH="${LOCALBASE}/include" \
-DCMAKE_LIBRARY_PATH="${LOCALBASE}/lib"
USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME}
USE_RC_SUBR= ${PORTNAME}
OPTIONS= DB4 "Enable DB4 backend" on \
DEBUG "Enable Debugging" off \
LDAP "Enable LDAP backend" off \
MYSQL "Enable MYSQL backend" off \
PGSQL "Enable PGSQL backend" off
# Default requirement for spmfilter rc script
_REQUIRE= LOGIN
.include <bsd.port.pre.mk>
.if !defined(WITH_DB4) || defined(WITHOUT_DB4)
CMAKE_ARGS+= -DWITHOUT_DB4=TRUE
.else
USE_BDB= yes
CMAKE_ARGS+= -DDB4_INCLUDE_DIR="${BDB_INCLUDE_DIR}"
.endif
.if defined(WITH_DEBUG)
CMAKE_ARGS+= -DENABLE_DEBUG=TRUE
.endif
.if !defined(WITH_LDAP) || defined(WITHOUT_LDAP)
CMAKE_ARGS+= -DWITHOUT_LDAP=TRUE
.else
USE_OPENLDAP= yes
.if defined(WITH_OPENLDAP_VER)
WANT_OPENLDAP_VER= ${WITH_OPENLDAP_VER}
.endif
_REQUIRE+= slapd
.endif
.if !defined(WITH_MYSQL) && !defined(WITH_PGSQL)
CMAKE_ARGS+= -DWITHOUT_ZDB=TRUE
.else
LIB_DEPENDS+= zdb:${PORTSDIR}/databases/libzdb
.endif
.if defined(WITH_MYSQL)
USE_MYSQL= yes
_REQUIRE+= mysql
.endif
.if defined(WITH_PGSQL)
USE_PGSQL= yes
_REQUIRE+= postgresql
.endif
MAN1= ${PORTNAME}.1
MAN5= ${PORTNAME}.conf.5
MANCOMPRESSED= yes
SUB_LIST+= REQUIRE="${_REQUIRE}"
post-patch:
@${REINPLACE_CMD} -e 's|share/man|man|' \
${WRKSRC}/cmake/Modules/SMFMacros.cmake
@${REINPLACE_CMD} -E -e 's|(HAVE_DB4 )db|\1${BDB_LIB_NAME}|' \
${WRKSRC}/cmake/Modules/FindDB4.cmake
@${REINPLACE_CMD} -E -e 's|\$${LIBDIR}(/pkgconfig)|$${CMAKE_INSTALL_PREFIX}/libdata\1|' \
-e 's|(COMMON_LIBS )db|\1${BDB_LIB_NAME}|' \
${WRKSRC}/src/CMakeLists.txt
post-install:
@${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample ${PREFIX}/etc/
@if [ ! -f ${PREFIX}/etc/${PORTNAME}.conf ]; then \
${CP} -p ${PREFIX}/etc/${PORTNAME}.conf.sample ${PREFIX}/etc/${PORTNAME}.conf ; \
fi
.include <bsd.port.post.mk>

3
mail/spmfilter/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (spmfilter-0.4.0.tar.gz) = ae8adfc86820da98b45758fdd7688907
SHA256 (spmfilter-0.4.0.tar.gz) = c566c199bd1e4b59dff8f9a186ccaa3b951bc2f2837f838723c8dbdfcc4a3eeb
SIZE (spmfilter-0.4.0.tar.gz) = 52689

View File

@ -0,0 +1,31 @@
#!/bin/sh
# $FreeBSD$
#
# PROVIDE: spmfilter
# REQUIRE: %%REQUIRE%%
# BEFORE: mail
# KEYWORD: shutdown
#
#
# Add the following lines to /etc/rc.conf to enable spmfilter:
#
# spmfilter_enable="YES"
#
# See spmfilter(1) for flags or the config file.
#
. /etc/rc.subr
name=spmfilter
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/spmfilter
load_rc_config $name
: ${spmfilter_enable="NO"}
: ${spmfilter_config="%%PREFIX%%/etc/spmfilter.conf"}
: ${spmfilter_flags="-f ${spmfilter_config}"}
run_rc_command "$1"

11
mail/spmfilter/pkg-descr Normal file
View File

@ -0,0 +1,11 @@
spmfilter is a high-performance mail filtering framework, written in C.
It attempts to be a general filtering framework for any purposes.
Filtering mechanisms are provided by plugins, the API enables spmfilter
plugins to access messages as they are being processed by the MTA.
This allows them to examine and modify message content and
meta-information during the SMTP transaction. Plugins are loaded at
runtime and can be processed in any sequence, the processing chain
can also be altered by a single plugin
WWW: http://www.spmfilter.org/

23
mail/spmfilter/pkg-plist Normal file
View File

@ -0,0 +1,23 @@
include/spmfilter/smf/smf_core.h
include/spmfilter/smf/smf_lookup.h
include/spmfilter/smf/smf_message.h
include/spmfilter/smf/smf_mime.h
include/spmfilter/smf/smf_session.h
include/spmfilter/smf/smf_settings.h
include/spmfilter/smf/smf_trace.h
include/spmfilter/spmfilter.h
include/spmfilter/spmfilter_config.h
libdata/pkgconfig/spmfilter.pc
lib/spmfilter/libpipe.so
lib/spmfilter/libpipe.so.0.4.0
lib/spmfilter/libsmf.so
lib/spmfilter/libsmf.so.0.4.0
lib/spmfilter/libsmtpd.so
lib/spmfilter/libsmtpd.so.0.4.0
sbin/spmfilter
@unexec if cmp -s %D/etc/spmfilter.conf.sample %D/etc/spmfilter.conf; then rm -f %D/etc/spmfilter.conf; fi
etc/spmfilter.conf.sample
@dirrmtry libdata/pkgconfig
@dirrm include/spmfilter/smf
@dirrm include/spmfilter
@dirrm lib/spmfilter