Index: head/mail/postsrsd/Makefile =================================================================== --- head/mail/postsrsd/Makefile (revision 436912) +++ head/mail/postsrsd/Makefile (revision 436913) @@ -1,35 +1,34 @@ # Created by: Krzysztof Stryjek # $FreeBSD$ PORTNAME= postsrsd PORTVERSION= 1.4 +PORTREVISION= 1 CATEGORIES= mail MAINTAINER= ports@bsdserwis.com COMMENT= Postfix Sender Rewriting Scheme daemon LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= help2man:misc/help2man \ - base64:converters/base64 -RUN_DEPENDS= base64:converters/base64 +BUILD_DEPENDS= help2man:misc/help2man USE_GITHUB= yes GH_ACCOUNT= roehling USES= cmake pkgconfig CMAKE_ARGS= --no-warn-unused-cli \ -DCMAKE_INCLUDE_PATH="${LOCALBASE}/include" \ -DCMAKE_LIBRARY_PATH="${LOCALBASE}/lib" USE_RC_SUBR= ${PORTNAME} PORTDOCS= README.md main.cf.ex README_UPGRADE.md OPTIONS_DEFINE= DOCS -DOCS_CMAKE_ON= -DENABLE_DOCS:STRING="ON" +DOCS_CMAKE_BOOL= ENABLE_DOCS PLIST_FILES= sbin/postsrsd man/man8/postsrsd.8.gz .include Index: head/mail/postsrsd/files/postsrsd.in =================================================================== --- head/mail/postsrsd/files/postsrsd.in (revision 436912) +++ head/mail/postsrsd/files/postsrsd.in (revision 436913) @@ -1,87 +1,87 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: postsrsd # REQUIRE: DAEMON # BEFORE: mail # KEYWORD: shutdown # Define these postsrsd_* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/postsrsd # # postsrsd_enable (bool): Set to "NO" by default. # Set it to "YES" to enable dkim-milter # postsrsd_uid (str): Set username to run postsrsd. # postsrsd_secret (str): Secret file file. See postsrsd(8) # postsrsd_domain (str): Local domain name: rewrite to originate from this domain # postsrsd_exclude_domains (str): Domains to exclude (comma-separated list) # postsrsd_forward_port (int): Port to listen for forward map # postsrsd_reverse_port (int): Port to listen for reverse map # postsrsd_idle_timeout (int): Timeout for idle client connection # postsrsd_flags (str): Flags passed to start command. . /etc/rc.subr name="postsrsd" rcvar=postsrsd_enable start_precmd="postsrsd_prepcmd" stop_postcmd="postsrsd_postcmd" command="%%PREFIX%%/sbin/postsrsd" _piddir="/var/run/postsrsd" pidfile="${_piddir}/${name}.pid" load_rc_config $name # # DO NOT CHANGE THESE DEFAULT VALUES HERE # : ${postsrsd_enable="NO"} : ${postsrsd_domain=`/bin/hostname`} : ${postsrsd_uid="mailnull"} : ${postsrsd_secret="%%PREFIX%%/etc/postsrsd.secret"} : ${postsrsd_forward_port="10001"} : ${postsrsd_reverse_port="10002"} : ${postsrsd_idle_timeout="1800"} : ${postsrsd_exclude_domains=""} # Options other than above can be set with $postsrsd_flags. # see postsrsd documentation for detail. [ -n "${postsrsd_uid}" ] && _uid_prefix="-u" [ -n "${postsrsd_domain}" ] && cmd_args="-d ${postsrsd_domain}" [ -n "${postsrsd_secret}" ] && cmd_args="${cmd_args} -s ${postsrsd_secret}" [ -n "${postsrsd_forward_port}" ] && cmd_args="${cmd_args} -f ${postsrsd_forward_port}" [ -n "${postsrsd_reverse_port}" ] && cmd_args="${cmd_args} -r ${postsrsd_reverse_port}" [ -n "${postsrsd_idle_timeout}" ] && cmd_args="${cmd_args} -t ${postsrsd_idle_timeout}" [ -n "${postsrsd_exclude_domains}" ] && cmd_args="${cmd_args} -X${postsrsd_exclude_domains}" command_args=" -D ${_uid_prefix} ${postsrsd_uid} -p ${pidfile} ${cmd_args} ${postsrsd_flags}" postsrsd_prepcmd () { if [ ! -d ${_piddir} ] ; then mkdir -p ${_piddir} fi if [ -n "${postsrsd_uid}" ] ; then chown ${postsrsd_uid} ${_piddir} fi if [ ! -f "${postsrsd_secret}" ] ; then - tr -cd "[:alnum:]" < /dev/urandom | head -c 24 > "${postsrsd_secret}" + env -i tr -cd "[:alnum:]" < /dev/urandom | head -c 24 > "${postsrsd_secret}" fi } postsrsd_postcmd() { # just if the directory is empty rmdir ${_piddir} > /dev/null 2>&1 } # to let rc.subr kill them all unset pidfile run_rc_command "$1"