From f80ed3ff015cbb6ed40852329cc20d339e3f78eb Mon Sep 17 00:00:00 2001 From: xtraeme Date: Thu, 25 Nov 2004 05:42:40 +0000 Subject: Initial import of gld-1.4 into the NetBSD packages collection. Gld is a standalone greylisting server for Postfix SMTP, it listens on a TCP port and use MySQL for storing data. The server supports whitelists based on sender,sender_domain and client_ip, it supports also light greylisting and DNS white lists. --- mail/gld/DESCR | 6 ++++++ mail/gld/MESSAGE | 23 +++++++++++++++++++++++ mail/gld/Makefile | 40 ++++++++++++++++++++++++++++++++++++++++ mail/gld/PLIST | 9 +++++++++ mail/gld/distinfo | 5 +++++ mail/gld/files/gld.sh | 23 +++++++++++++++++++++++ mail/gld/patches/patch-aa | 35 +++++++++++++++++++++++++++++++++++ 7 files changed, 141 insertions(+) create mode 100644 mail/gld/DESCR create mode 100644 mail/gld/MESSAGE create mode 100644 mail/gld/Makefile create mode 100644 mail/gld/PLIST create mode 100644 mail/gld/distinfo create mode 100644 mail/gld/files/gld.sh create mode 100644 mail/gld/patches/patch-aa (limited to 'mail/gld') diff --git a/mail/gld/DESCR b/mail/gld/DESCR new file mode 100644 index 00000000000..b5c0661823b --- /dev/null +++ b/mail/gld/DESCR @@ -0,0 +1,6 @@ +Gld is a standalone greylisting server for Postfix SMTP, it +listens on a TCP port and use MySQL for storing data. + +The server supports whitelists based on sender,sender_domain +and client_ip, it supports also light greylisting and DNS white +lists. diff --git a/mail/gld/MESSAGE b/mail/gld/MESSAGE new file mode 100644 index 00000000000..ed3e447bfe7 --- /dev/null +++ b/mail/gld/MESSAGE @@ -0,0 +1,23 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2004/11/25 05:42:40 xtraeme Exp $ + +To configure gld, the following steps should be acomplished: + +$ mysql -e "create database gld" +$ mysql -e "grant all on gld.* to gld@localhost identified by 'PASSWORD'" +$ mysql gld < ${PREFIX}/share/gld/tables.sql + +Modify "PASSWORD" with your desired password. + +Now edit your postfix's main.cf configuration file, and add the following +line: + + smtpd_recipient_restrictions = \ + check_policy_service inet:127.0.0.1:2525, + reject_unauth_destination + +Start gld via ${RCD_SCRIPTS_DIR}/gld start + +it should be running fine now; good luck! + +=========================================================================== diff --git a/mail/gld/Makefile b/mail/gld/Makefile new file mode 100644 index 00000000000..fa456441b9e --- /dev/null +++ b/mail/gld/Makefile @@ -0,0 +1,40 @@ +# $NetBSD: Makefile,v 1.1.1.1 2004/11/25 05:42:40 xtraeme Exp $ +# + +DISTNAME= gld-1.4 +CATEGORIES= mail +MASTER_SITES= http://www.gasmi.net/down/ +EXTRACT_SUFX= .tgz + +MAINTAINER= xtraeme@NetBSD.org +HOMEPAGE= http://www.gasmi.net/ +COMMENT= Standalone greylisting server for Postfix + +USE_BUILDLINK3= yes +USE_PKGINSTALL= yes +GNU_CONFIGURE= yes + +CONFIGURE_ARGS+= --with-mysql=${BUILDLINK_PREFIX.mysql-client} + +EGDIR= ${PREFIX}/share/examples/${PKGBASE} +CONF_FILES= ${EGDIR}/gld.conf ${PKG_SYSCONFDIR}/gld.conf + +RCD_SCRIPTS= gld +GLD_USER?= gld +GLD_GROUP?= gld +PKG_GROUPS= ${GLD_GROUP} +PKG_USERS= ${GLD_USER}:${GLD_GROUP}::Greylisting\\ Daemon\\ user + +SUBST_CLASSES+= gld users +SUBST_STAGE.gld= post-patch +SUBST_FILES.gld= gld.h +SUBST_SED.gld= -e "s,/etc,${PKG_SYSCONFDIR}," +SUBST_MESSAGE.gld= "Fixing harcoded paths." +SUBST_STAGE.users= post-patch +SUBST_FILES.users= gld.conf +SUBST_SED.users+= -e "s|\#USER=nobody|USER=${GLD_USER}|" +SUBST_SED.users+= -e "s|\#GROUP=nobody|GROUP=${GLD_GROUP}|" +SUBST_MESSAGE.users= "Adjusting user/group in configuration file." + +.include "../../mk/mysql.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/mail/gld/PLIST b/mail/gld/PLIST new file mode 100644 index 00000000000..1f2907cb137 --- /dev/null +++ b/mail/gld/PLIST @@ -0,0 +1,9 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2004/11/25 05:42:40 xtraeme Exp $ +bin/gld +share/doc/gld/LICENCE +share/doc/gld/README +share/examples/gld/gld.conf +share/gld/tables.sql +@dirrm share/gld +@dirrm share/examples/gld +@dirrm share/doc/gld diff --git a/mail/gld/distinfo b/mail/gld/distinfo new file mode 100644 index 00000000000..99f71402a8d --- /dev/null +++ b/mail/gld/distinfo @@ -0,0 +1,5 @@ +$NetBSD: distinfo,v 1.1.1.1 2004/11/25 05:42:40 xtraeme Exp $ + +SHA1 (gld-1.4.tgz) = c5844b1537407dad658fd4e47fe6104047af9346 +Size (gld-1.4.tgz) = 35714 bytes +SHA1 (patch-aa) = 90310c9e831372c7a94048cff47c72a17b65f605 diff --git a/mail/gld/files/gld.sh b/mail/gld/files/gld.sh new file mode 100644 index 00000000000..52ae91fd93f --- /dev/null +++ b/mail/gld/files/gld.sh @@ -0,0 +1,23 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: gld.sh,v 1.1.1.1 2004/11/25 05:42:40 xtraeme Exp $ +# + +# PROVIDE: gld +# BEFORE: postfix +# REQUIRE: DAEMON LOGIN + +. /etc/rc.subr + +name="gld" +rcvar=$name +command="@PREFIX@/bin/${name}" +required_files="@PKG_SYSCONFDIR@/$name.conf" +pidfile="@VARBASE@/run/${name}.pid" + +if [ "$1" != "stop" ]; then + echo $(check_process $command) > $pidfile +fi + +load_rc_config $name +run_rc_command "$1" diff --git a/mail/gld/patches/patch-aa b/mail/gld/patches/patch-aa new file mode 100644 index 00000000000..54ec17d64a0 --- /dev/null +++ b/mail/gld/patches/patch-aa @@ -0,0 +1,35 @@ +$NetBSD: patch-aa,v 1.1.1.1 2004/11/25 05:42:40 xtraeme Exp $ + +--- Makefile.in.orig 2004-07-14 22:52:53.000000000 +0200 ++++ Makefile.in 2004-11-25 05:53:05.000000000 +0100 +@@ -1,8 +1,8 @@ + all: gld + + gld: cnf.o server.o sql.o sockets.o greylist.o gld.h +- @CC@ -O2 @DEFS@ -Wall server.o sql.o sockets.o cnf.o greylist.o @MYSQL_LIBS@ -o gld +- strip gld ++ @CC@ -O2 @DEFS@ -Wall server.o sql.o sockets.o cnf.o greylist.o \ ++ $(LDFLAGS) -lmysqlclient -o gld + + sockets.o: sockets.c sockets.h + @CC@ -O2 @DEFS@ -Wall -c sockets.c +@@ -23,11 +23,14 @@ + rm -f gld *.o + + install: gld gld.conf +- mkdir -p /usr/local/bin +- cp gld /usr/local/bin +- chmod 700 /usr/local/bin/gld +- cp gld.conf /etc/gld.conf.sample +- chmod 600 /etc/gld.conf.sample ++ $(BSD_INSTALL_PROGRAM_DIR) $(PREFIX)/bin ++ $(BSD_INSTALL_PROGRAM) gld $(PREFIX)/bin ++ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/examples/gld ++ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/gld ++ $(BSD_INSTALL_DATA_DIR) $(PREFIX)/share/doc/gld ++ $(BSD_INSTALL_DATA) gld.conf $(PREFIX)/share/examples/gld ++ $(BSD_INSTALL_DATA) tables.sql $(PREFIX)/share/gld ++ $(BSD_INSTALL_DATA) README LICENCE $(PREFIX)/share/doc/gld + + distclean: clean + rm -f Makefile config.status config.log config.cache -- cgit v1.2.3