Bug 100381 - New port: mail/dkimproxy DKIM filter for Postfix MTA.
Summary: New port: mail/dkimproxy DKIM filter for Postfix MTA.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Rong-En Fan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-16 12:10 UTC by Yoshisato YANAGISAWA
Modified: 2006-07-27 17:26 UTC (History)
0 users

See Also:


Attachments
file.shar (5.45 KB, text/plain)
2006-07-16 12:10 UTC, Yoshisato YANAGISAWA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yoshisato YANAGISAWA 2006-07-16 12:10:15 UTC
	Dkimproxy is a filter for the Postfix mail user agent that implement
	DomainKeys Identified Mail (DKIM).  DKIM is a protocol to verify the
	e-mail according to per-domain basis by using public-key crypt system.
	Dkimproxy has evolved from dkfilter project, which is a project to 
	implement DomainKeys by the same developers, and it might be only the
	DKIM filter for Postfix.

	This port is depend on mail/p5-Mail-DKIM, which was sended PR at:
	http://www.freebsd.org/cgi/query-pr.cgi?pr=100380.

How-To-Repeat: 	n/a
Comment 1 Rong-En Fan freebsd_committer freebsd_triage 2006-07-16 13:38:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rafan

Eat.
Comment 2 Rong-En Fan freebsd_committer freebsd_triage 2006-07-17 16:40:03 UTC
State Changed
From-To: open->feedback

Ask submitter about 1) a 'dkimproxy' user 2)  use preferable default 
variable assignment.
Comment 3 Yoshisato YANAGISAWA 2006-07-22 07:42:07 UTC
Thank you for some advice.
I addressed the issue and renewed shar file is following:

# 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:
#
#	dkimproxy
#	dkimproxy/files
#	dkimproxy/files/dkimproxy_in.in
#	dkimproxy/files/dkimproxy_out.in
#	dkimproxy/Makefile
#	dkimproxy/distinfo
#	dkimproxy/pkg-descr
#	dkimproxy/pkg-plist
#	dkimproxy/pkg-install
#
echo c - dkimproxy
mkdir -p dkimproxy > /dev/null 2>&1
echo c - dkimproxy/files
mkdir -p dkimproxy/files > /dev/null 2>&1
echo x - dkimproxy/files/dkimproxy_in.in
sed 's/^X//' >dkimproxy/files/dkimproxy_in.in << 'END-of-dkimproxy/files/dkimproxy_in.in'
X#!/bin/sh
X# $FreeBSD$
X#
X
X# PROVIDE: dkimproxy_in
X# REQUIRE: LOGIN
X# BEFORE: mail
X# KEYWORD: shutdown
X
X#
X# Add the following lines to /etc/rc.conf to enable dkimproxy.in:
X#
X# dkimproxy_in_enable="YES"
X#
X
X. %%RC_SUBR%%
X
Xname=dkimproxy_in
Xrcvar=`set_rcvar`
X
X# set defaults
X
X: ${dkimproxy_in_enable="NO"}
X: ${dkimproxy_in_flags="127.0.0.1:10025 127.0.0.1:10026"}
X: ${dkimproxy_in_pidfile="/var/run/dkimproxy_in.pid"}
X: ${dkimproxy_in_user="dkimproxy"}
X
Xstart_cmd="dkimproxy_in_start"
Xstop_cmd="dkimproxy_in_stop"
X
Xdkimproxy_in_start()
X{
X	if [ -f ${dkimproxy_in_pidfile} ]; then
X		echo "${name} already running?"
X		exit 1
X	fi
X	touch ${dkimproxy_in_pidfile}
X	chown ${dkimproxy_in_user} ${dkimproxy_in_pidfile}
X	su -m ${dkimproxy_in_user} -c "daemon -cf -p ${dkimproxy_in_pidfile} \
X		%%PREFIX%%/bin/dkimproxy.in ${dkimproxy_in_flags}"
X	echo "Starting ${name}"
X}
X
Xdkimproxy_in_stop()
X{
X	if [ ! -f ${dkimproxy_in_pidfile} ]; then
X		echo "${name} not running?"
X		exit 1
X	fi
X	kill `cat ${dkimproxy_in_pidfile}`
X	rm -f ${dkimproxy_in_pidfile}
X	echo "Stopping ${name}"
X}
X
Xload_rc_config $name
Xrun_rc_command "$1"
END-of-dkimproxy/files/dkimproxy_in.in
echo x - dkimproxy/files/dkimproxy_out.in
sed 's/^X//' >dkimproxy/files/dkimproxy_out.in << 'END-of-dkimproxy/files/dkimproxy_out.in'
X#!/bin/sh
X# $FreeBSD$
X#
X
X# PROVIDE: dkimproxy_out
X# REQUIRE: LOGIN
X# BEFORE: mail
X# KEYWORD: shutdown
X
X#
X# Add the following lines to /etc/rc.conf to enable dkimproxy.out:
X#
X# dkimproxy_out_enable="YES"
X#
X# Before you enable dkimproxy.out, you also need to make your domainkey to
X# set it to DNS and configurate dkimproxy_flags.
X#
X
X. %%RC_SUBR%%
X
Xname="dkimproxy_out"
Xrcvar=`set_rcvar`
X
X# set defaults
X
X: ${dkimproxy_out_enable="NO"}
X: ${dkimproxy_out_flags="--keyfile=%%PREFIX%%/etc/dkimproxy/private.key \
X	--selector=selector1 --domain=example.org --method=relaxed \
X	127.0.0.1:10027 127.0.0.1:10028"}
X: ${dkimproxy_out_pidfile="/var/run/dkimproxy_out.pid"}
X: ${dkimproxy_out_user="dkimproxy"}
X
Xstart_cmd="dkimproxy_out_start"
Xstop_cmd="dkimproxy_out_stop"
X
Xdkimproxy_out_start()
X{
X	if [ -f ${dkimproxy_out_pidfile} ]; then
X		echo "${name} already running?"
X		exit 1
X	fi 
X	touch ${dkimproxy_out_pidfile}
X	chown ${dkimproxy_out_user} ${dkimproxy_out_pidfile}
X	su -m ${dkimproxy_out_user} -c "daemon -cf -p ${dkimproxy_out_pidfile} \
X		%%PREFIX%%/bin/dkimproxy.out ${dkimproxy_out_flags}"
X	echo "Starting ${name}."
X}
X
Xdkimproxy_out_stop()
X{
X	if [ ! -f ${dkimproxy_out_pidfile} ]; then
X		echo "${name} not running?"
X		exit 1
X	fi
X	kill `cat ${dkimproxy_out_pidfile}`
X	rm -f ${dkimproxy_out_pidfile}
X	echo "Stopping ${name}"
X}
X
Xload_rc_config $name
Xrun_rc_command "$1"
END-of-dkimproxy/files/dkimproxy_out.in
echo x - dkimproxy/Makefile
sed 's/^X//' >dkimproxy/Makefile << 'END-of-dkimproxy/Makefile'
X# New ports collection makefile for:	dkimproxy
X# Date created:				16 July 2006
X# Whom:					Yoshisato YANAGISAWA
X#
X# $FreeBSD$
X#
X
XPORTNAME=	dkimproxy
XPORTVERSION=	0.13
XCATEGORIES=	mail
XMASTER_SITES=	http://jason.long.name/dkimproxy/
X
XMAINTAINER=	yanagisawa@csg.is.titech.ac.jp
XCOMMENT=	DKIM filter for Postfix
X
XBUILD_DEPENDS=	${SITE_PERL}/Mail/DKIM.pm:${PORTSDIR}/mail/p5-Mail-DKIM \
X		${SITE_PERL}/Net/Server.pm:${PORTSDIR}/net/p5-Net-Server
XRUN_DEPENDS=	${BUILD_DEPENDS}
X
XGNU_CONFIGURE=	yes
XUSE_RC_SUBR=	dkimproxy_in dkimproxy_out
X
XDKIMPY_USERNAME?=	dkimproxy
XDKIMPY_USERID?=		525
XDKIMPY_GROUPNAME?=	${DKIMPY_USERNAME}
XDKIMPY_GROUPID?=	${DKIMPY_USERID}
X
XPKGDEINSTALL=	${WRKDIR}/pkg-deinstall
XPKGINSTALL=	${WRKDIR}/pkg-install
XWRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
X
X.include <bsd.port.pre.mk>
X
Xpre-install:
X	${SED}  -e 's#%%USER%%#${DKIMPY_USERNAME}#g' \
X		-e 's#%%UID%%#${DKIMPY_USERID}#g' \
X		-e 's#%%GROUP%%#${DKIMPY_GROUPNAME}#g' \
X		-e 's#%%GID%%#${DKIMPY_GROUPID}#g' \
X		-e 's#%%PREFIX%%#${PREFIX}#g' ${MASTERDIR}/pkg-install > \
X		${PKGINSTALL}
X	${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
X
X.include <bsd.port.post.mk>
X
END-of-dkimproxy/Makefile
echo x - dkimproxy/distinfo
sed 's/^X//' >dkimproxy/distinfo << 'END-of-dkimproxy/distinfo'
XMD5 (dkimproxy-0.13.tar.gz) = 473a9031fae051f076c2d94e81dc6583
XSHA256 (dkimproxy-0.13.tar.gz) = f9d4dfe6bdd04fcdfde2bab93503752da1075859f15ba2d8bdc4ee9dd655a0f1
XSIZE (dkimproxy-0.13.tar.gz) = 83743
END-of-dkimproxy/distinfo
echo x - dkimproxy/pkg-descr
sed 's/^X//' >dkimproxy/pkg-descr << 'END-of-dkimproxy/pkg-descr'
XThis is an implementation of DomainKeys Identified Mail (DKIM) draft standard
Xfor the Postfix mail transfer agent.  DKIM is a scheme to sign and verify 
Xe-mail messages on a per-domain basis.
X
XDetails regarding the protocol and other issues related to the draft standard
Xcan be found at http://mipassoc.org/dkim/.
X
XWWW: http://jason.long.name/dkimproxy/
END-of-dkimproxy/pkg-descr
echo x - dkimproxy/pkg-plist
sed 's/^X//' >dkimproxy/pkg-plist << 'END-of-dkimproxy/pkg-plist'
Xbin/dkim_responder.pl
Xbin/dkimproxy.in
Xbin/dkimproxy.out
Xbin/dkimsign.pl
Xbin/dkimverify.pl
Xlib/DKMessage.pm
Xlib/MSDW/SMTP/Client.pm
Xlib/MSDW/SMTP/Server.pm
Xlib/MySmtpProxyServer.pm
Xlib/MySmtpServer.pm
X@dirrm lib/MSDW/SMTP
X@dirrm lib/MSDW
END-of-dkimproxy/pkg-plist
echo x - dkimproxy/pkg-install
sed 's/^X//' >dkimproxy/pkg-install << 'END-of-dkimproxy/pkg-install'
X#! /bin/sh
X#
X# $FreeBSD: ports/mail/postgrey/pkg-install,v 1.1 2004/09/01 22:11:21 will Exp $
X
XPATH=/bin:/usr/bin:/usr/sbin
X
Xcase $2 in
X
XPRE-INSTALL)
X  echo "---> Starting install script:"
X
X  if [ -z "%%USER%%" -o -z "%%GROUP%%" -o \
X       -z "%%UID%%" -o -z "%%GID%%" ]; then
X    echo "ERROR: A required pragma was empty"
X    exit 1
X  fi
X
X  # Create group if required
X  if pw group show "%%GROUP%%" >/dev/null 2>&1; then
X    echo "---> Using existing group \"%%GROUP%%\""
X  else
X    echo "---> Adding group \"%%GROUP%%\" (%%GID%%)"
X    /usr/sbin/pw groupadd %%GROUP%% -g %%GID%% || exit 1
X  fi
X
X  # Create user if required
X  if pw user show "%%USER%%" >/dev/null 2>&1; then
X    echo "---> Using existing user \"%%USER%%\""
X  else
X    echo "---> Adding user \"%%USER%%\" (%%UID%%)"
X    pw useradd "%%USER%%" -u "%%UID%%" -g "%%GROUP%%" -h - \
X      -d "/nonexistent" -s "/sbin/nologin" -c "Postgrey Owner" || exit 1
X  fi
X  ;;
X
Xesac
END-of-dkimproxy/pkg-install
exit
Comment 4 Rong-En Fan freebsd_committer freebsd_triage 2006-07-27 17:26:52 UTC
State Changed
From-To: feedback->closed

New port added. Thanks!