diff --git a/mail/Makefile b/mail/Makefile index 64ce65d46496..e6a5fabf8f43 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -180,6 +180,7 @@ SUBDIR += qmailanalog SUBDIR += qpopper SUBDIR += qtools + SUBDIR += raysfilter SUBDIR += razor-agents SUBDIR += rblcheck SUBDIR += regm diff --git a/mail/raysfilter/Makefile b/mail/raysfilter/Makefile new file mode 100644 index 000000000000..e1fc3c0fa51e --- /dev/null +++ b/mail/raysfilter/Makefile @@ -0,0 +1,79 @@ +# New ports collection makefile for: raysfilter +# Date created: 19.Dec 2001 +# Whom: dirk.meyer@dinoex.sub.org +# +# $FreeBSD$ +# + +PORTNAME= raysfilter +PORTVERSION= 1.14 +CATEGORIES= mail +MASTER_SITES= http://www.sendmail-filter.sbu.ac.uk/ +DISTNAME= rays-filter-${PORTVERSION} + +MAINTAINER= dinoex@FreeBSD.org + +BUILD_DEPENDS= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail + +CTARGETS+= rays-filter +CFLAGS+= -Wall -I$(LOCALBASE)/include ${PTHREAD_CFLAGS:S=""==} +FLAGS+= ${PTHREAD_LIBS} +LDFLAGS+= -L$(LOCALBASE)/lib +ETCFILES= header-list.conf mail-filter.conf string-list.conf +BINFILES= mf-reset mf-start mf-stop mf-archive mf-analyze mf-memory +DOCSFILES= rays-filter.html install.html configure.html operate.html \ + utilities.html GNU-public-licence.txt copyright.txt README + +.include + +.if exists(${LOCALBASE}/include/libmilter/mfdef.h) +LIBS+= -lmilter -lsm -lsmutil +.else +LIBS+= -lmilter -lsmutil +.endif + +.if defined(BATCH) +SENDMAIL_WITH_MILTER= yes +.endif + +.if defined(SENDMAIL_WITH_SFIO) +LIBS+= -lsfio +.endif + +.if ! defined(SENDMAIL_WITH_MILTER) +pre-fetch: + @${ECHO_MSG} + @${ECHO_MSG} You must set variable SENDMAIL_WITH_MILTER to YES, + @${ECHO_MSG} and rebuild sendmail in the ports + @${FALSE} +.endif + +.for i in ${CTARGETS} +${i}: + cd ${WRKSRC} && \ + $(CC) $(CFLAGS) $(LDFLAGS) -o ${i} ${i}.c $(LIBS) $(FLAGS) + +.endfor + +do-build: ${CTARGETS} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/rays-filter \ + ${PREFIX}/libexec/rays-filter + ${INSTALL_SCRIPT} ${WRKSRC}/mail-filter \ + ${PREFIX}/etc/rc.d/raysfilter.sh.sample +.for i in ${BINFILES} + ${INSTALL_SCRIPT} ${WRKSRC}/${i} ${PREFIX}/bin/ +.endfor + ${MKDIR} ${PREFIX}/etc/mail-filter +.for i in ${ETCFILES} + ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/etc/mail-filter/${i}-dist +.endfor +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} +.for i in ${DOCSFILES} + ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}/ +.endfor +.endif + +.include diff --git a/mail/raysfilter/distinfo b/mail/raysfilter/distinfo new file mode 100644 index 000000000000..af3bd85daa65 --- /dev/null +++ b/mail/raysfilter/distinfo @@ -0,0 +1 @@ +MD5 (rays-filter-1.14.tar.gz) = 645599f1a4ed8c4b549ee3c9f8c10d12 diff --git a/mail/raysfilter/files/patch-rays-filter.c b/mail/raysfilter/files/patch-rays-filter.c new file mode 100644 index 000000000000..18701f074f1e --- /dev/null +++ b/mail/raysfilter/files/patch-rays-filter.c @@ -0,0 +1,32 @@ +--- rays-filter.c.orig Thu Mar 8 13:41:20 2001 ++++ rays-filter.c Sat Jan 19 15:49:11 2002 +@@ -65,8 +65,8 @@ + #include + #include + #include ++#include + #include "libmilter/mfapi.h" +-#include "libmilter/milter.h" + #include "rays-filter.h" + + +@@ -326,6 +326,7 @@ + syslog(LOG_INFO, "Cannot allocate memory for log file name\n"); + else + { ++#if 0 + if (mktemp(priv->mlfi_fname) == NULL) + syslog(LOG_INFO, "Cannot make name for log file\n"); + else +@@ -334,6 +335,11 @@ + if (priv->mlfi_fname == NULL) + syslog(LOG_INFO, "Cannot open log file\n"); + } ++#else ++ priv->mlfi_fp = mkstemp(priv->mlfi_fname); ++ if ( priv->mlfi_fp < 0 ) ++ syslog(LOG_INFO, "Cannot open new log file\n"); ++#endif + } + + return 0; diff --git a/mail/raysfilter/pkg-comment b/mail/raysfilter/pkg-comment new file mode 100644 index 000000000000..219f10891010 --- /dev/null +++ b/mail/raysfilter/pkg-comment @@ -0,0 +1 @@ +A configurable filter for Sendmail diff --git a/mail/raysfilter/pkg-descr b/mail/raysfilter/pkg-descr new file mode 100644 index 000000000000..334b4da8ba24 --- /dev/null +++ b/mail/raysfilter/pkg-descr @@ -0,0 +1,17 @@ +Ray's Mail Filter, Copyright (C) 2000 South Bank University, London + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + + The configuration files, header-list.conf and string-list.conf control + which message headers the filter examines and what strings it looks + for in those headers. The filter will look for all of the specified + strings in all of the specified headers. + + The configuration files can be changed while the filter is running. + The mail-filter reset command is then used to signal the program to + re-read the files. + +WWW: http://www.sendmail-filter.sbu.ac.uk/ diff --git a/mail/raysfilter/pkg-plist b/mail/raysfilter/pkg-plist new file mode 100644 index 000000000000..e8f72755297f --- /dev/null +++ b/mail/raysfilter/pkg-plist @@ -0,0 +1,22 @@ +@comment $FreeBSD$ +libexec/rays-filter +bin/mf-reset +bin/mf-start +bin/mf-stop +bin/mf-archive +bin/mf-analyze +bin/mf-memory +etc/rc.d/raysfilter.sh.sample +etc/mail-filter/header-list.conf-dist +etc/mail-filter/mail-filter.conf-dist +etc/mail-filter/string-list.conf-dist +@dirrm etc/mail-filter +%%PORTDOCS%%share/doc/raysfilter/rays-filter.html +%%PORTDOCS%%share/doc/raysfilter/install.html +%%PORTDOCS%%share/doc/raysfilter/configure.html +%%PORTDOCS%%share/doc/raysfilter/operate.html +%%PORTDOCS%%share/doc/raysfilter/utilities.html +%%PORTDOCS%%share/doc/raysfilter/GNU-public-licence.txt +%%PORTDOCS%%share/doc/raysfilter/copyright.txt +%%PORTDOCS%%share/doc/raysfilter/README +%%PORTDOCS%%@dirrm share/doc/raysfilter