aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authoradamw <adamw@FreeBSD.org>2016-04-17 00:49:21 +0800
committeradamw <adamw@FreeBSD.org>2016-04-17 00:49:21 +0800
commit34c7586d0c4f7540af9ba9dc4a6c27a7e9f8f646 (patch)
treec3f1da6a645db1459b206f63f511b29643afc195 /mail
parentaf35b3cf0dce5c85b11959c0c95c61d9bf6afed5 (diff)
downloadfreebsd-ports-gnome-34c7586d0c4f7540af9ba9dc4a6c27a7e9f8f646.tar.gz
freebsd-ports-gnome-34c7586d0c4f7540af9ba9dc4a6c27a7e9f8f646.tar.zst
freebsd-ports-gnome-34c7586d0c4f7540af9ba9dc4a6c27a7e9f8f646.zip
Add dnsbl, pause, and regex filters for OpenSMTPD.
-filter-regex needs a post-install target, so I changed the post-install in MASTERDIR to be pre-patch instead. Also, in the opensmtpd-extras/Makefile, change the dependencies to only be run-time, and fix some spacing nits. PORTREVISION bump for dependency changes.
Diffstat (limited to 'mail')
-rw-r--r--mail/opensmtpd-extras-filter-dnsbl/Makefile19
-rw-r--r--mail/opensmtpd-extras-filter-pause/Makefile17
-rw-r--r--mail/opensmtpd-extras-filter-regex/Makefile26
-rw-r--r--mail/opensmtpd-extras-filter-regex/pkg-plist4
-rw-r--r--mail/opensmtpd-extras/Makefile50
5 files changed, 86 insertions, 30 deletions
diff --git a/mail/opensmtpd-extras-filter-dnsbl/Makefile b/mail/opensmtpd-extras-filter-dnsbl/Makefile
new file mode 100644
index 000000000000..ec32c699cd00
--- /dev/null
+++ b/mail/opensmtpd-extras-filter-dnsbl/Makefile
@@ -0,0 +1,19 @@
+# Created by: Adam Weinberger <adamw@FreeBSD.org>
+# $FreeBSD$
+
+PKGNAMESUFFIX= -filter-dnsbl
+
+COMMENT= DNSBL-checking filter for OpenSMTPD
+MAINTAINER= adamw@FreeBSD.org
+
+LIB_DEPENDS= libasr.so:dns/libasr
+
+PLIST_FILES= libexec/opensmtpd/filter-dnsbl \
+ man/man8/filter-dnsbl.8.gz
+
+CONFIGURE_ARGS+= --with-filter-dnsbl
+
+MASTERDIR= ${.CURDIR}/../opensmtpd-extras
+SLAVE_PORT= yes
+
+.include "${MASTERDIR}/Makefile"
diff --git a/mail/opensmtpd-extras-filter-pause/Makefile b/mail/opensmtpd-extras-filter-pause/Makefile
new file mode 100644
index 000000000000..c3d7012d4bc2
--- /dev/null
+++ b/mail/opensmtpd-extras-filter-pause/Makefile
@@ -0,0 +1,17 @@
+# Created by: Adam Weinberger <adamw@FreeBSD.org>
+# $FreeBSD$
+
+PKGNAMESUFFIX= -filter-pause
+
+COMMENT= Pause incoming OpenSMTPD messages to reduce spam
+MAINTAINER= adamw@FreeBSD.org
+
+PLIST_FILES= libexec/opensmtpd/filter-pause \
+ man/man8/filter-pause.8.gz
+
+CONFIGURE_ARGS+= --with-filter-pause
+
+MASTERDIR= ${.CURDIR}/../opensmtpd-extras
+SLAVE_PORT= yes
+
+.include "${MASTERDIR}/Makefile"
diff --git a/mail/opensmtpd-extras-filter-regex/Makefile b/mail/opensmtpd-extras-filter-regex/Makefile
new file mode 100644
index 000000000000..82d05637c279
--- /dev/null
+++ b/mail/opensmtpd-extras-filter-regex/Makefile
@@ -0,0 +1,26 @@
+# Created by: Adam Weinberger <adamw@FreeBSD.org>
+# $FreeBSD$
+
+PKGNAMESUFFIX= -filter-regex
+
+COMMENT= Regular expression filter for OpenSMTPD
+MAINTAINER= adamw@FreeBSD.org
+
+CONFIGURE_ARGS+= --with-filter-regex
+
+PLIST= ${.CURDIR}/pkg-plist
+MASTERDIR= ${.CURDIR}/../opensmtpd-extras
+SLAVE_PORT= yes
+
+post-patch:
+ @${REINPLACE_CMD} -e \
+ 's|/etc/mail/filter-regex.conf|${PREFIX}&|' \
+ ${WRKSRC}/extras/wip/filters/filter-regex/filter_regex.c \
+ ${WRKSRC}/extras/wip/filters/filter-regex/filter-regex.8
+
+post-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/mail
+ ${INSTALL_DATA} ${WRKSRC}/extras/wip/filters/filter-regex/filter-regex.conf \
+ ${STAGEDIR}${PREFIX}/etc/mail/filter-regex.conf.sample
+
+.include "${MASTERDIR}/Makefile"
diff --git a/mail/opensmtpd-extras-filter-regex/pkg-plist b/mail/opensmtpd-extras-filter-regex/pkg-plist
new file mode 100644
index 000000000000..f6f5757e5f51
--- /dev/null
+++ b/mail/opensmtpd-extras-filter-regex/pkg-plist
@@ -0,0 +1,4 @@
+@sample etc/mail/filter-regex.conf.sample
+libexec/opensmtpd/filter-regex
+man/man5/filter-regex.conf.5.gz
+man/man8/filter-regex.8.gz
diff --git a/mail/opensmtpd-extras/Makefile b/mail/opensmtpd-extras/Makefile
index 4537b0ab9f04..27f3aada29f1 100644
--- a/mail/opensmtpd-extras/Makefile
+++ b/mail/opensmtpd-extras/Makefile
@@ -3,7 +3,7 @@
PORTNAME= opensmtpd-extras
PORTVERSION= 201602042118
-PORTREVISION?= 2
+PORTREVISION?= 3
CATEGORIES+= mail
MASTER_SITES= http://www.opensmtpd.org/archives/
@@ -22,15 +22,17 @@ GNU_CONFIGURE= yes
.if empty(SLAVE_PORT)
OPTIONS_GROUP= FILTER TABLE
-OPTIONS_GROUP_FILTER= SPAMASSASSIN
+OPTIONS_GROUP_FILTER= DNSBL PAUSE REGEX SPAMASSASSIN
OPTIONS_GROUP_TABLE= LDAP MYSQL PASSWD PGSQL PYTHON REDIS SMAP SQLITE
OPTIONS_DEFAULT= ${OPTIONS_GROUP_FILTER} ${OPTIONS_GROUP_TABLE}
# Filters
+DNSBL_DESC= Check messages against DNSBLs
+PAUSE_DESC= Pause incoming messages to reduce spam
SPAMASSASSIN_DESC= Check messages with SpamAssassin
# Tables
-PASSWD_DESC= passwd(5) table support
-SMAP_DESC= Socketmap protocol support
+PASSWD_DESC= passwd(5) table support
+SMAP_DESC= Socketmap protocol support
OPTIONS_SUB= yes
@@ -42,39 +44,27 @@ NO_ARCH= yes
#
# Filters
#
-
-SPAMASSASSIN_BUILD_DEPENDS= ${INSTALL_DIR}/filter-spamassassin:mail/opensmtpd-extras-filter-spamassassin
-SPAMASSASSIN_RUN_DEPENDS= ${SPAMASSASSIN_BUILD_DEPENDS}
+DNSBL_RUN_DEPENDS= ${INSTALL_DIR}/filter-dnsbl:mail/opensmtpd-extras-filter-dnsbl
+PAUSE_RUN_DEPENDS= ${INSTALL_DIR}/filter-pause:mail/opensmtpd-extras-filter-pause
+REGEX_RUN_DEPENDS= ${INSTALL_DIR}/filter-regex:mail/opensmtpd-extras-filter-regex
+SPAMASSASSIN_RUN_DEPENDS= ${INSTALL_DIR}/filter-spamassassin:mail/opensmtpd-extras-filter-spamassassin
#
# Tables
#
-
-MYSQL_BUILD_DEPENDS= ${INSTALL_DIR}/table-mysql:mail/opensmtpd-extras-table-mysql
-MYSQL_RUN_DEPENDS= ${MYSQL_BUILD_DEPENDS}
-
-PASSWD_BUILD_DEPENDS= ${INSTALL_DIR}/table-passwd:mail/opensmtpd-extras-table-passwd
-PASSWD_RUN_DEPENDS= ${PASSWD_BUILD_DEPENDS}
-
-PGSQL_BUILD_DEPENDS= ${INSTALL_DIR}/table-postgres:mail/opensmtpd-extras-table-postgresql
-PGSQL_RUN_DEPENDS= ${PGSQL_BUILD_DEPENDS}
-
-PYTHON_BUILD_DEPENDS= ${INSTALL_DIR}/table-python:mail/opensmtpd-extras-table-python
-PYTHON_RUN_DEPENDS= ${PYTHON_BUILD_DEPENDS}
-
-REDIS_BUILD_DEPENDS= ${INSTALL_DIR}/table-redis:mail/opensmtpd-extras-table-redis
-REDIS_RUN_DEPENDS= ${REDIS_BUILD_DEPENDS}
-
-SMAP_BUILD_DEPENDS= ${INSTALL_DIR}/table-socketmap:mail/opensmtpd-extras-table-socketmap
-SMAP_RUN_DEPENDS= ${SMAP_BUILD_DEPENDS}
-
-SQLITE_BUILD_DEPENDS= ${INSTALL_DIR}/table-sqlite:mail/opensmtpd-extras-table-sqlite
-SQLITE_RUN_DEPENDS= ${SQLITE_BUILD_DEPENDS}
+MYSQL_RUN_DEPENDS= ${INSTALL_DIR}/table-mysql:mail/opensmtpd-extras-table-mysql
+PASSWD_RUN_DEPENDS= ${INSTALL_DIR}/table-passwd:mail/opensmtpd-extras-table-passwd
+PGSQL_RUN_DEPENDS= ${INSTALL_DIR}/table-postgres:mail/opensmtpd-extras-table-postgresql
+PYTHON_RUN_DEPENDS= ${INSTALL_DIR}/table-python:mail/opensmtpd-extras-table-python
+REDIS_RUN_DEPENDS= ${INSTALL_DIR}/table-redis:mail/opensmtpd-extras-table-redis
+SMAP_RUN_DEPENDS= ${INSTALL_DIR}/table-socketmap:mail/opensmtpd-extras-table-socketmap
+SQLITE_RUN_DEPENDS= ${INSTALL_DIR}/table-sqlite:mail/opensmtpd-extras-table-sqlite
.else
# Only install this for the opensmtpd-extras master port
-post-install:
- @${RM} ${STAGEDIR}${MAN3PREFIX}/man/man3/filter_api.3
+pre-patch:
+ @${REINPLACE_CMD} -e '/man_MANS.*filter_api.3/s/^/#/' \
+ ${WRKSRC}/extras/wip/filters/Makefile.am
.endif