1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-01 05:45:45 +00:00

Initial import

This commit is contained in:
Andrey A. Chernov 2003-09-07 09:34:20 +00:00
parent dddcda3679
commit 8d09064e14
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=88673
9 changed files with 285 additions and 0 deletions

View File

@ -0,0 +1,61 @@
# New ports collection makefile for: milter-sender
# Date created: 7 Sep 2003
# Whom: Andrey Chernov
#
# $FreeBSD$
#
PORTNAME= milter-sender
PORTVERSION= 0.36
CATEGORIES= mail
MASTER_SITES= http://www.snert.com/Software/download/
DISTFILES= libsnert-1.18.tgz milter-sender-0.36.tgz
RESTRICTED= see LICENSE.TXT
MAINTAINER= ache@FreeBSD.org
COMMENT= Real-time sender address verification, based on Milter API
DOCDIR= ${PREFIX}/share/doc/milter-sender
WRKSRC= ${WRKDIR}/com/snert/src
MAKEFILE= makefile
ALL_TARGET= build
.if !exists(/usr/lib/libmilter.a)
IGNORE= requires Sendmail 8.12; upgrade the base system
.endif
do-build:
@cd ${WRKSRC}/lib && \
${SETENV} ${MAKE_ENV} ${MAKE} -f ../mk/FreeBSD.mk \
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}
@cd ${WRKSRC}/milter-sender && \
${SETENV} ${MAKE_ENV} ${MAKE} -f ../mk/FreeBSD.mk \
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}
do-install:
@cd ${WRKSRC}/milter-sender && \
${SETENV} ${MAKE_ENV} ${MAKE} -f ../mk/FreeBSD.mk \
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}
@${INSTALL} -d ${DOCDIR}/Img
@cd ${WRKSRC}/milter-sender && \
${INSTALL_DATA} CHANGES.TXT index.shtml style.css mailto.js \
license-body.html LICENSE.TXT milter-sender.mc ${DOCDIR}
@cd ${WRKSRC}/milter-sender/Img && \
${INSTALL_DATA} *.gif *.png ${DOCDIR}/Img
EXTRA_CFLAGS= ${PTHREAD_CFLAGS}
LDFLAGS= ${PTHREAD_LIBS}
MAKE_ENV= EXTRA_CFLAGS="${EXTRA_CFLAGS}" \
LDFLAGS="${LDFLAGS}" \
WRKDIR="${WRKDIR}"
post-install:
@${CAT} ${PKGMESSAGE}
post-deinstall:
@${ECHO_MSG} ""
@${ECHO_MSG} "Do not forget delete filter description from /etc/mail/YOUR-CONF.mc"
@${ECHO_MSG} "and rebuild sendmail.cf file!"
@${ECHO_MSG} ""
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
MD5 (libsnert-1.18.tgz) = de303fcfc770dd16aff4a696cd1fb44a
MD5 (milter-sender-0.36.tgz) = 0f62a25ce7fb546348fd6e239c0fcab9

View File

@ -0,0 +1,31 @@
--- mk/FreeBSD.mk.bak Wed Aug 6 23:36:55 2003
+++ mk/FreeBSD.mk Sun Sep 7 11:40:21 2003
@@ -17,8 +17,7 @@
#
# Absolute paths to supporting headers and libraries.
#
-PREFIX = /usr/local/src
-SNERT = $(PREFIX)/com/snert
+SNERT = $(WRKDIR)/com/snert
INCDIR = $(SNERT)/include/
LIBDIR = $(SNERT)/lib/
SRCDIR = $(SNERT)/src/lib/
@@ -43,14 +42,14 @@
# WIN32_API
#
-CC = gcc
-CFLAGS = -g $(DEBUG) -I$(INCDIR) $(EXTRA_CFLAGS) -D_REENTRANT -D_THREAD_SAFE\
+#CC = gcc
+CFLAGS += $(DEBUG) -I$(INCDIR) $(EXTRA_CFLAGS) -D_REENTRANT\
-DSERIALIZATION_API=SYSTEMV_API \
-DSHARED_MEMORY_API=SYSTEMV_API
#O_NAME = -o$*$O
-LD = gcc
-LDFLAGS = -L$(LIBDIR)
+#LD = gcc
+LDFLAGS += -L$(LIBDIR)
E_FLAG = -o
E_NAME = $(E_FLAG)$@

View File

@ -0,0 +1,44 @@
--- milter-sender/makefile.bak Sun Aug 31 13:00:43 2003
+++ milter-sender/makefile Sun Sep 7 11:43:19 2003
@@ -24,23 +24,25 @@
#
MAILDIR = /etc/mail
-BINDIR = /usr/local/sbin
-STATEDIR = /var/lib/$(MILTER)
+BINDIR = ${PREFIX}/sbin
+STATEDIR = ${PREFIX}/lib/$(MILTER)
#
# These assume that Berkley DB4 was configured with --prefix=/usr/local.
# Some systems supply older version of Berkley DB in /usr and so these
# options make sure the DB4 version is included first.
#
-INC = -I/usr/local/BerkeleyDB.4.1/include -I/usr/local/include
-LIB = -L/usr/local/BerkeleyDB.4.1/lib -L/usr/local/lib
+#INC = -I/usr/local/BerkeleyDB.4.1/include -I/usr/local/include
+#LIB = -L/usr/local/BerkeleyDB.4.1/lib -L/usr/local/lib
+INC=
+LIB=
#
# Linux
#
-STARTUP_SCRIPT = /etc/rc.d/init.d/$(MILTER)
-POSIX_LIB = -lpthread
-DB_LIB = -ldb
+#STARTUP_SCRIPT = /etc/rc.d/init.d/$(MILTER)
+#POSIX_LIB = -lpthread
+#DB_LIB = -ldb
#
# Cobalt Qube 1 (old RedHat 5.1)
@@ -60,7 +62,7 @@
#
# FreeBSD 4.8
#
-#STARTUP_SCRIPT = /etc/rc.d/$(MILTER)
+STARTUP_SCRIPT = ${PREFIX}/etc/rc.d/$(MILTER).sh
#POSIX_LIB = -pthread
#DB_LIB = -ldb

View File

@ -0,0 +1,86 @@
--- milter-sender/milter-sender.sh.bak Tue Sep 2 21:12:30 2003
+++ milter-sender/milter-sender.sh Sun Sep 7 12:09:08 2003
@@ -10,15 +10,14 @@
# BEFORE: mail
# KEYWORD: FreeBSD NetBSD
-PROGRAM="/usr/local/sbin/milter-sender"
-OPTIONS="-d 127.0.0.1 -s /etc/mail/sendmail.cf -R -u 3 unix:/var/lib/milter-sender/socket"
-REQUIRED_DIR='/var/lib/milter-sender'
-
-FG_RED='\033[1;31m'
-FG_GREEN='\033[1;32m'
-FG_WHITE='\033[0;37m'
-FG_BLACK='\033[0;30m'
-FG_NORMAL=${FG_WHITE}
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+fi
+
+PROGRAM="${PREFIX}/sbin/milter-sender"
+OPTIONS="-d 127.0.0.1 -s /etc/mail/sendmail.cf -R -u 3 unix:${PREFIX}/lib/milter-sender/socket"
+REQUIRED_DIR="${PREFIX}/lib/milter-sender"
##########################################################################
# Nothing to be configured below this point.
@@ -64,11 +63,10 @@
start()
{
NAME=`basename "$PROGRAM"`
- printf "Starting %s" $NAME
pid=`getpid "$PROGRAM"`
if [ X"$pid" != X ]; then
- printf '\r\033[71C['${FG_RED}'FAILED'${FG_NORMAL}']\n'
+ echo " milter-sender:FAILED"
return
fi
@@ -78,17 +76,16 @@
pid=`getpid "$PROGRAM"`
if [ X"$pid" = X ]; then
- printf '\r\033[71C['${FG_RED}'FAILED'${FG_NORMAL}']\n'
+ echo " milter-sender:FAILED"
return
fi
- printf '\r\033[71C['${FG_GREEN}' OK '${FG_NORMAL}']\n'
+ echo -n " milter-sender"
}
stop()
{
NAME=`basename "$PROGRAM"`
- printf "Stopping %s" $NAME
pid=`getpid "$PROGRAM"`
if [ X"$pid" != X ]; then
@@ -102,12 +99,12 @@
sleep 2
pid=`getpid "$PROGRAM"`
if [ X"$pid" != X ]; then
- printf '\r\033[71C['${FG_RED}'FAILED'${FG_NORMAL}']\n'
+ echo " milter-sender:FAILED"
return
fi
fi
- printf '\r\033[71C['${FG_GREEN}' OK '${FG_NORMAL}']\n'
+ echo -n " milter-sender"
}
case "$1" in
@@ -124,9 +121,9 @@
status)
pid=`getpid "$PROGRAM"`
if [ X"$pid" != X ]; then
- printf '\r\033[72C['${FG_GREEN}${pid}${FG_NORMAL}']\n'
+ echo "milter-sender:${pid}"
else
- printf '\r\033[70C['${FG_RED}'STOPPED'${FG_NORMAL}']\n'
+ echo "milter-sender:STOPPED"
fi
;;
*)

View File

@ -0,0 +1,15 @@
--- milter-sender/install.sh.bak Mon Aug 25 14:36:47 2003
+++ milter-sender/install.sh Sun Sep 7 12:12:40 2003
@@ -26,10 +26,10 @@
case `uname -s` in
*BSD*)
- RC="/usr/local/etc/rc.d/${MILTER}.sh"
+ RC="/usr/local/etc/rc.d/${MILTER}.sh-dist"
if [ ! -f $RC ]; then
cp ${MILTER}.sh $RC
- chmod 540 $RC
+ chmod 640 $RC
fi
;;
Linux*)

View File

@ -0,0 +1,9 @@
SPAM is the black plague of the Internet world and this Sendmail milter
attempts to address a small subset of the problem by verifying that the
sender's email address is in good standing by performing an SMTP callback
to the MX server responsible for the sender's domain. This milter is not
intended to be a complete solution to the SPAM plague and so it should be
used in conjunction with other tools such as DNS blacklists and content
filters.
WWW: http://www.snert.com/Software/milter-sender/

View File

@ -0,0 +1,17 @@
************************************************************************
In order to run this port, please add the following line to
/etc/mail/YOUR-CONF.mc:
INPUT_MAIL_FILTER(
`milter-sender',
`S=unix:/usr/local/lib/milter-sender/socket, F=T, T=C:1m;S:30s;R:6m;E:1m'
)dnl
define(
`confMILTER_MACROS_CONNECT', confMILTER_MACROS_CONNECT`,
{client_addr}, {client_name}, {client_port}, {client_resolve}'
)dnl
Don't forget remake sendmail configuration file after modifying YOUR-CONF.mc
************************************************************************

View File

@ -0,0 +1,20 @@
etc/rc.d/milter-sender.sh-dist
sbin/milter-sender
@exec install -d -o smmsp -g smmsp -m 755 lib/milter-sender
share/doc/milter-sender/index.shtml
share/doc/milter-sender/license-body.html
share/doc/milter-sender/milter-sender.mc
share/doc/milter-sender/mailto.js
share/doc/milter-sender/style.css
share/doc/milter-sender/CHANGES.TXT
share/doc/milter-sender/LICENSE.TXT
share/doc/milter-sender/Img/bg.gif
share/doc/milter-sender/Img/dilbert2003071742312.gif
share/doc/milter-sender/Img/dilbert2003228690821.gif
share/doc/milter-sender/Img/mrpixel.gif
share/doc/milter-sender/Img/sendmail-bat-left-142x38.png
share/doc/milter-sender/Img/sendmail-bat-right-142x38.png
share/doc/milter-sender/Img/sun.gif
@dirrm share/doc/milter-sender/Img
@dirrm share/doc/milter-sender
@dirrm lib/milter-sender