mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
Add synonym 0.4-3, the email message archiver.
Synonym is a product that allows a company to easily archive all email messages going in and out. It can copy mail messages, delete, reject or add a text and/or html signature based on a XML based configuration file listing regular expression rules. WWW: http://www.modulo.ro/synonym/
This commit is contained in:
parent
84711623fa
commit
752010c8f7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=148549
@ -519,6 +519,7 @@
|
||||
SUBDIR += sympa
|
||||
SUBDIR += sympa-elixus
|
||||
SUBDIR += sympa5
|
||||
SUBDIR += synonym
|
||||
SUBDIR += t-prot
|
||||
SUBDIR += teapop
|
||||
SUBDIR += teapop-devel
|
||||
|
59
mail/synonym/Makefile
Normal file
59
mail/synonym/Makefile
Normal file
@ -0,0 +1,59 @@
|
||||
# New ports collection makefile for: synonym
|
||||
# Date created: 2005/11/16
|
||||
# Whom: Norikatsu Shigemura <n-shigemura@ensure.jp>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= synonym
|
||||
PORTVERSION= 0.4.3
|
||||
CATEGORIES= mail security
|
||||
MASTER_SITES= http://www.modulo.ro/source/
|
||||
DISTNAME= ${PORTNAME}-0.4-3
|
||||
|
||||
MAINTAINER= nork@FreeBSD.org
|
||||
COMMENT= Synonym, the email message archiver
|
||||
|
||||
USE_GMAKE= yes
|
||||
USE_GNOME= libxml2
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}-0.4
|
||||
PORTDOCS= README license.txt
|
||||
USE_RC_SUBR= synonym.sh
|
||||
|
||||
MAKE_ENV+= PTHREAD_CFLAGS=${PTHREAD_CFLAGS} \
|
||||
PTHREAD_LIBS=${PTHREAD_LIBS} \
|
||||
DOCSDIR=${DOCSDIR} \
|
||||
RUNDIR=${RUNDIR} \
|
||||
SYNONYMOWN=${SYNONYMOWN} SYNONYMGRP=${SYNONYMGRP}
|
||||
PLIST_SUB+= RUNDIR=${RUNDIR}
|
||||
SUB_LIST+= RUNDIR=${RUNDIR}
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
RUNDIR?= /var/run/synonym
|
||||
SYNONYMOWN?= daemon
|
||||
SYNONYMGRP?= daemon
|
||||
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
|
||||
post-extract:
|
||||
@${RM} ${WRKSRC}/*.o
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
do-install:
|
||||
@${INSTALL_PROGRAM} ${WRKSRC}/synonym ${PREFIX}/sbin/
|
||||
@${INSTALL_DATA} ${WRKSRC}/synonym.conf ${PREFIX}/etc/synonym.conf-dist
|
||||
@[ -f ${PREFIX}/etc/synonym.conf ] || \
|
||||
${INSTALL_DATA} ${WRKSRC}/synonym.conf ${PREFIX}/etc/synonym.conf
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
.for f in ${PORTDOCS}
|
||||
@${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/${f}
|
||||
.endfor
|
||||
.endif
|
||||
@${MKDIR} ${RUNDIR}
|
||||
@${CHOWN} ${SYNONYMOWN}:${SYNONYMGRP} ${RUNDIR}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
3
mail/synonym/distinfo
Normal file
3
mail/synonym/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (synonym-0.4-3.tar.gz) = 10d06233988647725021862682a3d744
|
||||
SHA256 (synonym-0.4-3.tar.gz) = a94b7292612e2c46eb97559a549adf444792210303eec02cf0054b9055a43c7c
|
||||
SIZE (synonym-0.4-3.tar.gz) = 473453
|
78
mail/synonym/files/patch-Makefile
Normal file
78
mail/synonym/files/patch-Makefile
Normal file
@ -0,0 +1,78 @@
|
||||
--- Makefile.orig Mon Oct 25 22:53:12 2004
|
||||
+++ Makefile Thu Nov 17 15:03:31 2005
|
||||
@@ -3,18 +3,19 @@
|
||||
OSTYPE := $(shell uname -s)
|
||||
|
||||
ifeq ($(OSTYPE), FreeBSD)
|
||||
- CC=gcc -Wall -pthread
|
||||
- SYNONYM_USER=daemon
|
||||
- SYNONYM_GROUP=daemon
|
||||
- INCLUDEPATH=-I/usr/local/include/libxml2 -I/usr/local/include
|
||||
- LIBXML=-lxml2
|
||||
-
|
||||
- SYNONYM_BINDIR=$(SYNONYM_BASEDIR)/usr/local/sbin
|
||||
- SYNONYM_RUNDIR=$(SYNONYM_BASEDIR)/var/run/synonym
|
||||
- SYNONYM_SCRIPTDIR=$(SYNONYM_BASEDIR)/usr/local/etc/rc.d
|
||||
+ CFLAGS+=-Wall ${PTHREAD_CFLAGS} -DPREFIX='"${PREFIX}"' -DRUNDIR='"${RUNDIR}"'
|
||||
+ CFLAGS+=-DSYNONYM_USER='"${SYNONYM_USER}"' -DSYNONYM_GROUP='"${SYNONYM_GROUP}"'
|
||||
+ SYNONYM_USER=${SYNONYMOWN}
|
||||
+ SYNONYM_GROUP=${SYNONYMGRP}
|
||||
+ INCLUDEPATH=-I${LOCALBASE}/include/libxml2 -I${LOCALBASE}/include
|
||||
+ LIBXML=-lxml2 ${PTHREAD_LIBS}
|
||||
+
|
||||
+ SYNONYM_BINDIR=$(SYNONYM_BASEDIR)${PREFIX}/sbin
|
||||
+ SYNONYM_RUNDIR=$(SYNONYM_BASEDIR)${RUNDIR}
|
||||
+ SYNONYM_SCRIPTDIR=$(SYNONYM_BASEDIR)${PREFIX}/etc/rc.d
|
||||
SYNONYM_SCRIPT_NAME=synonym.sh
|
||||
- SYNONYM_CONFIGDIR=$(SYNONYM_BASEDIR)/etc
|
||||
- SYNONYM_DOCDIR=$(SYNONYM_BASEDIR)/usr/local/share/doc/synonym
|
||||
+ SYNONYM_CONFIGDIR=$(SYNONYM_BASEDIR)/${PREFIX}/etc
|
||||
+ SYNONYM_DOCDIR=$(SYNONYM_BASEDIR)${DOCSDIR}
|
||||
endif
|
||||
|
||||
ifeq ($(OSTYPE), Linux)
|
||||
@@ -77,35 +78,35 @@
|
||||
# This variable will be void if libsmutil.a does not exist (and hence is not needed) on the system
|
||||
LIBSMUTIL := $(shell (echo "/lib" && echo "/usr/lib" && echo "/usr/local/lib" && if test -f /etc/ld.so.conf ; then cat /etc/ld.so.conf ; fi) | while read libpath && [ \( "$$FOUND" != "1" \) ]; do if [ -f $$libpath/libsmutil.a ] ; then echo "-lsmutil";FOUND=1 ; fi; done)
|
||||
|
||||
-LIBPATH=-L/usr/local/lib
|
||||
+LIBPATH=-L${LOCALBASE}/lib
|
||||
|
||||
|
||||
|
||||
all: synonym
|
||||
|
||||
synonym: synonym.o config.o filtering.o $(DISCLAIMER)
|
||||
- $(CC) synonym.o $(DISCLAIMER) -lmilter config.o filtering.o $(PTHREAD) -o synonym $(LIBSMUTIL) $(LIBPATH) $(LIBXML) $(CCLIENTLIB) $(EXTRA_LIBS)
|
||||
+ $(CC) ${CFLAGS} ${LDFLAGS} synonym.o $(DISCLAIMER) -lmilter config.o filtering.o $(PTHREAD) -o synonym $(LIBSMUTIL) $(LIBPATH) $(LIBXML) $(CCLIENTLIB) $(EXTRA_LIBS)
|
||||
|
||||
synonym.o: synonym.c synonym.h config.h filtering.h
|
||||
- $(CC) -c synonym.c $(DISCLAIMER_DEFINE) -o synonym.o $(INCLUDEPATH)
|
||||
+ $(CC) $(CFLAGS) -c synonym.c $(DISCLAIMER_DEFINE) -o synonym.o $(INCLUDEPATH)
|
||||
|
||||
config.o: config.c config.h synonym.h
|
||||
- $(CC) -c config.c $(DISCLAIMER_DEFINE) -o config.o $(INCLUDEPATH)
|
||||
+ $(CC) $(CFLAGS) -c config.c $(DISCLAIMER_DEFINE) -o config.o $(INCLUDEPATH)
|
||||
|
||||
filtering.o: filtering.c filtering.h synonym.h
|
||||
- $(CC) -c filtering.c $(DISCLAIMER_DEFINE) -o filtering.o $(INCLUDEPATH)
|
||||
+ $(CC) $(CFLAGS) -c filtering.c $(DISCLAIMER_DEFINE) -o filtering.o $(INCLUDEPATH)
|
||||
|
||||
html_parser.o: html_parser.c html_parser.h
|
||||
- $(CC) -c html_parser.c -o html_parser.o $(INCLUDEPATH)
|
||||
+ $(CC) $(CFLAGS) -c html_parser.c -o html_parser.o $(INCLUDEPATH)
|
||||
|
||||
disclaimer.o: disclaimer.c disclaimer.h html_parser.o scan.o
|
||||
- $(CC) -c disclaimer.c -o disclaimer.o $(INCLUDEPATH) $(CCLIENTINCLUDE)
|
||||
+ $(CC) $(CFLAGS) -c disclaimer.c -o disclaimer.o $(INCLUDEPATH) $(CCLIENTINCLUDE)
|
||||
|
||||
scan.o: scan.c
|
||||
- $(CC) -c scan.c -o scan.o $(INCLUDEPATH)
|
||||
+ $(CC) $(CFLAGS) -c scan.c -o scan.o $(INCLUDEPATH)
|
||||
|
||||
body_parser.o: body_parser.c body_parser.h
|
||||
- $(CC) -c body_parser.c -o body_parser.o $(INCLUDEPATH) $(CCLIENTINCLUDE)
|
||||
+ $(CC) $(CFLAGS) -c body_parser.c -o body_parser.o $(INCLUDEPATH) $(CCLIENTINCLUDE)
|
||||
|
||||
filtering.h: milter_data.h
|
||||
@touch filtering.h
|
14
mail/synonym/files/patch-synonym.c
Normal file
14
mail/synonym/files/patch-synonym.c
Normal file
@ -0,0 +1,14 @@
|
||||
--- synonym.c.orig Mon Jan 19 21:20:30 2004
|
||||
+++ synonym.c Thu Nov 17 15:27:10 2005
|
||||
@@ -512,11 +512,6 @@
|
||||
}
|
||||
if(delete_email)
|
||||
return SMFIS_DISCARD;
|
||||
- if(add_copy)
|
||||
- {
|
||||
- copyto_list[strlen(copyto_list)-2]='\0';
|
||||
- smfi_addheader(ctx, "X-Synonym", copyto_list);
|
||||
- }
|
||||
return SMFIS_CONTINUE;
|
||||
|
||||
}
|
17
mail/synonym/files/patch-synonym.h
Normal file
17
mail/synonym/files/patch-synonym.h
Normal file
@ -0,0 +1,17 @@
|
||||
--- synonym.h.orig Mon Oct 25 22:53:09 2004
|
||||
+++ synonym.h Thu Nov 17 15:04:36 2005
|
||||
@@ -56,10 +56,10 @@
|
||||
/*
|
||||
* Defaults
|
||||
*/
|
||||
-#define PIDFILE "/var/run/synonym/synonym.pid"
|
||||
-#define DEFAULT_SOCKET "local:/var/run/synonym/synonym.sock"
|
||||
-#define DEFAULT_CONFIG "/etc/synonym.conf"
|
||||
-#define DEFAULT_USER "mail"
|
||||
+#define PIDFILE RUNDIR "/synonym.pid"
|
||||
+#define DEFAULT_SOCKET "local:" RUNDIR "/synonym.sock"
|
||||
+#define DEFAULT_CONFIG PREFIX "/etc/synonym.conf"
|
||||
+#define DEFAULT_USER SYNONYM_USER
|
||||
#define DEFAULT_LOGLEVEL LOG_ERR
|
||||
#define DEFAULT_LOGFACILITY LOG_MAIL
|
||||
#define DEFAULT_LOGLEVEL_STRING "LOG_ERR"
|
33
mail/synonym/files/pkg-message.in
Normal file
33
mail/synonym/files/pkg-message.in
Normal file
@ -0,0 +1,33 @@
|
||||
================================================================
|
||||
** PLEASE SETUP YOUR /etc/rc.conf ***
|
||||
If you want to use synonym, please add following line:
|
||||
|
||||
synonym_enable="YES"
|
||||
|
||||
If you don't want to use synonym, you can set synonym_enable="NO".
|
||||
|
||||
|
||||
** PLEASE SETUP YOUR /etc/mail/sendmail.mc ***
|
||||
If you want to use synonym, please add following line:
|
||||
|
||||
INPUT_MAIL_FILTER(`Synonym', `S=local:%%RUNDIR%%/synonym.sock, T=C:10m;S:1s;R:1s;E:5m')
|
||||
|
||||
|
||||
** PLEASE SETUP YOUR %%PREFIX%%/etc/synonym.conf ***
|
||||
|
||||
If you want to archive all email message, please set following
|
||||
lines:
|
||||
|
||||
<Rules>
|
||||
<Rule>
|
||||
<Condition>
|
||||
<Header>From</Header>
|
||||
<Match>.*</Match>
|
||||
</Condition>
|
||||
<Action>
|
||||
<ActionType>Copy</ActionType>
|
||||
<Address>foo@example.com</Address>
|
||||
</Action>
|
||||
</Rule>
|
||||
</Rules>
|
||||
|
41
mail/synonym/files/synonym.sh.in
Normal file
41
mail/synonym/files/synonym.sh.in
Normal file
@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: synonym
|
||||
# REQUIRE: DAEMON
|
||||
# BEFORE: mail
|
||||
# KEYWORD: FreeBSD shutdown
|
||||
#
|
||||
# Define these synonym_* variables in one of these files:
|
||||
# /etc/rc.conf
|
||||
# /etc/rc.conf.local
|
||||
# /etc/rc.conf.d/synonym
|
||||
#
|
||||
# DO NOT CHANGE THESE DEFAULT VALUES HERE
|
||||
#
|
||||
synonym_enable=${synonym_enable-"NO"}
|
||||
synonym_pidfile=${synonym_pidfile-"%%RUNDIR%%/synonym.pid"}
|
||||
synonym_conffile=${synonym_conffile-"%%PREFIX%%/etc/synonym.conf"}
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
name=synonym
|
||||
rcvar=`set_rcvar`
|
||||
command=%%PREFIX%%/sbin/${name}
|
||||
|
||||
load_rc_config ${name}
|
||||
|
||||
case "${synonym_flags}" in
|
||||
*-c\ *)
|
||||
echo "Warning: \$synonym_flags includes -c option." \
|
||||
"Please use \$synonym_conffile instead."
|
||||
;;
|
||||
*)
|
||||
synonym_flags="-c ${synonym_conffile} ${synonym_flags:--d}" ;;
|
||||
esac
|
||||
|
||||
pidfile=${synonym_pidfile}
|
||||
required_files=${synonym_conffile}
|
||||
|
||||
run_rc_command "$1"
|
7
mail/synonym/pkg-descr
Normal file
7
mail/synonym/pkg-descr
Normal file
@ -0,0 +1,7 @@
|
||||
Synonym is a product that allows a company to easily
|
||||
archive all email messages going in and out. It can
|
||||
copy mail messages, delete, reject or add a text
|
||||
and/or html signature based on a XML based configuration
|
||||
file listing regular expression rules.
|
||||
|
||||
WWW: http://www.modulo.ro/synonym/
|
6
mail/synonym/pkg-plist
Normal file
6
mail/synonym/pkg-plist
Normal file
@ -0,0 +1,6 @@
|
||||
sbin/synonym
|
||||
@unexec if cmp -s %D/etc/synonym.conf %D/etc/synonym.conf-dist; then rm -f %D/etc/synonym.conf; fi
|
||||
etc/synonym.conf-dist
|
||||
@exec [ ! -f %B/synonym.conf ] && cp -p %B/%f %B/synonym.conf
|
||||
@exec mkdir -p %%RUNDIR%%
|
||||
@unexec rmdir %%RUNDIR%% 2> /dev/null || true
|
Loading…
Reference in New Issue
Block a user