From 5ce204e36bbcf3ae2687309d6bbbf3028d604f54 Mon Sep 17 00:00:00 2001 From: alek Date: Thu, 27 Jan 2005 20:51:41 +0000 Subject: [PATCH] Import drac 1.12 DRAC (Dynamic Relay Authorization Control) is a daemon that dynamically updates a relay authorization map for sendmail. It provides a way to allow legitimate users to relay mail through an SMTP server, while still preventing others from using it as a spam relay. User's IP addresses are added to the map immediately after they have authenticated to the POP or IMAP server. By default, map entries expire after 30 minutes, but can be renewed by additional authentication. Periodically checking mail on a POP server is sufficient to do this. The POP and SMTP servers can be on different hosts. From Antoine Jacoutot --- mail/drac/Makefile | 41 ++++++++++++++++++++++++++++ mail/drac/distinfo | 4 +++ mail/drac/patches/patch-Makefile | 42 +++++++++++++++++++++++++++++ mail/drac/patches/patch-dracauth_3 | 12 +++++++++ mail/drac/patches/patch-rpc_dracd_c | 13 +++++++++ mail/drac/pkg/DESCR | 9 +++++++ mail/drac/pkg/PLIST | 13 +++++++++ 7 files changed, 134 insertions(+) create mode 100644 mail/drac/Makefile create mode 100644 mail/drac/distinfo create mode 100644 mail/drac/patches/patch-Makefile create mode 100644 mail/drac/patches/patch-dracauth_3 create mode 100644 mail/drac/patches/patch-rpc_dracd_c create mode 100644 mail/drac/pkg/DESCR create mode 100644 mail/drac/pkg/PLIST diff --git a/mail/drac/Makefile b/mail/drac/Makefile new file mode 100644 index 00000000000..2ec05c6d9e7 --- /dev/null +++ b/mail/drac/Makefile @@ -0,0 +1,41 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2005/01/27 20:51:41 alek Exp $ + +COMMENT= "dynamic relay authorization control daemon" + +DISTNAME= drac +PKGNAME= ${DISTNAME}-1.12 +CATEGORIES= mail + +HOMEPAGE= http://mail.cc.umanitoba.ca/drac/ + +MAINTAINER= Antoine Jacoutot + +# BSD alike +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes +WANTLIB= c + +MASTER_SITES= ftp://ftp.cc.umanitoba.ca/src/ +EXTRACT_SUFX= .tar.Z + +WRKDIST= ${WRKDIR} + +MAKE_ENV= SYSCONFDIR=${SYSCONFDIR} + +pre-build: + cd ${WRKSRC} && perl -pi -e "s,/etc,${SYSCONFDIR},g" rpc.dracd.1m + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/rpc.dracd ${PREFIX}/libexec + ${INSTALL_DATA} ${WRKSRC}/drac.h ${PREFIX}/include + ${INSTALL_DATA} ${WRKSRC}/libdrac.a ${PREFIX}/lib + ${INSTALL_MAN} ${WRKSRC}/dracauth.3 ${PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/rpc.dracd.1m ${PREFIX}/man/man1/rpc.dracd.1 + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/drac + ${INSTALL_DATA} ${WRKSRC}/dracd.allow-sample ${PREFIX}/share/examples/drac/ + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/drac + ${INSTALL_DATA} ${WRKSRC}/COPYRIGHT ${PREFIX}/share/doc/drac/ + +.include diff --git a/mail/drac/distinfo b/mail/drac/distinfo new file mode 100644 index 00000000000..2192377efff --- /dev/null +++ b/mail/drac/distinfo @@ -0,0 +1,4 @@ +MD5 (drac.tar.Z) = fadaee589bf1dd9067222d58637d5fe4 +RMD160 (drac.tar.Z) = b2a485c554e8d97a6defe0046bb9c485c6014a54 +SHA1 (drac.tar.Z) = 2434e7f238ee1212c742705d3653dedec64266f5 +SIZE (drac.tar.Z) = 20705 diff --git a/mail/drac/patches/patch-Makefile b/mail/drac/patches/patch-Makefile new file mode 100644 index 00000000000..fc5a331e75f --- /dev/null +++ b/mail/drac/patches/patch-Makefile @@ -0,0 +1,42 @@ +--- Makefile.orig Sun Jan 12 21:45:12 2003 ++++ Makefile Thu Jan 27 21:43:16 2005 +@@ -5,7 +5,7 @@ + + # Paths + +-INSTALL = /usr/ucb/install ++INSTALL = install + EBIN = /usr/local/sbin + MAN = /usr/local/man/man + +@@ -33,22 +33,22 @@ MAN = /usr/local/man/man + # -DCIDR_KEY # keys in CIDR format + # -DTERM_KD # keys and data nul-terminated + +-DEFS = -DTI_RPC -DFCNTL_LOCK -DSYSINFO ++DEFS = -DSOCK_RPC -DFCNTL_LOCK -DGETHOST -DDASH_C + + # Compiler flags +-CC = cc +-RANLIB = : +-CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-4.1.25/build_unix ++#CC = cc ++RANLIB = ranlib ++CFLAGS += $(DEFS) -DDBFILE=\"$(SYSCONFDIR)/mail/dracd.db\" -DALFILE=\"$(SYSCONFDIR)/mail/dracd.allow\" + #CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-3.1.17/build_unix + #CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-2.4.14/Unix + #CFLAGS = $(DEFS) -g -I/usr/local/src/db/db.1.85/PORT/sunos.5.2/include +-LDLIBS = -L/usr/local/src/db/db-4.1.25/build_unix -lnsl -ldb-4.1 ++LDLIBS = + #LDLIBS = -L/usr/local/src/db/db-3.1.17/build_unix -lnsl -ldb + #LDLIBS = -L/usr/local/src/db/db-2.4.14/Unix -lnsl -ldb + #LDLIBS = -L/usr/local/src/db/db.1.85/PORT/sunos.5.2 -lnsl -ldb +-TSTLIBS = -L. -ldrac -lnsl +-RPCGENFLAGS = +-#RPCGENFLAGS = -C ++TSTLIBS = -L. -ldrac ++#RPCGENFLAGS = ++RPCGENFLAGS = -C + + # Man sections + MANLIB = 3 diff --git a/mail/drac/patches/patch-dracauth_3 b/mail/drac/patches/patch-dracauth_3 new file mode 100644 index 00000000000..8558c80f5f7 --- /dev/null +++ b/mail/drac/patches/patch-dracauth_3 @@ -0,0 +1,12 @@ +$OpenBSD: patch-dracauth_3,v 1.1.1.1 2005/01/27 20:51:41 alek Exp $ +--- dracauth.3.orig Thu Jan 27 21:39:23 2005 ++++ dracauth.3 Thu Jan 27 21:39:30 2005 +@@ -85,7 +85,7 @@ or non-zero and an error message pointer + .B libdrac.a + .PD + .SH "SEE ALSO" +-.BR rpc.dracd (1m) ++.BR rpc.dracd (1) + .SH NOTES + This interface is unsafe in multithreaded applications. Unsafe + interfaces should be called only from the main thread. diff --git a/mail/drac/patches/patch-rpc_dracd_c b/mail/drac/patches/patch-rpc_dracd_c new file mode 100644 index 00000000000..d8c9d30b30e --- /dev/null +++ b/mail/drac/patches/patch-rpc_dracd_c @@ -0,0 +1,13 @@ +$OpenBSD: patch-rpc_dracd_c,v 1.1.1.1 2005/01/27 20:51:41 alek Exp $ +--- rpc.dracd.c.orig Sun Jan 12 21:22:22 2003 ++++ rpc.dracd.c Sun Jan 23 19:53:29 2005 +@@ -36,9 +36,6 @@ + #endif + #include "drac.h" + +-#define DBFILE "/etc/mail/dracd.db" +-#define ALFILE "/etc/mail/dracd.allow" +- + struct net_def { + struct net_def *nd_next; + struct in_addr nd_mask; diff --git a/mail/drac/pkg/DESCR b/mail/drac/pkg/DESCR new file mode 100644 index 00000000000..dc9dd1d031e --- /dev/null +++ b/mail/drac/pkg/DESCR @@ -0,0 +1,9 @@ +DRAC (Dynamic Relay Authorization Control) is a daemon that dynamically +updates a relay authorization map for sendmail. It provides a way to +allow legitimate users to relay mail through an SMTP server, while still +preventing others from using it as a spam relay. User's IP addresses are +added to the map immediately after they have authenticated to the POP or +IMAP server. By default, map entries expire after 30 minutes, but can be +renewed by additional authentication. Periodically checking mail on a +POP server is sufficient to do this. The POP and SMTP servers can be on +different hosts. diff --git a/mail/drac/pkg/PLIST b/mail/drac/pkg/PLIST new file mode 100644 index 00000000000..e08be20a6d5 --- /dev/null +++ b/mail/drac/pkg/PLIST @@ -0,0 +1,13 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2005/01/27 20:51:41 alek Exp $ +include/drac.h +lib/libdrac.a +libexec/rpc.dracd +@man man/man1/rpc.dracd.1 +@man man/man3/dracauth.3 +share/doc/drac/ +share/doc/drac/COPYRIGHT +share/examples/drac/ +@sample ${SYSCONFDIR}/mail/ +share/examples/drac/dracd.allow-sample +@sample ${SYSCONFDIR}/mail/dracd.allow +@extra ${SYSCONFDIR}/mail/dracd.db