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

Collapse All | Expand All

(-)UPDATING (+11 lines)
Lines 5-10 Link Here
5
You should get into the habit of checking this file for changes each time
5
You should get into the habit of checking this file for changes each time
6
you update your ports collection, before attempting any port upgrades.
6
you update your ports collection, before attempting any port upgrades.
7
7
8
20130525:
9
  AFFECTS: users of mail/postgrey
10
  AUTHOR: Darren Pilgrim <ports.maintainer@evilphi.com>
11
12
  The RC script for postgrey has been modified. If you use the
13
  default value for postgrey_flags this does not affect you.
14
15
  If you have postgrey listening on a unix socket or set any optionall
16
  values, please read the comments in the RC scripts and check your
17
  settings in rc.conf prior to restarting postgrey.
18
8
20130520:
19
20130520:
9
  AFFECTS: users of textproc/elasticsearch
20
  AFFECTS: users of textproc/elasticsearch
10
  AUTHOR: tj@FreeBSD.org
21
  AUTHOR: tj@FreeBSD.org
(-)mail/postgrey/Makefile (-9 / +6 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-51 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:
45
	@${REINPLACE_CMD} -e 's#nogroup#${PGY_GROUPNAME}#' ${WRKSRC}/postgrey
49
	@${REINPLACE_CMD} -e 's#/etc/main.cf#/etc/postfix/main.cf#' ${WRKSRC}/postgrey
46
	@${REINPLACE_CMD} -e 's#/etc/main.cf#/etc/postfix/main.cf#' ${WRKSRC}/postgrey
50
	@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' ${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_*
47
	@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' ${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_*
51
	@${REINPLACE_CMD} -e 's#/var/spool/postfix/postgrey#${PGY_DIR}#' ${WRKSRC}/postgrey ${WRKSRC}/contrib/postgreyreport
48
	@${REINPLACE_CMD} -e 's#/var/spool/postfix/postgrey#${PGY_DIR}#' ${WRKSRC}/postgrey ${WRKSRC}/contrib/postgreyreport
(-)mail/postgrey/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)
(-)mail/postgrey/files/postgrey.in (-23 / +19 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 (bool)        Set to 'YES' to enable
13
#                               Default: NO
14
# postgrey_dbdir (path)         Location of postgrey database files.
15
#                               Default: /var/db/postgrey
16
# postgrey_flags (extra args)   Additional command-line parameters.
17
#                               Default: --inet=10023
14
#
18
#
15
# See perldoc postgrey for flags
19
# Note:
16
#
20
#
21
# postgrey_flags must include a --inet or --unix option or postgrey will
22
# not run.  Change the --dbdir option with postgrey_dbdir.  Please see
23
# the postgrey(1) man page or perldoc postgrey for more information.
17
24
18
. /etc/rc.subr
25
. /etc/rc.subr
19
26
20
name=postgrey
27
name=postgrey
21
rcvar=postgrey_enable
22
28
23
command=%%PREFIX%%/sbin/postgrey
29
load_rc_config $name
24
required_dirs=/var/db/postgrey
25
extra_commands=reload
26
30
27
stop_postcmd=stop_postcmd
31
: ${postgrey_enable:=NO}
32
: ${postgrey_dbdir:=/var/db/postgrey}
33
: ${postgrey_flags:=--inet=10023}
28
34
29
stop_postcmd()
35
command=%%PREFIX%%/sbin/postgrey
30
{
36
pidfile=/var/run/postgrey.pid
31
  rm -f $pidfile
37
required_dirs=${postgrey_dbdir}
32
}
33
38
34
# set defaults
39
command_args="-d --pidfile=${pidfile} --dbdir=${postgrey_dbdir}"
35
40
36
load_rc_config $name
41
stop_postcmd="rm -f ${pidfile}"
37
42
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"
43
run_rc_command "$1"
(-)mail/postgrey/pkg-message (+7 lines)
Line 0 Link Here
1
2
ATTENTION
3
4
The startup script for postgrey will make it listen on TCP port
5
10023 by default. If you want to use a different setting, please
6
read the comments in the RC script and set the appropriate settings
7
via rc.conf before starting postgrey.

Return to bug 178644