aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-02-06 23:39:38 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-02-06 23:39:38 +0000
commit45b126a76cfa750813cd58a409c54d7b9994b013 (patch)
tree7a4f045171b23c9a64b7667f15d176670d16e7da
parent097671613e1852ed9656a83f00231e694e4aa584 (diff)
downloadports-45b126a76cfa750813cd58a409c54d7b9994b013.tar.gz
ports-45b126a76cfa750813cd58a409c54d7b9994b013.zip
Notes
-rw-r--r--mail/Makefile1
-rw-r--r--mail/softfail/Makefile121
-rw-r--r--mail/softfail/distinfo3
-rw-r--r--mail/softfail/files/pkg-message.in18
-rw-r--r--mail/softfail/pkg-descr12
-rw-r--r--mail/softfail/pkg-plist3
6 files changed, 158 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index 24f1d85e467e..72babcce2ecb 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -534,6 +534,7 @@
SUBDIR += smtprc
SUBDIR += smtptrapd
SUBDIR += smx
+ SUBDIR += softfail
SUBDIR += solidpop3d
SUBDIR += sortmail
SUBDIR += spamass-milter
diff --git a/mail/softfail/Makefile b/mail/softfail/Makefile
new file mode 100644
index 000000000000..e67ad7db0572
--- /dev/null
+++ b/mail/softfail/Makefile
@@ -0,0 +1,121 @@
+# New ports collection makefile for: softfail
+# Date created: 2007-02-01
+# Whom: Patrick Tracanelli <eksffa@freebsdbrasil.com.br>
+#
+# $FreeBSD$
+#
+
+PORTNAME= softfail
+PORTVERSION= 1.15
+CATEGORIES= mail
+MASTER_SITES= http://www6.freebsdbrasil.com.br/~eksffa/l/dev/qmail-smtpextfork/
+DISTNAME= ${PORTNAME}_fbsdbrasil-${PORTVERSION}
+
+MAINTAINER= eksffa@freebsdbrasil.com.br
+COMMENT= Enhaced greylisting system for qmail w/ SMTPEXTFORK patch
+
+SUB_FILES= pkg-message
+SUB_LIST= QMAIL_PREFIX=${QMAIL_PREFIX}
+PLIST_SUB= QMAIL_PREFIX=${QMAIL_PREFIX}
+
+PORTDOCS= README softfail.sql
+
+USE_BZIP2= yes
+USE_MYSQL= yes
+USE_QMAIL= yes
+
+.if defined(QMAIL_SLAVEPORT) && ${QMAIL_SLAVEPORT} != "spamcontrol"
+IGNORE= this software only works with qmail-spamcontrol
+.endif
+
+QMAIL_SLAVEPORT= spamcontrol
+
+SUB_FILES= pkg-message
+
+.include <bsd.port.pre.mk>
+
+pre-everything::
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "You can use the following build options:"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} " WITH_MYSQL_SERVER=<value> Set MySQL server address"
+ @${ECHO_MSG} " WITH_MYSQL_USER=<value> Set user to log into mysql"
+ @${ECHO_MSG} " WITH_MYSQL_PASSWD=<value> Set user's password to mysql"
+ @${ECHO_MSG} " WITH_MYSQL_DB=<value> Set MySQL database to use"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} " WITH_UNBLOCK_TIME=<value> How long (minutes) before"
+ @${ECHO_MSG} " accepting greylisted e-mails"
+ @${ECHO_MSG} " WITH_SEEN_TIME=<value> Minium time a retry should wait"
+ @${ECHO_MSG} " WITH_SEEN_MAXTIMES=<value> Number of times we will allow"
+ @${ECHO_MSG} " WITH_SEEN_TIME be not respected"
+ @${ECHO_MSG} " before AUTO blacklisting IP"
+ @${ECHO_MSG} " WITH_MAXDAYS_AUTO=<value> How long (days) an AUTOmatically"
+ @${ECHO_MSG} " added entry will exist in DB"
+ @${ECHO_MSG} ""
+
+pre-build:
+.if defined(WITH_MYSQL_SERVER)
+ @${ECHO_CMD} "#define MYSQLSERVER \"${WITH_MYSQL_SERVER}\"" \
+ >> ${WRKSRC}/conf.h
+ @${REINPLACE_CMD} -e 's|@"localhost"|@"${WITH_MYSQL_SERVER}"|g' \
+ ${WRKSRC}/softfail.sql
+.endif
+.if defined(WITH_MYSQL_USER)
+ @${ECHO_CMD} "#define MYSQLUSER \"${WITH_MYSQL_USER}\"" \
+ >> ${WRKSRC}/conf.h
+ @${REINPLACE_CMD} -e 's|to softfail@|to ${WITH_MYSQL_USER}@|g' \
+ ${WRKSRC}/softfail.sql
+.endif
+.if defined(WITH_MYSQL_PASSWD)
+ @${ECHO_CMD} "#define MYSQLPASSWORD \"${WITH_MYSQL_PASSWD}\"" \
+ >> ${WRKSRC}/conf.h
+ @${REINPLACE_CMD} -e "s|identified by 'softfail40'|identified by '${WITH_MYSQL_PASSWD}'|g" \
+ ${WRKSRC}/softfail.sql
+.endif
+.if defined(WITH_MYSQL_DB)
+ @${ECHO_CMD} "#define MYSQLDB \"${WITH_MYSQL_DB}\"" \
+ >> ${WRKSRC}/conf.h
+ @${REINPLACE_CMD} -e 's|IF EXISTS softfail|IF EXISTS ${WITH_MYSQL_DB}|g' \
+ ${WRKSRC}/softfail.sql
+ @${REINPLACE_CMD} -e 's|CREATE DATABASE softfail|CREATE DATABASE ${WITH_MYSQL_DB}|g' \
+ ${WRKSRC}/softfail.sql
+ @${REINPLACE_CMD} -e 's|GRANT all ON softfail|GRANT all ON ${WITH_MYSQL_DB}|g' \
+ ${WRKSRC}/softfail.sql
+ @${REINPLACE_CMD} -e 's|USE softfail|USE ${WITH_MYSQL_DB}|g' \
+ ${WRKSRC}/softfail.sql
+.endif
+.if defined(WITH_UNBLOCK_TIME)
+ @${ECHO_CMD} "#define UNBLOCK_AFTER_SEEN ${WITH_UNBLOCK_TIME}" \
+ >> ${WRKSRC}/conf.h
+.endif
+.if defined(WITH_SEEN_TIME)
+ @${ECHO_CMD} "#define RFCSEENTIME ${WITH_SEEN_TIME}" \
+ >> ${WRKSRC}/conf.h
+.endif
+.if defined(WITH_SEEN_MAXTIMES)
+ @${ECHO_CMD} "#define SEENCONSECMAXTIME ${WITH_SEEN_MAXTIMES}" \
+ >> ${WRKSRC}/conf.h
+.endif
+.if defined(WITH_MAXDAYS_AUTO)
+ @${ECHO_CMD} "#define MAXDAYSAUTOINDB ${WITH_MAXDAYS_AUTO}" \
+ >> ${WRKSRC}/conf.h
+.endif
+
+post-patch:
+.if defined(WITH_REPORTMAIL)
+ @${REINPLACE_CMD} -e 's|changeme@yourdomainname.com|${WITH_REPORTMAIL}|g' \
+ ${WRKSRC}/rotate-softfail.sh
+.endif
+
+post-install:
+ @cd ${WRKSRC} && ${MAKE} crontab-entry
+
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/softfail.sql ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+.endif
+
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/mail/softfail/distinfo b/mail/softfail/distinfo
new file mode 100644
index 000000000000..78abe386177a
--- /dev/null
+++ b/mail/softfail/distinfo
@@ -0,0 +1,3 @@
+MD5 (softfail_fbsdbrasil-1.15.tar.bz2) = 8fc9915ea8bea48ff53bb7c9ebfc4407
+SHA256 (softfail_fbsdbrasil-1.15.tar.bz2) = 0d0bc4fae0cfff28d60c8f158302736f3264600fea8fbe62cc6cdfcb795b6476
+SIZE (softfail_fbsdbrasil-1.15.tar.bz2) = 11787
diff --git a/mail/softfail/files/pkg-message.in b/mail/softfail/files/pkg-message.in
new file mode 100644
index 000000000000..f12b67538ceb
--- /dev/null
+++ b/mail/softfail/files/pkg-message.in
@@ -0,0 +1,18 @@
+
+Please note that you have just installed qmail-sf on
+
+ %%QMAIL_PREFIX%%/bin/qmail-sf
+
+Before using it you need to properly create the MySQL database. A customized
+SQL sample was installed on
+
+ %%DOCSDIR%%/softfail.sql
+
+You can use this sample as root user for MySQL:
+
+ mysql -uroot -p < %%DOCSDIR%%/softfail.sql
+
+To use it you should configure SMTPEXTFORK's enviroment variable on qmail
+according to the instructions available on
+
+ %%DOCSDIR%%/README
diff --git a/mail/softfail/pkg-descr b/mail/softfail/pkg-descr
new file mode 100644
index 000000000000..985b5c62c7d8
--- /dev/null
+++ b/mail/softfail/pkg-descr
@@ -0,0 +1,12 @@
+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.
+
+WWW: http://www6.freebsdbrasil.com.br/~eksffa/l/dev/qmail-smtpextfork/
diff --git a/mail/softfail/pkg-plist b/mail/softfail/pkg-plist
new file mode 100644
index 000000000000..bbad4bdec029
--- /dev/null
+++ b/mail/softfail/pkg-plist
@@ -0,0 +1,3 @@
+@unexec rm -f %%QMAIL_PREFIX%%/bin/qmail-sf 2>&1 >/dev/null || true
+bin/rotate-softfail-db
+bin/rotate-softfail.sh