diff options
-rw-r--r-- | mail/Makefile | 1 | ||||
-rw-r--r-- | mail/enma/Makefile | 60 | ||||
-rw-r--r-- | mail/enma/distinfo | 3 | ||||
-rw-r--r-- | mail/enma/files/milter-enma.in | 65 | ||||
-rw-r--r-- | mail/enma/files/patch-build_build_all.sh | 18 | ||||
-rw-r--r-- | mail/enma/files/patch-enma_etc_enma.conf.sample | 13 | ||||
-rw-r--r-- | mail/enma/pkg-descr | 5 |
7 files changed, 165 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile index 9377550242cb..f84761b9b2b3 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -112,6 +112,7 @@ SUBDIR += enigmail SUBDIR += enigmail-seamonkey SUBDIR += enigmail-thunderbird + SUBDIR += enma SUBDIR += eps SUBDIR += epstools SUBDIR += esmtp diff --git a/mail/enma/Makefile b/mail/enma/Makefile new file mode 100644 index 000000000000..5db860fa9520 --- /dev/null +++ b/mail/enma/Makefile @@ -0,0 +1,60 @@ +# New ports collection makefile for: enma +# Date created: 7 Sep 2008 +# Whom: Hirohisa Yamaguchi <umq@ueo.co.jp> +# +# $FreeBSD$ +# + +PORTNAME= enma +PORTVERSION= 1.0.0 +CATEGORIES= mail +MASTER_SITES= SF + +MAINTAINER= umq@ueo.co.jp +COMMENT= A sender authentication milter supporting SPF and Sender ID + +BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/dns/bind94:fetch \ + ${NONEXISTENT}:${PORTSDIR}/mail/sendmail:fetch + +.if defined(WITH_POSTFIX_MILTER) || defined(WITH_POSTFIX) || defined(WITH_POSTFIX_CURRENT) +CONF_SUB= ${REINPLACE_CMD} -e '/milter\.postfix/s/false/true/' ${WRKSRC}/enma/etc/enma.conf.sample +.if defined(WITH_POSTFIX_CURRENT) +RUN_DEPENDS+= ${LOCALBASE}/libexec/postfix/smtpd:${PORTSDIR}/mail/postfix-current +.else +RUN_DEPENDS+= ${LOCALBASE}/libexec/postfix/smtpd:${PORTSDIR}/mail/postfix +.endif +.endif + +BIND_SRC_CMD= cd ${PORTSDIR}/dns/bind94 && ${MAKE} -V DISTFILES | ${CUT} -d ' ' -f 1 +SENDMAIL_SRC_CMD= cd ${PORTSDIR}/mail/sendmail && make -V DISTFILES + +USE_RC_SUBR= milter-enma +USE_GMAKE= yes +MAN1= enma.1 +MANCOMPRESSED= no +PLIST_FILES= bin/enma bin/sidfquery etc/enma.conf.sample +PORTDOCS= ChangeLog INSTALL LICENSE README TODO +SUB_FILES= milter-enma + +.include <bsd.port.pre.mk> + +pre-configure: + ${LN} -s ${DISTDIR}/$$(${BIND_SRC_CMD}) ${WRKSRC}/build + ${LN} -s ${DISTDIR}/$$(${SENDMAIL_SRC_CMD}) ${WRKSRC}/build + $$(${CONF_SUB}) + +do-build: + cd ${WRKSRC}/build && ./build_all.sh --prefix=${PREFIX} + +do-install: + cd ${WRKSRC}/build && ./build_all.sh install + +post-install: +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} +.for f in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR} +.endfor +.endif + +.include <bsd.port.post.mk> diff --git a/mail/enma/distinfo b/mail/enma/distinfo new file mode 100644 index 000000000000..b5908fb32d5f --- /dev/null +++ b/mail/enma/distinfo @@ -0,0 +1,3 @@ +MD5 (enma-1.0.0.tar.gz) = d447cb470176cf0f1c7599ade11af404 +SHA256 (enma-1.0.0.tar.gz) = facfb7dcad5d3a8eb1ad33cdb936828b6b4358e2b11cbb5cdbb4224b803ead92 +SIZE (enma-1.0.0.tar.gz) = 161566 diff --git a/mail/enma/files/milter-enma.in b/mail/enma/files/milter-enma.in new file mode 100644 index 000000000000..488c02ee0ba9 --- /dev/null +++ b/mail/enma/files/milter-enma.in @@ -0,0 +1,65 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: milterenma +# REQUIRE: DAEMON +# BEFORE: mail localpkg +# KEYWORD: shutdown + +# Define these milterenma_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/milterenma +# +# milterenma_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable enma +# milterenma_cfgfile (str): Configuration file. +# milterenma_pid (str): Set pid file path. +# milterenma_uid (str): Set username to run milter. +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +milterenma_enable=${milterenma_enable:-"NO"} +milterenma_cfgfile=${milterenma_cfgfile:-"%%PREFIX%%/etc/enma.conf"} +milterenma_pid=${milterenma_pid:-"/var/run/milterenma/enma.pid"} +milterenma_uid=${milterenma_uid:-"mailnull"} + +. %%RC_SUBR%% + +name="milterenma" +rcvar=`set_rcvar` + +load_rc_config $name + +if [ -f "${milterenma_cfgfile}" ];then + milterenma_cfgfile="-c ${milterenma_cfgfile}" +else + echo "milterenma_cfgfile is not correctly set" + exit 1 +fi +pidfile=${milterenma_pid} +command="%%PREFIX%%/bin/enma" +command_args="${milterenma_cfgfile}" +start_precmd="enma_precmd" +stop_postcmd="enma_postcmd" +_piddir=$(dirname ${pidfile}) + +enma_precmd () +{ + if [ ! -d ${_piddir} ] ; then + mkdir -p ${_piddir} + fi + if [ -n "${milterenma_uid}" ] ; then + chown ${milterenma_uid} ${_piddir} + fi +} + +enma_postcmd() +{ + # just if the directory is empty + rmdir ${_piddir} > /dev/null 2>&1 +} + +run_rc_command "$1" diff --git a/mail/enma/files/patch-build_build_all.sh b/mail/enma/files/patch-build_build_all.sh new file mode 100644 index 000000000000..f247a783eb2a --- /dev/null +++ b/mail/enma/files/patch-build_build_all.sh @@ -0,0 +1,18 @@ +--- ./build/build_all.sh.orig 2008-08-26 15:14:49.000000000 +0900 ++++ ./build/build_all.sh 2008-09-07 01:09:10.000000000 +0900 +@@ -100,6 +100,7 @@ + ./configure \ + --prefix=${WORK}/tmp_install \ + --enable-threads \ ++ --mandir=${PREFIX}/man \ + ${CONFIGURE_OPTION} && \ + ${MAKE_CMD} && \ + ${MAKE_CMD} install +@@ -135,6 +136,7 @@ + cd ../ && \ + ./configure \ + --prefix=${PREFIX} \ ++ --mandir=${PREFIX}/man \ + --with-libmilter=${WORK}/tmp_install \ + --with-libbind=${WORK}/tmp_install \ + ${CONFIGURE_OPTION} && \ diff --git a/mail/enma/files/patch-enma_etc_enma.conf.sample b/mail/enma/files/patch-enma_etc_enma.conf.sample new file mode 100644 index 000000000000..28b2ca490fbc --- /dev/null +++ b/mail/enma/files/patch-enma_etc_enma.conf.sample @@ -0,0 +1,13 @@ +--- ./enma/etc/enma.conf.sample.orig 2008-08-08 14:57:14.000000000 +0900 ++++ ./enma/etc/enma.conf.sample 2008-09-07 01:09:31.000000000 +0900 +@@ -6,8 +6,8 @@ + + ## Milter ## + milter.socket: inet:10025@127.0.0.1 +-milter.user: daemon +-milter.pidfile: /var/run/enma/enma.pid ++milter.user: mailnull ++milter.pidfile: /var/run/milterenma/enma.pid + milter.chdir: /var/tmp + milter.timeout: 7210 + milter.loglevel: 0 diff --git a/mail/enma/pkg-descr b/mail/enma/pkg-descr new file mode 100644 index 000000000000..ec51ff97434b --- /dev/null +++ b/mail/enma/pkg-descr @@ -0,0 +1,5 @@ +ENMA is a milter program for the domain authentication technologies. +It authenticates sender's address with SPF and Sender ID, then labels +the result onto the Authentication-Results: field. + +WWW: http://sourceforge.net/projects/enma/ |