ports/108846: [new port] mail/softfail version 1.15

Patrick Tracanelli eksffa at freebsdbrasil.com.br
Tue Feb 6 20:30:18 UTC 2007


>Number:         108846
>Category:       ports
>Synopsis:       [new port] mail/softfail version 1.15
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 06 20:30:16 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Patrick Tracanelli
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD capeta.freebsdbrasil.com.br 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Fri Mar 24 13:05:22 BRT 2006 root at capeta.freebsdbrasil.com.br:/usr/obj/usr/src/sys/CAPETA i386


	
>Description:
Softfail is an enhaced greylisting system to be used on qmail MTA patched
with SMTPEXTFORK feature. It is an independent program, which is forked from
qmail-smtpd. It allows manual whitelisting and blacklisting as well as
automatic black and whitelisting. Automatic whitelisting is done by the usual
greylisting method while automatic blacklisting is done when the remote SMTP
server breaks some aspects of RFC rules and insists on redelivery very early.

All aspects of softfail's behavior can be configured. There are maintainance
scripts to be ran from crontab, which removes expired entries and generates
reports.

--

Tested with "port test" and portlint on i386 and amd64 archs.

	
>How-To-Repeat:
	
>Fix:

	

--- softfail.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	softfail
#	softfail/files
#	softfail/files/pkg-message.in
#	softfail/pkg-descr
#	softfail/Makefile
#	softfail/distinfo
#	softfail/pkg-plist
#
echo c - softfail
mkdir -p softfail > /dev/null 2>&1
echo c - softfail/files
mkdir -p softfail/files > /dev/null 2>&1
echo x - softfail/files/pkg-message.in
sed 's/^X//' >softfail/files/pkg-message.in << 'END-of-softfail/files/pkg-message.in'
X
XPlease note that you have just installed qmail-sf on
X
X	%%QMAIL_PREFIX%%/bin/qmail-sf
X
XBefore using it you need to properly create the MySQL database. A customized
XSQL sample was installed on
X
X	%%DOCSDIR%%/softfail.sql
X
XYou can use this sample as root user for MySQL:
X
X   mysql -uroot -p <  %%DOCSDIR%%/softfail.sql
X
XTo use it you should configure SMTPEXTFORK's enviroment variable on qmail
Xaccording to the instructions available on
X
X	%%DOCSDIR%%/README
END-of-softfail/files/pkg-message.in
echo x - softfail/pkg-descr
sed 's/^X//' >softfail/pkg-descr << 'END-of-softfail/pkg-descr'
XSoftfail is an enhaced greylisting system to be used on qmail MTA patched
Xwith SMTPEXTFORK feature. It is an independent program, which is forked from
Xqmail-smtpd. It allows manual whitelisting and blacklisting as well as
Xautomatic black and whitelisting. Automatic whitelisting is done by the usual
Xgreylisting method while automatic blacklisting is done when the remote SMTP
Xserver breaks some aspects of RFC rules and insists on redelivery very early.
X
XAll aspects of softfail's behavior can be configured. There are maintainance
Xscripts to be ran from crontab, which removes expired entries and generates
Xreports.
X
XWWW:	http://www6.freebsdbrasil.com.br/~eksffa/l/dev/qmail-smtpextfork/
END-of-softfail/pkg-descr
echo x - softfail/Makefile
sed 's/^X//' >softfail/Makefile << 'END-of-softfail/Makefile'
X# New ports collection makefile for:	softfail
X# Date created:		2007-02-01
X# Whom:			Patrick Tracanelli <eksffa at freebsdbrasil.com.br>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	softfail
XPORTVERSION=	1.15
XCATEGORIES=	mail
XMASTER_SITES=	http://www6.freebsdbrasil.com.br/~eksffa/l/dev/qmail-smtpextfork/
XDISTNAME=	${PORTNAME}_fbsdbrasil-${PORTVERSION}
X
XMAINTAINER=	eksffa at freebsdbrasil.com.br
XCOMMENT=	Enhaced greylisting system for qmail w/ SMTPEXTFORK patch
X
XSUB_FILES=	pkg-message
XSUB_LIST=	QMAIL_PREFIX=${QMAIL_PREFIX}
XPLIST_SUB=	QMAIL_PREFIX=${QMAIL_PREFIX}
X
XPORTDOCS=	README softfail.sql
X
XUSE_BZIP2=	yes
XUSE_MYSQL=	yes
XUSE_QMAIL=	yes
X
X.if defined(QMAIL_SLAVEPORT) && ${QMAIL_SLAVEPORT} != "spamcontrol"
XIGNORE=		this software only works with qmail-spamcontrol
X.endif
X
XQMAIL_SLAVEPORT=	spamcontrol
X
XSUB_FILES=	pkg-message
X
X.include <bsd.port.pre.mk>
X
Xpre-everything::
X	@${ECHO_MSG} ""
X	@${ECHO_MSG} "You can use the following build options:"
X	@${ECHO_MSG} ""
X	@${ECHO_MSG} " WITH_MYSQL_SERVER=<value>	Set MySQL server address"
X	@${ECHO_MSG} " WITH_MYSQL_USER=<value>	Set user to log into mysql"
X	@${ECHO_MSG} " WITH_MYSQL_PASSWD=<value>	Set user's password to mysql"
X	@${ECHO_MSG} " WITH_MYSQL_DB=<value>		Set MySQL database to use"
X	@${ECHO_MSG} ""
X	@${ECHO_MSG} " WITH_UNBLOCK_TIME=<value>	How long (minutes) before"
X	@${ECHO_MSG} "				accepting greylisted e-mails"
X	@${ECHO_MSG} " WITH_SEEN_TIME=<value>		Minium time a retry should wait"
X	@${ECHO_MSG} " WITH_SEEN_MAXTIMES=<value>	Number of times we will allow"
X	@${ECHO_MSG} "				WITH_SEEN_TIME be not respected"
X	@${ECHO_MSG} "				before AUTO blacklisting IP"
X	@${ECHO_MSG} " WITH_MAXDAYS_AUTO=<value>	How long (days) an AUTOmatically"
X	@${ECHO_MSG} "				added entry will exist in DB"
X	@${ECHO_MSG} ""
X
Xpre-build:
X.if defined(WITH_MYSQL_SERVER)
X	@${ECHO_CMD} "#define MYSQLSERVER	\"${WITH_MYSQL_SERVER}\"" \
X		>> ${WRKSRC}/conf.h
X	@${REINPLACE_CMD} -e 's|@"localhost"|@"${WITH_MYSQL_SERVER}"|g' \
X		${WRKSRC}/softfail.sql
X.endif
X.if defined(WITH_MYSQL_USER)
X	@${ECHO_CMD} "#define MYSQLUSER	\"${WITH_MYSQL_USER}\"" \
X		>> ${WRKSRC}/conf.h
X	@${REINPLACE_CMD} -e 's|to softfail@|to ${WITH_MYSQL_USER}@|g' \
X		${WRKSRC}/softfail.sql
X.endif
X.if defined(WITH_MYSQL_PASSWD)
X	@${ECHO_CMD} "#define MYSQLPASSWORD	\"${WITH_MYSQL_PASSWD}\"" \
X		>> ${WRKSRC}/conf.h
X	@${REINPLACE_CMD} -e "s|identified by 'softfail40'|identified by '${WITH_MYSQL_PASSWD}'|g" \
X		${WRKSRC}/softfail.sql
X.endif
X.if defined(WITH_MYSQL_DB)
X	@${ECHO_CMD} "#define MYSQLDB		\"${WITH_MYSQL_DB}\"" \
X		>> ${WRKSRC}/conf.h
X	@${REINPLACE_CMD} -e 's|IF EXISTS softfail|IF EXISTS ${WITH_MYSQL_DB}|g' \
X		${WRKSRC}/softfail.sql
X	@${REINPLACE_CMD} -e 's|CREATE DATABASE softfail|CREATE DATABASE ${WITH_MYSQL_DB}|g' \
X		${WRKSRC}/softfail.sql
X	@${REINPLACE_CMD} -e 's|GRANT all ON softfail|GRANT all ON ${WITH_MYSQL_DB}|g' \
X		${WRKSRC}/softfail.sql
X	@${REINPLACE_CMD} -e 's|USE softfail|USE ${WITH_MYSQL_DB}|g' \
X		${WRKSRC}/softfail.sql
X.endif
X.if defined(WITH_UNBLOCK_TIME)
X	@${ECHO_CMD} "#define UNBLOCK_AFTER_SEEN	${WITH_UNBLOCK_TIME}" \
X		>> ${WRKSRC}/conf.h
X.endif
X.if defined(WITH_SEEN_TIME)
X	@${ECHO_CMD} "#define RFCSEENTIME	${WITH_SEEN_TIME}" \
X		>> ${WRKSRC}/conf.h
X.endif
X.if defined(WITH_SEEN_MAXTIMES)
X	@${ECHO_CMD} "#define SEENCONSECMAXTIME	${WITH_SEEN_MAXTIMES}" \
X		>> ${WRKSRC}/conf.h
X.endif
X.if defined(WITH_MAXDAYS_AUTO)
X	@${ECHO_CMD} "#define MAXDAYSAUTOINDB	${WITH_MAXDAYS_AUTO}" \
X		>> ${WRKSRC}/conf.h
X.endif
X
Xpost-patch:
X.if defined(WITH_REPORTMAIL)
X	@${REINPLACE_CMD} -e 's|changeme at yourdomainname.com|${WITH_REPORTMAIL}|g' \
X		${WRKSRC}/rotate-softfail.sh
X.endif
X
Xpost-install:
X	@cd ${WRKSRC} && ${MAKE} crontab-entry
X
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X	@${INSTALL_DATA} ${WRKSRC}/softfail.sql ${DOCSDIR}
X	@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
X.endif
X
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
END-of-softfail/Makefile
echo x - softfail/distinfo
sed 's/^X//' >softfail/distinfo << 'END-of-softfail/distinfo'
XMD5 (softfail_fbsdbrasil-1.15.tar.bz2) = 8fc9915ea8bea48ff53bb7c9ebfc4407
XSHA256 (softfail_fbsdbrasil-1.15.tar.bz2) = 0d0bc4fae0cfff28d60c8f158302736f3264600fea8fbe62cc6cdfcb795b6476
XSIZE (softfail_fbsdbrasil-1.15.tar.bz2) = 11787
END-of-softfail/distinfo
echo x - softfail/pkg-plist
sed 's/^X//' >softfail/pkg-plist << 'END-of-softfail/pkg-plist'
X at unexec rm -f %%QMAIL_PREFIX%%/bin/qmail-sf 2>&1 >/dev/null || true
Xbin/rotate-softfail-db
Xbin/rotate-softfail.sh
END-of-softfail/pkg-plist
exit
--- softfail.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list