FreeBSD Bugzilla – Attachment 148801 Details for
Bug 194019
[PATCH] mail/postgrey: update to 1.35
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Ordered variables, and run directory permission
postgrey-1.35_patch.txt (text/plain), 9.06 KB, created by
TEUBEL György
on 2014-10-30 20:16:58 UTC
(
hide
)
Description:
Ordered variables, and run directory permission
Filename:
MIME Type:
Creator:
TEUBEL György
Created:
2014-10-30 20:16:58 UTC
Size:
9.06 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 371723) >+++ Makefile (working copy) >@@ -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 @@ > 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 @@ > 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,15 +53,15 @@ > .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 >@@ -61,10 +68,11 @@ > ${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 @@ > @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> >Index: distinfo >=================================================================== >--- distinfo (revision 371723) >+++ distinfo (working copy) >@@ -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 >Index: files/patch-postgrey >=================================================================== >--- files/patch-postgrey (revision 371723) >+++ files/patch-postgrey (working copy) >@@ -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; >Index: files/pkg-install.in >=================================================================== >--- files/pkg-install.in (revision 371723) >+++ files/pkg-install.in (working copy) >@@ -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 >Index: files/postgrey.in >=================================================================== >--- files/postgrey.in (revision 371723) >+++ files/postgrey.in (working copy) >@@ -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 @@ > 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" >Index: pkg-message >=================================================================== >--- pkg-message (revision 371723) >+++ pkg-message (working copy) >@@ -1,7 +1,33 @@ > >-ATTENTION >+NETWORK LISTENER WARNING >+------------------------ > >-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. >+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. >+ >Index: pkg-plist >=================================================================== >--- pkg-plist (revision 371723) >+++ pkg-plist (working copy) >@@ -1,7 +1,5 @@ >-@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 >@@ -8,4 +6,6 @@ > 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%%
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 194019
:
147808
|
147892
|
148791
|
148793
| 148801