View | Details | Raw Unified | Return to bug 178644 | Differences between
and this patch

Collapse All | Expand All

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

Return to bug 178644