aboutsummaryrefslogtreecommitdiff
path: root/mail/dkimproxy
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2006-07-27 16:26:39 +0000
committerRong-En Fan <rafan@FreeBSD.org>2006-07-27 16:26:39 +0000
commit338e2198a3a979bb99404832ecb26c1687476c1a (patch)
treedfd3bf2fee6860f8f5503b34306f288fe77bcd52 /mail/dkimproxy
parentc6df86859dce1a7aceaafe2a7b09e19eefe7fb9b (diff)
downloadports-338e2198a3a979bb99404832ecb26c1687476c1a.tar.gz
ports-338e2198a3a979bb99404832ecb26c1687476c1a.zip
Add dkimproxy 0.13, DKIM filter for Postfix.
PR: ports/100381 Submitted by: Yoshisato YANAGISAWA
Notes
Notes: svn path=/head/; revision=168892
Diffstat (limited to 'mail/dkimproxy')
-rw-r--r--mail/dkimproxy/Makefile39
-rw-r--r--mail/dkimproxy/distinfo3
-rw-r--r--mail/dkimproxy/files/dkimproxy_in.in56
-rw-r--r--mail/dkimproxy/files/dkimproxy_out.in61
-rw-r--r--mail/dkimproxy/files/pkg-deinstall.in13
-rw-r--r--mail/dkimproxy/files/pkg-install.in36
-rw-r--r--mail/dkimproxy/pkg-descr8
-rw-r--r--mail/dkimproxy/pkg-plist12
8 files changed, 228 insertions, 0 deletions
diff --git a/mail/dkimproxy/Makefile b/mail/dkimproxy/Makefile
new file mode 100644
index 000000000000..3fb7f61f278e
--- /dev/null
+++ b/mail/dkimproxy/Makefile
@@ -0,0 +1,39 @@
+# New ports collection makefile for: dkimproxy
+# Date created: 16 July 2006
+# Whom: Yoshisato YANAGISAWA
+#
+# $FreeBSD$
+#
+
+PORTNAME= dkimproxy
+PORTVERSION= 0.13
+CATEGORIES= mail
+MASTER_SITES= http://jason.long.name/dkimproxy/
+
+MAINTAINER= yanagisawa@csg.is.titech.ac.jp
+COMMENT= DKIM filter for Postfix
+
+BUILD_DEPENDS= ${SITE_PERL}/Mail/DKIM.pm:${PORTSDIR}/mail/p5-Mail-DKIM \
+ ${SITE_PERL}/Net/Server.pm:${PORTSDIR}/net/p5-Net-Server
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
+GNU_CONFIGURE= yes
+USE_RC_SUBR= dkimproxy_in dkimproxy_out
+
+DKIMPY_USERNAME?= dkimproxy
+DKIMPY_USERID?= 525
+DKIMPY_GROUPNAME?= ${DKIMPY_USERNAME}
+DKIMPY_GROUPID?= ${DKIMPY_USERID}
+
+SUB_FILES= pkg-install pkg-deinstall
+SUB_LIST= USER=${DKIMPY_USERNAME} \
+ UID=${DKIMPY_USERID} \
+ GROUP=${DKIMPY_GROUPNAME} \
+ GID=${DKIMPY_GROUPID}
+
+.include <bsd.port.pre.mk>
+
+pre-install:
+ ${SH} ${PKGINSTALL} ${PREFIX} PRE-INSTALL
+
+.include <bsd.port.post.mk>
diff --git a/mail/dkimproxy/distinfo b/mail/dkimproxy/distinfo
new file mode 100644
index 000000000000..5ff577df9d50
--- /dev/null
+++ b/mail/dkimproxy/distinfo
@@ -0,0 +1,3 @@
+MD5 (dkimproxy-0.13.tar.gz) = 473a9031fae051f076c2d94e81dc6583
+SHA256 (dkimproxy-0.13.tar.gz) = f9d4dfe6bdd04fcdfde2bab93503752da1075859f15ba2d8bdc4ee9dd655a0f1
+SIZE (dkimproxy-0.13.tar.gz) = 83743
diff --git a/mail/dkimproxy/files/dkimproxy_in.in b/mail/dkimproxy/files/dkimproxy_in.in
new file mode 100644
index 000000000000..6a4e54ca16d4
--- /dev/null
+++ b/mail/dkimproxy/files/dkimproxy_in.in
@@ -0,0 +1,56 @@
+#!/bin/sh
+# $FreeBSD$
+#
+
+# PROVIDE: dkimproxy_in
+# REQUIRE: LOGIN
+# BEFORE: mail
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable dkimproxy.in:
+#
+# dkimproxy_in_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name=dkimproxy_in
+rcvar=`set_rcvar`
+
+# set defaults
+
+: ${dkimproxy_in_enable="NO"}
+: ${dkimproxy_in_flags="127.0.0.1:10025 127.0.0.1:10026"}
+: ${dkimproxy_in_pidfile="/var/run/dkimproxy_in.pid"}
+: ${dkimproxy_in_user="dkimproxy"}
+
+start_cmd="dkimproxy_in_start"
+stop_cmd="dkimproxy_in_stop"
+
+dkimproxy_in_start()
+{
+ if [ -f ${dkimproxy_in_pidfile} ]; then
+ echo "${name} already running?"
+ exit 1
+ fi
+ touch ${dkimproxy_in_pidfile}
+ chown ${dkimproxy_in_user} ${dkimproxy_in_pidfile}
+ su -m ${dkimproxy_in_user} -c "daemon -cf -p ${dkimproxy_in_pidfile} \
+ %%PREFIX%%/bin/dkimproxy.in ${dkimproxy_in_flags}"
+ echo "Starting ${name}"
+}
+
+dkimproxy_in_stop()
+{
+ if [ ! -f ${dkimproxy_in_pidfile} ]; then
+ echo "${name} not running?"
+ exit 1
+ fi
+ kill `cat ${dkimproxy_in_pidfile}`
+ rm -f ${dkimproxy_in_pidfile}
+ echo "Stopping ${name}"
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/mail/dkimproxy/files/dkimproxy_out.in b/mail/dkimproxy/files/dkimproxy_out.in
new file mode 100644
index 000000000000..239039bd5277
--- /dev/null
+++ b/mail/dkimproxy/files/dkimproxy_out.in
@@ -0,0 +1,61 @@
+#!/bin/sh
+# $FreeBSD$
+#
+
+# PROVIDE: dkimproxy_out
+# REQUIRE: LOGIN
+# BEFORE: mail
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable dkimproxy.out:
+#
+# dkimproxy_out_enable="YES"
+#
+# Before you enable dkimproxy.out, you also need to make your domainkey to
+# set it to DNS and configurate dkimproxy_flags.
+#
+
+. %%RC_SUBR%%
+
+name="dkimproxy_out"
+rcvar=`set_rcvar`
+
+# set defaults
+
+: ${dkimproxy_out_enable="NO"}
+: ${dkimproxy_out_flags="--keyfile=%%PREFIX%%/etc/dkimproxy/private.key \
+ --selector=selector1 --domain=example.org --method=relaxed \
+ 127.0.0.1:10027 127.0.0.1:10028"}
+: ${dkimproxy_out_pidfile="/var/run/dkimproxy_out.pid"}
+: ${dkimproxy_out_user="dkimproxy"}
+
+start_cmd="dkimproxy_out_start"
+stop_cmd="dkimproxy_out_stop"
+
+dkimproxy_out_start()
+{
+ if [ -f ${dkimproxy_out_pidfile} ]; then
+ echo "${name} already running?"
+ exit 1
+ fi
+ touch ${dkimproxy_out_pidfile}
+ chown ${dkimproxy_out_user} ${dkimproxy_out_pidfile}
+ su -m ${dkimproxy_out_user} -c "daemon -cf -p ${dkimproxy_out_pidfile} \
+ %%PREFIX%%/bin/dkimproxy.out ${dkimproxy_out_flags}"
+ echo "Starting ${name}."
+}
+
+dkimproxy_out_stop()
+{
+ if [ ! -f ${dkimproxy_out_pidfile} ]; then
+ echo "${name} not running?"
+ exit 1
+ fi
+ kill `cat ${dkimproxy_out_pidfile}`
+ rm -f ${dkimproxy_out_pidfile}
+ echo "Stopping ${name}"
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/mail/dkimproxy/files/pkg-deinstall.in b/mail/dkimproxy/files/pkg-deinstall.in
new file mode 100644
index 000000000000..65b9aec55e4c
--- /dev/null
+++ b/mail/dkimproxy/files/pkg-deinstall.in
@@ -0,0 +1,13 @@
+#!/bin/sh
+# $FreeBSD$
+
+if [ "$2" != "POST-DEINSTALL" ]; then
+ exit 0
+fi
+
+USERNAME=%%USER%%
+
+if pw usershow "${USERNAME}" 2>/dev/null 1>&2; then
+ echo "To delete ${USERNAME} user permanently, use 'pw userdel \"${USERNAME}\"'"
+fi
+exit 0
diff --git a/mail/dkimproxy/files/pkg-install.in b/mail/dkimproxy/files/pkg-install.in
new file mode 100644
index 000000000000..999ccc8fff42
--- /dev/null
+++ b/mail/dkimproxy/files/pkg-install.in
@@ -0,0 +1,36 @@
+#! /bin/sh
+#
+# $FreeBSD$
+
+PATH=/bin:/usr/bin:/usr/sbin
+
+case $2 in
+
+PRE-INSTALL)
+ echo "---> Starting install script:"
+
+ if [ -z "%%USER%%" -o -z "%%GROUP%%" -o \
+ -z "%%UID%%" -o -z "%%GID%%" ]; then
+ echo "ERROR: A required pragma was empty"
+ exit 1
+ fi
+
+ # Create group if required
+ if pw group show "%%GROUP%%" >/dev/null 2>&1; then
+ echo "---> Using existing group \"%%GROUP%%\""
+ else
+ echo "---> Adding group \"%%GROUP%%\" (%%GID%%)"
+ /usr/sbin/pw groupadd %%GROUP%% -g %%GID%% || exit 1
+ fi
+
+ # Create user if required
+ if pw user show "%%USER%%" >/dev/null 2>&1; then
+ echo "---> Using existing user \"%%USER%%\""
+ else
+ echo "---> Adding user \"%%USER%%\" (%%UID%%)"
+ pw useradd "%%USER%%" -u "%%UID%%" -g "%%GROUP%%" -h - \
+ -d "/nonexistent" -s "/sbin/nologin" -c "DKIM Proxy Owner" || exit 1
+ fi
+ ;;
+
+esac
diff --git a/mail/dkimproxy/pkg-descr b/mail/dkimproxy/pkg-descr
new file mode 100644
index 000000000000..ad9009ac536b
--- /dev/null
+++ b/mail/dkimproxy/pkg-descr
@@ -0,0 +1,8 @@
+This is an implementation of DomainKeys Identified Mail (DKIM) draft standard
+for the Postfix mail transfer agent. DKIM is a scheme to sign and verify
+e-mail messages on a per-domain basis.
+
+Details regarding the protocol and other issues related to the draft standard
+can be found at http://mipassoc.org/dkim/.
+
+WWW: http://jason.long.name/dkimproxy/
diff --git a/mail/dkimproxy/pkg-plist b/mail/dkimproxy/pkg-plist
new file mode 100644
index 000000000000..67566b874730
--- /dev/null
+++ b/mail/dkimproxy/pkg-plist
@@ -0,0 +1,12 @@
+bin/dkim_responder.pl
+bin/dkimproxy.in
+bin/dkimproxy.out
+bin/dkimsign.pl
+bin/dkimverify.pl
+lib/DKMessage.pm
+lib/MSDW/SMTP/Client.pm
+lib/MSDW/SMTP/Server.pm
+lib/MySmtpProxyServer.pm
+lib/MySmtpServer.pm
+@dirrm lib/MSDW/SMTP
+@dirrm lib/MSDW