Index: Makefile =================================================================== --- Makefile (revision 318935) +++ Makefile (working copy) @@ -3,7 +3,7 @@ PORTNAME= postgrey PORTVERSION= 1.34 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= mail MASTER_SITES= http://postgrey.schweikert.ch/pub/ \ http://postgrey.schweikert.ch/pub/old/ @@ -23,14 +23,13 @@ POD2MAN?= pod2man PORTDOCS= README Changes README.exim SUB_FILES= pkg-install -SUB_LIST= USER=${PGY_USERNAME} UID=${PGY_USERID} GROUP=${PGY_GROUPNAME} \ - GID=${PGY_GROUPID} ETCFILES="${ETCFILES}" \ +SUB_LIST= USER=${PGY_USERNAME} \ + GROUP=${PGY_GROUPNAME} \ + ETCFILES="${ETCFILES}" \ POSTGREYDIR=${PGY_DIR} ETCFILES= whitelist_clients whitelist_recipients PGY_USERNAME?= postgrey -PGY_USERID?= 225 -PGY_GROUPNAME?= ${PGY_USERNAME} -PGY_GROUPID?= ${PGY_USERID} +PGY_GROUPNAME?= postgrey PGY_DIR?= /var/db/postgrey USERS= ${PGY_USERNAME} @@ -40,9 +39,6 @@ USES= shebangfix SHEBANG_FILES= ${WRKSRC}/postgrey -OPTIONS_DEFINE= DOCS -OPTIONS_DEFAULT=DOCS - .include post-patch: Index: files/pkg-install.in =================================================================== --- files/pkg-install.in (revision 318935) +++ files/pkg-install.in (working copy) @@ -7,15 +7,10 @@ case $2 in PRE-INSTALL) - echo "---> Starting install script:" - - if [ -z "%%POSTGREYDIR%%" -o \ - -z "%%USER%%" -o -z "%%GROUP%%" -o \ - -z "%%UID%%" -o -z "%%GID%%" ]; then + if [ -z "%%POSTGREYDIR%%" -o -z "%%USER%%" -o -z "%%GROUP%%" ]; then echo "ERROR: A required pragma was empty" exit 1 fi - ;; POST-INSTALL) Index: files/postgrey.in =================================================================== --- files/postgrey.in (revision 318935) +++ files/postgrey.in (working copy) @@ -7,41 +7,42 @@ # BEFORE: mail # KEYWORD: shutdown -# # Add the following lines to /etc/rc.conf to enable postgrey: # # postgrey_enable="YES" # -# See perldoc postgrey for flags +# You must specify listening on a TCP socket (--inet option) or +# unix socket (--unix) in postgrey_flags: # +# postgrey_flags="--inet=PORT" +# +# -OR- +# +# postgrey_flags="--unix=/path/to/socket" +# +# By default, postgrey uses /var/db/postgrey for its databases. +# You can change this location using the postgrey_dbdir option. +# +# You can set extra command-line flags in postgrey_flags as well. +# See the postgrey(1) man page or perldoc postgrey for options. . /etc/rc.subr name=postgrey -rcvar=postgrey_enable +load_rc_config $name + +: ${postgrey_enable:=NO} +: ${postgrey_dbdir:=/var/db/postgrey} +: ${postgrey_flags:=--inet=10023} + command=%%PREFIX%%/sbin/postgrey -required_dirs=/var/db/postgrey +pidfile=/var/run/postgrey.pid +required_dirs=${postgrey_dbdir} extra_commands=reload -stop_postcmd=stop_postcmd +postgrey_flags="-d --pidfile=${pidfile} --dbdir=${postgrey_dbdir} ${postgrey_flags}" -stop_postcmd() -{ - rm -f $pidfile -} +stop_postcmd="rm -f $pidfile" -# set defaults - -load_rc_config $name - -postgrey_enable=${postgrey_enable:-"NO"} -postgrey_greylist_header=${postgrey_greylist_header:-"X-Greylist: delayed %t seconds by postgrey-%v at %h\; %d"} -postgrey_pidfile=${postgrey_pidfile:-"/var/run/postgrey.pid"} -postgrey_flags=${postgrey_flags:-"--pidfile=${postgrey_pidfile} \ - --inet=10023 -d --user=%%USER%% --group=%%GROUP%% --dbdir=/var/db/postgrey \ - --x-greylist-header=${postgrey_greylist_header}"} - -pidfile="${postgrey_pidfile}" - run_rc_command "$1"