aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorpawel <pawel@FreeBSD.org>2014-11-06 01:35:38 +0800
committerpawel <pawel@FreeBSD.org>2014-11-06 01:35:38 +0800
commite92244cc364d12ed5f2941453626ab56ace51074 (patch)
treefd7b8a2d03c507f3d19c50aa999b484aef91e197 /mail
parent79416cc0e586b8b01b17f8db790b457e10cd7899 (diff)
downloadfreebsd-ports-gnome-e92244cc364d12ed5f2941453626ab56ace51074.tar.gz
freebsd-ports-gnome-e92244cc364d12ed5f2941453626ab56ace51074.tar.zst
freebsd-ports-gnome-e92244cc364d12ed5f2941453626ab56ace51074.zip
- Update to version 1.35
- Add LICENSE - Remove pkg-install script, move directory creation to pkg-plist - Use @sample keyword for config files PR: 194019 Submitted by: TEUBEL Györg y<tgyurci@gmail.com> Approved by: maintainer --This line, and those below, will be ignored-- > Description of fields to fill in above: 76 columns --| > PR: If a Bugzilla PR is affected by the change. > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Relnotes: Set to 'yes' for mention in release notes. > Security: Vulnerability reference (one per line) or description. > Sponsored by: If the change was sponsored by an organization. > Empty fields above will be automatically removed. M postgrey/Makefile M postgrey/distinfo D postgrey/files/patch-postgrey D postgrey/files/pkg-install.in M postgrey/files/postgrey.in M postgrey/pkg-message M postgrey/pkg-plist
Diffstat (limited to 'mail')
-rw-r--r--mail/postgrey/Makefile50
-rw-r--r--mail/postgrey/distinfo4
-rw-r--r--mail/postgrey/files/patch-postgrey19
-rw-r--r--mail/postgrey/files/pkg-install.in28
-rw-r--r--mail/postgrey/files/postgrey.in10
-rw-r--r--mail/postgrey/pkg-message36
-rw-r--r--mail/postgrey/pkg-plist10
7 files changed, 71 insertions, 86 deletions
diff --git a/mail/postgrey/Makefile b/mail/postgrey/Makefile
index 53a94a316ecb..77a3ad1a0edd 100644
--- a/mail/postgrey/Makefile
+++ b/mail/postgrey/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= postgrey
-PORTVERSION= 1.34
-PORTREVISION= 8
+PORTVERSION= 1.35
CATEGORIES= mail
MASTER_SITES= http://postgrey.schweikert.ch/pub/ \
http://postgrey.schweikert.ch/pub/old/
@@ -11,6 +10,8 @@ MASTER_SITES= http://postgrey.schweikert.ch/pub/ \
MAINTAINER= ports.maintainer@evilphi.com
COMMENT= Greylisting policy server for Postfix
+LICENSE= GPLv2
+
RUN_DEPENDS= p5-Net-Server>=0:${PORTSDIR}/net/p5-Net-Server \
p5-IO-Multiplex>=0:${PORTSDIR}/devel/p5-IO-Multiplex \
p5-Parse-Syslog>=0:${PORTSDIR}/textproc/p5-Parse-Syslog \
@@ -22,21 +23,27 @@ USE_RC_SUBR= ${PORTNAME}
NO_BUILD= yes
POD2MAN?= pod2man
PORTDOCS= README Changes README.exim
-SUB_FILES= pkg-install
-PLIST_SUB= USER=${PGY_USERNAME} \
- GROUP=${PGY_GROUPNAME}
-SUB_LIST= USER=${PGY_USERNAME} \
- GROUP=${PGY_GROUPNAME} \
- ETCFILES="${ETCFILES}" \
- POSTGREYDIR=${PGY_DIR}
+
+PG_DBDIR?= /var/db/postgrey
+PG_GROUP?= postgrey
+PG_RUNDIR?= /var/run/postgrey
+PG_USER?= postgrey
+
+SUB_LIST= PG_DBDIR=${PG_DBDIR} \
+ PG_RUNDIR=${PG_RUNDIR}
+
+PLIST_SUB+= PG_DBDIR=${PG_DBDIR} \
+ PG_GROUP=${PG_GROUP} \
+ PG_RUNDIR=${PG_RUNDIR} \
+ PG_USER=${PG_USER}
+
+USERS= ${PG_USER}
+GROUPS= ${PG_GROUP}
+
+MANPAGES= postgrey.1 policy-test.1 postgreyreport.1
ETCFILES= whitelist_clients whitelist_recipients
-PGY_USERNAME?= postgrey
-PGY_GROUPNAME?= postgrey
-PGY_DIR?= /var/db/postgrey
-USERS= ${PGY_USERNAME}
-GROUPS= ${PGY_GROUPNAME}
-MPAGES= postgrey.1 policy-test.1 postgreyreport.1
+USE_RC_SUBR= postgrey
USES= shebangfix perl5
SHEBANG_FILES= postgrey policy-test contrib/postgreyreport
@@ -46,25 +53,26 @@ OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
post-patch:
- @${REINPLACE_CMD} -e 's#nogroup#${PGY_GROUPNAME}#' \
+ @${REINPLACE_CMD} -e 's#nogroup#${PG_GROUP}#' \
-e 's#/etc/main.cf#/etc/postfix/main.cf#' ${WRKSRC}/postgrey
@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' \
${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_*
- @${REINPLACE_CMD} -e 's#/var/spool/postfix/postgrey#${PGY_DIR}#' \
+ @${REINPLACE_CMD} -e 's#/var/spool/postfix/postgrey#${PG_DBDIR}#' \
${WRKSRC}/postgrey ${WRKSRC}/contrib/postgreyreport
do-install:
- ${POD2MAN} ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.1
+ ${POD2MAN} ${WRKSRC}/postgrey ${WRKSRC}/postgrey.1
${POD2MAN} ${WRKSRC}/policy-test ${WRKSRC}/policy-test.1
${POD2MAN} ${WRKSRC}/contrib/postgreyreport ${WRKSRC}/postgreyreport.1
${INSTALL_SCRIPT} ${WRKSRC}/postgrey ${STAGEDIR}${PREFIX}/sbin
${INSTALL_SCRIPT} ${WRKSRC}/policy-test ${STAGEDIR}${PREFIX}/sbin
${INSTALL_SCRIPT} ${WRKSRC}/contrib/postgreyreport \
${STAGEDIR}${PREFIX}/sbin
- @${MKDIR} ${STAGEDIR}${PREFIX}/etc/postfix ${STAGEDIR}/${PGY_DIR}
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/postfix ${STAGEDIR}/${PG_DBDIR} \
+ ${STAGEDIR}/${PG_RUNDIR}
.for i in ${ETCFILES}
${INSTALL_DATA} ${WRKSRC}/postgrey_${i} \
- ${STAGEDIR}${PREFIX}/etc/postfix/dist-postgrey_${i}
+ ${STAGEDIR}${PREFIX}/etc/postfix/postgrey_${i}.sample
.endfor
.if ${PORT_OPTIONS:MDOCS}
@@ -72,6 +80,6 @@ do-install:
@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.endif
@cd ${WRKSRC} && \
- ${INSTALL_MAN} ${MPAGES} ${STAGEDIR}${MANPREFIX}/man/man1
+ ${INSTALL_MAN} ${MANPAGES} ${STAGEDIR}${MANPREFIX}/man/man1
.include <bsd.port.mk>
diff --git a/mail/postgrey/distinfo b/mail/postgrey/distinfo
index d974763629b4..dab141969687 100644
--- a/mail/postgrey/distinfo
+++ b/mail/postgrey/distinfo
@@ -1,2 +1,2 @@
-SHA256 (postgrey-1.34.tar.gz) = 9a9ee2f4e3cbbf15642e47802407c810ac5c54f0ad1572ebec3f0f645eb35707
-SIZE (postgrey-1.34.tar.gz) = 36399
+SHA256 (postgrey-1.35.tar.gz) = f6a6956630803e6f79ebff6ad0cc0d46ba32046ed6cc260e38e6f591de7bbdcf
+SIZE (postgrey-1.35.tar.gz) = 36610
diff --git a/mail/postgrey/files/patch-postgrey b/mail/postgrey/files/patch-postgrey
deleted file mode 100644
index 98260f1e4cbe..000000000000
--- a/mail/postgrey/files/patch-postgrey
+++ /dev/null
@@ -1,19 +0,0 @@
---- postgrey.orig 2011-05-05 04:54:15.000000000 +0800
-+++ postgrey 2013-10-20 01:07:50.744835568 +0800
-@@ -557,6 +557,16 @@
- if($opt{dbdir}) {
- $opt{dbdir} =~ /^(.*)$/; $opt{dbdir} = $1;
- }
-+ # untaint what is given on --pidfile. It is not security sensitive since
-+ # it is provided by the admin
-+ if($opt{pidfile}) {
-+ $opt{pidfile} =~ /^(.*)$/; $opt{pidfile} = $1;
-+ }
-+ # untaint what is given on --inet. It is not security sensitive since
-+ # it is provided by the admin
-+ if($opt{inet}) {
-+ $opt{inet} =~ /^(.*)$/; $opt{inet} = $1;
-+ }
-
- # determine proper "logsock" for Sys::Syslog
- my $syslog_logsock;
diff --git a/mail/postgrey/files/pkg-install.in b/mail/postgrey/files/pkg-install.in
deleted file mode 100644
index ca7ef451e3c7..000000000000
--- a/mail/postgrey/files/pkg-install.in
+++ /dev/null
@@ -1,28 +0,0 @@
-#! /bin/sh
-#
-# $FreeBSD$
-
-PATH=/bin:/usr/bin:/usr/sbin
-
-case $2 in
-
-PRE-INSTALL)
- if [ -z "%%POSTGREYDIR%%" -o -z "%%USER%%" -o -z "%%GROUP%%" ]; then
- echo "ERROR: A required pragma was empty"
- exit 1
- fi
- ;;
-
-POST-INSTALL)
- for i in %%ETCFILES%%; do
- if [ ! -f "%%PREFIX%%/etc/postfix/postgrey_${i}" ]; then
- echo "---> Installing new config file %%PREFIX%%/etc/postfix/postgrey_${i}"
- cp -p %%PREFIX%%/etc/postfix/dist-postgrey_${i} \
- %%PREFIX%%/etc/postfix/postgrey_${i}
- else
- echo "---> Keeping existing config file %%PREFIX%%/etc/postfix/postgrey_${i}"
- fi
- done
- ;;
-
-esac
diff --git a/mail/postgrey/files/postgrey.in b/mail/postgrey/files/postgrey.in
index 8a1f142355c9..9bb7f46c9b86 100644
--- a/mail/postgrey/files/postgrey.in
+++ b/mail/postgrey/files/postgrey.in
@@ -12,7 +12,7 @@
# postgrey_enable (bool) Set to 'YES' to enable
# Default: NO
# postgrey_dbdir (path) Location of postgrey database files.
-# Default: /var/db/postgrey
+# Default: %%PG_DBDIR%%
# postgrey_flags (extra args) Additional command-line parameters.
# Default: --inet=10023
#
@@ -30,15 +30,13 @@ rcvar=postgrey_enable
load_rc_config $name
: ${postgrey_enable:=NO}
-: ${postgrey_dbdir:=/var/db/postgrey}
+: ${postgrey_dbdir:=%%PG_DBDIR%%}
: ${postgrey_flags:=--inet=10023}
command=%%PREFIX%%/sbin/postgrey
-pidfile=/var/run/postgrey.pid
-required_dirs=${postgrey_dbdir}
+pidfile=%%PG_RUNDIR%%/postgrey.pid
+required_dirs="${postgrey_dbdir} %%PG_RUNDIR%%"
command_args="-d --pidfile=${pidfile} --dbdir=${postgrey_dbdir}"
-stop_postcmd="rm -f ${pidfile}"
-
run_rc_command "$1"
diff --git a/mail/postgrey/pkg-message b/mail/postgrey/pkg-message
index 7ac63a44be82..3ab3c70ab87a 100644
--- a/mail/postgrey/pkg-message
+++ b/mail/postgrey/pkg-message
@@ -1,7 +1,33 @@
-ATTENTION
+NETWORK LISTENER WARNING
+------------------------
+
+By default, the startup script specifies "--inet=10023" in postgrey_flags.
+This makes postgrey listen on localhost TCP port 10023. If you want to use a
+unix socket, a different port, or an external interface, please see the
+postgrey(1) man page about the use of the --inet and --unix flags and set
+postgrey_flags as appropriate.
+
+
+THIRD-PARTY DISCLOSURE WARNING
+------------------------------
+
+The default text used when postgrey returns a "greylisted" response includes a
+URL of the form:
+
+http://postgrey.schweikert.ch/help/example.com.html
+
+where example.com is the FQDN of the RCPT TO address of the greylisted message.
+This is a potential information disclosure in the following ways:
+
+- Indicates you are using David Schweikert's postgrey;
+- Someone who goes to that link may disclose to the website's operator that
+ they sent email to your domain.
+
+If you do not want this behaviour, you can override the default text by
+setting --greylist-text in postgrey_flags. An example of a generic setting
+would be --greylist-text='4.7.1 Greylisted'.
+
+Please see the "Greylist Text" section of the postgrey(1) man page for more
+information.
-The startup script for postgrey will make it listen on TCP port
-10023 by default. If you want to use a different setting, please
-read the comments in the RC script and set the appropriate settings
-via rc.conf before starting postgrey.
diff --git a/mail/postgrey/pkg-plist b/mail/postgrey/pkg-plist
index 26161ec3c0fc..abffab1d1914 100644
--- a/mail/postgrey/pkg-plist
+++ b/mail/postgrey/pkg-plist
@@ -1,11 +1,11 @@
-@unexec if cmp -s %D/etc/postfix/dist-postgrey_whitelist_recipients %D/etc/postfix/postgrey_whitelist_recipients; then rm -f %D/etc/postfix/postgrey_whitelist_recipients; fi
-@unexec if cmp -s %D/etc/postfix/dist-postgrey_whitelist_clients %D/etc/postfix/postgrey_whitelist_clients; then rm -f %D/etc/postfix/postgrey_whitelist_clients; fi
-etc/postfix/dist-postgrey_whitelist_recipients
-etc/postfix/dist-postgrey_whitelist_clients
+@sample etc/postfix/postgrey_whitelist_clients.sample
+@sample etc/postfix/postgrey_whitelist_recipients.sample
man/man1/policy-test.1.gz
man/man1/postgrey.1.gz
man/man1/postgreyreport.1.gz
sbin/postgrey
sbin/policy-test
sbin/postgreyreport
-@dir(%%USER%%,%%GROUP%%,2775) /var/db/postgrey
+@dir etc/postfix
+@dir(%%PG_USER%%,%%PG_GROUP%%,750) %%PG_DBDIR%%
+@dir(%%PG_USER%%,%%PG_GROUP%%,750) %%PG_RUNDIR%%