mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Add drac, a daemon to dynamically update a relay authorization map for
Sendmail, Postfix, and other MTAs that support it. PR: 24134 Submitted by: Anders Nordby <anders@fix.no>
This commit is contained in:
parent
aba61f91a9
commit
9de42e9adc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=38143
9 changed files with 149 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
||||||
SUBDIR += cvsmail
|
SUBDIR += cvsmail
|
||||||
SUBDIR += cyrus
|
SUBDIR += cyrus
|
||||||
SUBDIR += distribute
|
SUBDIR += distribute
|
||||||
|
SUBDIR += drac
|
||||||
SUBDIR += elm
|
SUBDIR += elm
|
||||||
SUBDIR += elm+ME
|
SUBDIR += elm+ME
|
||||||
SUBDIR += emil
|
SUBDIR += emil
|
||||||
|
|
40
mail/drac/Makefile
Normal file
40
mail/drac/Makefile
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# New ports collection makefile for: drac
|
||||||
|
# Date created: 07 January 2001
|
||||||
|
# Whom: Anders Nordby <anders@fix.no>
|
||||||
|
#
|
||||||
|
# $FreeBSD$
|
||||||
|
#
|
||||||
|
|
||||||
|
PORTNAME= drac
|
||||||
|
PORTVERSION= 1.11
|
||||||
|
CATEGORIES= mail
|
||||||
|
MASTER_SITES= ftp://ftp.cc.umanitoba.ca/src/ \
|
||||||
|
http://www.freenix.no/~anders/ \
|
||||||
|
ftp://totem.fix.no/pub/mirrors/misc/
|
||||||
|
DISTNAME= ${PORTNAME}
|
||||||
|
EXTRACT_SUFX= .tar.Z
|
||||||
|
|
||||||
|
MAINTAINER= anders@fix.no
|
||||||
|
|
||||||
|
NO_WRKSUBDIR= yes
|
||||||
|
|
||||||
|
MAN3= dracauth.3
|
||||||
|
MAN1= rpc.dracd.1
|
||||||
|
|
||||||
|
post-patch:
|
||||||
|
@${PERL} -pi -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/rpc.dracd.1m
|
||||||
|
@${ECHO} "================================================================================"
|
||||||
|
@${ECHO} "Use make -DWITH_POSTFIX or -DWITH_EXIM with this port for databases compatible"
|
||||||
|
@${ECHO} "with those MTAs."
|
||||||
|
@${ECHO} "================================================================================"
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
@${INSTALL_PROGRAM} ${WRKSRC}/rpc.dracd ${PREFIX}/sbin/
|
||||||
|
@${INSTALL_DATA} ${WRKSRC}/drac.h ${PREFIX}/include/
|
||||||
|
@${INSTALL_DATA} ${WRKSRC}/libdrac.a ${PREFIX}/lib/
|
||||||
|
.if !defined(NOPORTDOCS)
|
||||||
|
@${INSTALL_MAN} ${WRKSRC}/dracauth.3 ${PREFIX}/man/man3/
|
||||||
|
@${INSTALL_MAN} ${WRKSRC}/rpc.dracd.1m ${PREFIX}/man/man1/rpc.dracd.1
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
1
mail/drac/distinfo
Normal file
1
mail/drac/distinfo
Normal file
|
@ -0,0 +1 @@
|
||||||
|
MD5 (drac.tar.Z) = 0b714b32c06b4ebd1779add6c8221248
|
49
mail/drac/files/patch-aa
Normal file
49
mail/drac/files/patch-aa
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
--- Makefile.old Mon Nov 20 16:35:16 2000
|
||||||
|
+++ Makefile Sun Jan 14 20:06:47 2001
|
||||||
|
@@ -5,9 +5,10 @@
|
||||||
|
|
||||||
|
# Paths
|
||||||
|
|
||||||
|
-INSTALL = /usr/ucb/install
|
||||||
|
-EBIN = /usr/local/sbin
|
||||||
|
-MAN = /usr/local/man/man
|
||||||
|
+INSTALL = install
|
||||||
|
+EBIN = ${PREFIX}/sbin
|
||||||
|
+MAN = ${PREFIX}/man/man
|
||||||
|
+ETC_DIR = ${PREFIX}/etc
|
||||||
|
|
||||||
|
# OS-Dependant settings
|
||||||
|
|
||||||
|
@@ -33,20 +34,26 @@
|
||||||
|
# -DCIDR_KEY # keys in CIDR format
|
||||||
|
# -DTERM_KD # keys and data nul-terminated
|
||||||
|
|
||||||
|
-DEFS = -DTI_RPC -DFCNTL_LOCK -DSYSINFO
|
||||||
|
+.if defined(WITH_POSTFIX)
|
||||||
|
+DEFS= -DSOCK_RPC -DFLOCK_LOCK -DGETHOST -DDASH_C -DTERM_KD
|
||||||
|
+.elif defined(WITH_EXIM)
|
||||||
|
+DEFS= -DSOCK_RPC -DFLOCK_LOCK -DGETHOST -DDASH_C -DTERM_KD -DREQ_HASH -DCIDR_KEY
|
||||||
|
+.else
|
||||||
|
+DEFS= -DSOCK_RPC -DFLOCK_LOCK -DGETHOST -DDASH_C
|
||||||
|
+.endif
|
||||||
|
|
||||||
|
# Compiler flags
|
||||||
|
CC = cc
|
||||||
|
RANLIB = :
|
||||||
|
-CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-3.1.17/build_unix
|
||||||
|
+CFLAGS = $(DEFS) -g -I${PREFIX}/include -DDBFILE=\"$(ETC_DIR)/dracd.db\" -DALFILE=\"$(ETC_DIR)/dracd.allow\"
|
||||||
|
#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-3.1.17/build_unix -lnsl -ldb
|
||||||
|
+LDLIBS =
|
||||||
|
#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
|
31
mail/drac/files/patch-ab
Normal file
31
mail/drac/files/patch-ab
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
--- rpc.dracd.1m.old Sun Jan 14 19:18:52 2001
|
||||||
|
+++ rpc.dracd.1m Sun Jan 14 19:19:28 2001
|
||||||
|
@@ -16,13 +16,13 @@
|
||||||
|
\f4rpc.dracd\f1
|
||||||
|
is the Dynamic Relay Authorization Control server.
|
||||||
|
It uses the Berkeley db package to maintain a relay authorization
|
||||||
|
-map for sendmail, by default \f4/etc/mail/dracd.db\f1.
|
||||||
|
+map for sendmail, by default \f4%%PREFIX%%/etc/dracd.db\f1.
|
||||||
|
POP and IMAP mail servers make an RPC call to add an entry to the
|
||||||
|
authorization cache after they have authenticated each user.
|
||||||
|
The daemon, rpc.dracd, adds or updates entries in the cache, and
|
||||||
|
periodically expires old entries.
|
||||||
|
Only trusted mail servers are permitted to communicate with rpc.dracd,
|
||||||
|
-as controlled by \f4/etc/mail/dracd.allow\f1.
|
||||||
|
+as controlled by \f4%%PREFIX%%/etc/dracd.allow\f1.
|
||||||
|
If this file does not exist, all local IP addresses are permitted.
|
||||||
|
.SS Allow File Format
|
||||||
|
The Allow File file consists of entries of the form:
|
||||||
|
@@ -58,10 +58,10 @@
|
||||||
|
.SH FILES
|
||||||
|
.PD 0
|
||||||
|
.TP 30
|
||||||
|
-.B /etc/mail/dracd.db
|
||||||
|
+.B %%PREFIX%%/etc/dracd.db
|
||||||
|
default database file
|
||||||
|
.TP
|
||||||
|
-.B /etc/mail/dracd.allow
|
||||||
|
+.B %%PREFIX%%/etc/dracd.allow
|
||||||
|
default allow file.
|
||||||
|
.PD
|
||||||
|
.SH SEE ALSO
|
12
mail/drac/files/patch-ac
Normal file
12
mail/drac/files/patch-ac
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
--- rpc.dracd.c.old Sun Jan 14 20:53:02 2001
|
||||||
|
+++ rpc.dracd.c Sun Jan 14 20:53:10 2001
|
||||||
|
@@ -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;
|
1
mail/drac/pkg-comment
Normal file
1
mail/drac/pkg-comment
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Dynamic Relay Authorization Control, a pop-before-smtp implementation
|
11
mail/drac/pkg-descr
Normal file
11
mail/drac/pkg-descr
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
DRAC is a daemon that dynamically updates a relay authorization map for
|
||||||
|
Sendmail, Postfix and other MTA's that supports it. 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 a POP server is sufficient to do this.
|
||||||
|
The POP and SMTP servers can be on different hosts.
|
||||||
|
|
||||||
|
WWW: http://mail.cc.umanitoba.ca/drac/
|
3
mail/drac/pkg-plist
Normal file
3
mail/drac/pkg-plist
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
sbin/rpc.dracd
|
||||||
|
include/drac.h
|
||||||
|
lib/libdrac.a
|
Loading…
Add table
Reference in a new issue