ports/147732: [patch] port mail/postfix-current update from 20100323 to 20100603

olli hauer ohauer at gmx.de
Wed Jun 9 18:50:02 UTC 2010


>Number:         147732
>Category:       ports
>Synopsis:       [patch] port mail/postfix-current update from 20100323 to 20100603
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 09 18:50:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     olli hauer <ohauer at gmx.de>
>Release:        
>Organization:
>Environment:


>Description:
- update postfix-current-2.8 from 20100323 to 20100603
- use new rewritten Makefile and patches from postfix 
- fix start script default vars
- get rid off patchfiles with '::' in filename
 ( http://wiki.freebsd.org/PortsLongtermTargets section 'Not using :: in patchfile name' )



>How-To-Repeat:
>Fix:
--- patch_mail_postfix-current.txt begins here ---
Index: postfix-current/distinfo
===================================================================
--- postfix-current/distinfo	(revision 1)
+++ postfix-current/distinfo	(working copy)
@@ -1,3 +1,3 @@
-MD5 (postfix/postfix-2.8-20100323.tar.gz) = 5bbe7c726f48b1096638dfaf201ae637
-SHA256 (postfix/postfix-2.8-20100323.tar.gz) = 49327f23e36e0ddcaef1e7253cab1b96e5daa96db72ff19e07daaf8e09c86e46
-SIZE (postfix/postfix-2.8-20100323.tar.gz) = 3446878
+MD5 (postfix/postfix-2.8-20100603.tar.gz) = e2becccc6e873dfab0940bdde67b7f4c
+SHA256 (postfix/postfix-2.8-20100603.tar.gz) = 93f17db8a522a6820c0a4000d5bfb18913c482eea884023ef5a4e71685304237
+SIZE (postfix/postfix-2.8-20100603.tar.gz) = 3455687
Index: postfix-current/files/patch-conf::post-install
===================================================================
--- postfix-current/files/patch-conf::post-install	(revision 0)
+++ postfix-current/files/patch-conf::post-install	(working copy)
@@ -1,11 +0,0 @@
---- conf/post-install.orig	Thu Feb 24 08:06:08 2005
-+++ conf/post-install	Sat Mar  5 11:53:42 2005
-@@ -185,7 +185,7 @@
- 
- umask 022
- 
--PATH=/bin:/usr/bin:/usr/sbin:/usr/etc:/sbin:/etc:/usr/contrib/bin:/usr/gnu/bin:/usr/ucb:/usr/bsd
-+PATH=/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin
- SHELL=/bin/sh
- IFS=" 	
- "
Index: postfix-current/files/patch-conf::main.cf
===================================================================
--- postfix-current/files/patch-conf::main.cf	(revision 0)
+++ postfix-current/files/patch-conf::main.cf	(working copy)
@@ -1,80 +0,0 @@
---- conf/main.cf.orig	2007-12-18 11:50:25.000000000 -0200
-+++ conf/main.cf	2008-02-29 22:35:12.000000000 -0300
-@@ -33,19 +33,19 @@
- # The command_directory parameter specifies the location of all
- # postXXX commands.
- #
--command_directory = /usr/sbin
-+command_directory = !!PREFIX!!/sbin
- 
- # The daemon_directory parameter specifies the location of all Postfix
- # daemon programs (i.e. programs listed in the master.cf file). This
- # directory must be owned by root.
- #
--daemon_directory = /usr/libexec/postfix
-+daemon_directory = !!PREFIX!!/libexec/postfix
- 
- # The data_directory parameter specifies the location of Postfix-writable
- # data files (caches, random numbers). This directory must be owned
- # by the mail_owner account (see below).
- #
--data_directory = /var/lib/postfix
-+data_directory = /var/db/postfix
- 
- # QUEUE AND PROCESS OWNERSHIP
- #
-@@ -244,7 +244,7 @@
- # 
- #mynetworks_style = class
- #mynetworks_style = subnet
--#mynetworks_style = host
-+mynetworks_style = host
- 
- # Alternatively, you can specify the mynetworks list by hand, in
- # which case Postfix ignores the mynetworks_style setting.
-@@ -615,37 +615,37 @@
- # sendmail_path: The full pathname of the Postfix sendmail command.
- # This is the Sendmail-compatible mail posting interface.
- # 
--sendmail_path =
-+sendmail_path = !!PREFIX!!/sbin/sendmail
- 
- # newaliases_path: The full pathname of the Postfix newaliases command.
- # This is the Sendmail-compatible command to build alias databases.
- #
--newaliases_path =
-+newaliases_path = !!PREFIX!!/bin/newaliases
- 
- # mailq_path: The full pathname of the Postfix mailq command.  This
- # is the Sendmail-compatible mail queue listing command.
- # 
--mailq_path =
-+mailq_path = !!PREFIX!!/bin/mailq
- 
- # setgid_group: The group for mail submission and queue management
- # commands.  This must be a group name with a numerical group ID that
- # is not shared with other accounts, not even with the Postfix account.
- #
--setgid_group =
-+setgid_group = maildrop
- 
- # html_directory: The location of the Postfix HTML documentation.
- #
--html_directory =
-+html_directory = no
- 
- # manpage_directory: The location of the Postfix on-line manual pages.
- #
--manpage_directory =
-+manpage_directory = !!PREFIX!!/man
- 
- # sample_directory: The location of the Postfix sample configuration files.
- # This parameter is obsolete as of Postfix 2.1.
- #
--sample_directory =
-+sample_directory = !!PREFIX!!/etc/postfix
- 
- # readme_directory: The location of the Postfix README files.
- #
--readme_directory =
-+readme_directory = no
Index: postfix-current/files/pkg-message.in
===================================================================
--- postfix-current/files/pkg-message.in	(revision 0)
+++ postfix-current/files/pkg-message.in	(revision 0)
@@ -0,0 +1,27 @@
+To enable postfix startup script please add postfix_enable="YES" in
+your rc.conf
+
+If you not need sendmail anymore, please add in your rc.conf:
+
+sendmail_enable="NO"
+sendmail_submit_enable="NO"
+sendmail_outbound_enable="NO"
+sendmail_msp_queue_enable="NO"
+
+And you can disable some sendmail specific daily maintenance routines in your
+/etc/periodic.conf file:
+
+daily_clean_hoststat_enable="NO"
+daily_status_mail_rejects_enable="NO"
+daily_status_include_submit_mailq="NO"
+daily_submit_queuerun="NO"
+
+If /etc/periodic.conf does not exist please create it and add those values.
+
+If you are using SASL, you need to make sure that postfix has access to read
+the sasldb file.  This is accomplished by adding postfix to group mail and
+making the %%PREFIX%%/etc/sasldb* file(s) readable by group mail (this should
+be the default for new installs).
+
+If you are upgrading from postfix version prior to 2.0, please see the README
+files for recommended changes to your configuration.

Property changes on: postfix-current/files/pkg-message.in
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: postfix-current/files/patch-src::global::mail_params.h
===================================================================
--- postfix-current/files/patch-src::global::mail_params.h	(revision 0)
+++ postfix-current/files/patch-src::global::mail_params.h	(working copy)
@@ -1,38 +0,0 @@
---- src/global/mail_params.h.orig	2008-04-28 20:47:26.000000000 -0300
-+++ src/global/mail_params.h	2008-07-20 20:21:07.000000000 -0300
-@@ -67,7 +67,7 @@
- extern gid_t var_owner_gid;
- 
- #define VAR_SGID_GROUP		"setgid_group"
--#define DEF_SGID_GROUP		"postdrop"
-+#define DEF_SGID_GROUP		"maildrop"
- extern char *var_sgid_group;
- extern gid_t var_sgid_gid;
- 
-@@ -241,7 +241,7 @@
-   */
- #define VAR_DAEMON_DIR		"daemon_directory"
- #ifndef DEF_DAEMON_DIR
--#define DEF_DAEMON_DIR		"/usr/libexec/postfix"
-+#define DEF_DAEMON_DIR		"!!PREFIX!!/libexec/postfix"
- #endif
- extern char *var_daemon_dir;
- 
-@@ -265,7 +265,7 @@
-   */
- #define VAR_DATA_DIR		"data_directory"
- #ifndef DEF_DATA_DIR
--#define DEF_DATA_DIR		"/var/lib/postfix"
-+#define DEF_DATA_DIR		"/var/db/postfix"
- #endif
- extern char *var_data_dir;
- 
-@@ -279,7 +279,7 @@
-   */
- #define VAR_CONFIG_DIR		"config_directory"
- #ifndef DEF_CONFIG_DIR
--#define DEF_CONFIG_DIR		"/etc/postfix"
-+#define DEF_CONFIG_DIR		"!!PREFIX!!/etc/postfix"
- #endif
- extern char *var_config_dir;
- 
Index: postfix-current/files/postfix.sh.in
===================================================================
--- postfix-current/files/postfix.sh.in	(revision 1)
+++ postfix-current/files/postfix.sh.in	(working copy)
@@ -25,9 +25,9 @@
 
 load_rc_config $name
 
-: ${postfix_enable="NO"}
-: ${postfix_pidfile="/var/spool/postfix/pid/master.pid"}
-: ${postfix_procname="%%PREFIX%%/libexec/postfix/master"}
+: ${postfix_enable:="NO"}
+: ${postfix_pidfile:="/var/spool/postfix/pid/master.pid"}
+: ${postfix_procname:="%%PREFIX%%/libexec/postfix/master"}
 
 start_cmd=${name}_start
 stop_cmd=${name}_stop
Index: postfix-current/files/pkg-install.in
===================================================================
--- postfix-current/files/pkg-install.in	(revision 0)
+++ postfix-current/files/pkg-install.in	(revision 0)
@@ -0,0 +1,158 @@
+#!/bin/sh
+#
+#	$FreeBSD: ports/mail/postfix/files/pkg-install.in,v 1.3 2009/06/11 01:42:24 wxs Exp $
+#
+
+# If the POSTFIX_DEFAULT_MTA environment variable is set to YES, it
+# will make the port/package use defaults which make postfix replace
+# sendmail as much as possible.
+
+PREFIX=${PKG_PREFIX:=%%PREFIX%%}
+ETCDIR=${ETCDIR:=%%ETCDIR%%}
+DAEMONDIR=${DAEMONDIR:=%%DAEMONDIR%%}
+READMEDIR=${READMEDIR:=%%READMEDIR%%}
+BATCH=${BATCH:=no}
+POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no}
+
+if [ "${POSTFIX_DEFAULT_MTA}" = "no" ]; then
+      DEFAULT_REPLACE_MAILERCONF=n
+else
+      DEFAULT_REPLACE_MAILERCONF=y
+fi
+
+if [ -x /usr/sbin/nologin ]; then
+      NOLOGIN=/usr/sbin/nologin
+else
+      NOLOGIN=/sbin/nologin
+fi
+
+ask() {
+      local question default answer
+
+      question=$1
+      default=$2
+      if [ -z "${PACKAGE_BUILDING}" -a "${BATCH}" = "no" ]; then
+	      read -p "${question} [${default}]? " answer
+      fi
+      if [ -z "${answer}" ]; then
+	      answer=${default}
+      fi
+      echo ${answer}
+}
+
+yesno() {
+      local question default answer
+
+      question=$1
+      default=$2
+      while :; do
+	      answer=$(ask "${question}" "${default}")
+	      case "${answer}" in
+		      [Yy]*)	return 0;;
+		      [Nn]*)	return 1;;
+	      esac
+	      echo "Please answer yes or no."
+      done
+}
+
+if [ "$2" = "PRE-INSTALL" ]; then
+      USER=postfix
+      UID=125
+      GROUP=postfix
+      GID=125
+      GROUP2=maildrop
+      GID2=126
+
+      if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then
+	      echo "You already have a group \"${GROUP}\", so I will use it."
+      else
+	      if /usr/sbin/pw groupadd ${GROUP} -g ${GID}; then
+		      echo "Added group \"${GROUP}\"."
+	      else
+		      echo "Adding group \"${GROUP}\" failed..."
+		      echo "Please create it, and try again."
+		      exit 1
+	      fi
+      fi
+
+      if /usr/sbin/pw groupshow "${GROUP2}" 2>/dev/null; then
+	      echo "You already have a group \"${GROUP2}\", so I will use it."
+      else
+	      if /usr/sbin/pw groupadd ${GROUP2} -g ${GID2}; then
+		      echo "Added group \"${GROUP2}\"."
+	      else
+		      echo "Adding group \"${GROUP2}\" failed..."
+		      echo "Please create it, and try again."
+		      exit 1
+	      fi
+      fi
+
+      if /usr/sbin/pw user show "${USER}" 2>/dev/null; then
+	      echo "You already have a user \"${USER}\", so I will use it."
+      else
+	      if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - -d /var/spool/postfix -s ${NOLOGIN} -c "Postfix Mail System"; then
+		      echo "Added user \"${USER}\"."
+	      else
+		      echo "Adding user \"${USER}\" failed..."
+		      echo "Please create it, and try again."
+		      exit 1
+	      fi
+      fi
+
+      if /usr/sbin/pw show group mail | grep -q "${USER}" 2>/dev/null; then
+	      echo "You already have user \"${USER}\" in group \"mail\", so I will use it."
+      else
+	      echo "You need user \"${USER}\" added to group \"mail\"."
+	      if yesno "Would you like me to add it" y; then
+		      /usr/sbin/pw groupmod mail -m ${USER} || exit
+		      echo "Done."
+	      else
+		      echo "Please create it, and try again."
+		      exit 1
+	      fi
+      fi
+fi
+
+if [ "$2" = "POST-INSTALL" ]; then
+	SAMPLES="main.cf master.cf" 
+	for file in $SAMPLES
+	do
+		if [ ! -f ${ETCDIR}/$file ]; then
+                	cp ${DAEMONDIR}/$file ${ETCDIR}/
+		fi
+	done
+
+      /bin/sh ${DAEMONDIR}/post-install tempdir=/tmp \
+	daemon_directory=${DAEMONDIR} \
+	html_directory=${READMEDIR} \
+	readme_directory=${READMEDIR} \
+	upgrade-package
+fi
+
+replace() {
+      local orig repl
+
+	orig=$1
+	repl=$2
+	if [ -e ${orig} ]; then
+		/bin/mv -f ${orig} ${orig}.OFF
+		/bin/chmod 0 ${orig}.OFF
+	fi
+	if [ -e ${repl} ]; then
+		/bin/ln -s ${repl} ${orig}
+	fi
+}
+
+if [ "$2" = "POST-INSTALL" -a -z "${PACKAGE_BUILDING}" ]; then
+	if yesno "Would you like to activate Postfix in /etc/mail/mailer.conf" ${DEFAULT_REPLACE_MAILERCONF}; then
+		/bin/mv -f /etc/mail/mailer.conf /etc/mail/mailer.conf.old
+		echo "#"						>	/etc/mail/mailer.conf
+		echo -n "# Execute the Postfix sendmail program"	>>	/etc/mail/mailer.conf
+		echo ", named ${PREFIX}/sbin/sendmail"		>>	/etc/mail/mailer.conf
+		echo "#"						>>	/etc/mail/mailer.conf
+		echo "sendmail	${PREFIX}/sbin/sendmail"	>>	/etc/mail/mailer.conf
+		echo "send-mail	${PREFIX}/sbin/sendmail"	>>	/etc/mail/mailer.conf
+		echo "mailq		${PREFIX}/sbin/sendmail"	>>	/etc/mail/mailer.conf
+		echo "newaliases	${PREFIX}/sbin/sendmail"	>>	/etc/mail/mailer.conf
+	fi
+fi

Property changes on: postfix-current/files/pkg-install.in
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: postfix-current/pkg-message
===================================================================
--- postfix-current/pkg-message	(revision 0)
+++ postfix-current/pkg-message	(working copy)
@@ -1,25 +0,0 @@
-To enable postfix startup script please add postfix_enable="YES" in
-your rc.conf
-
-If you not need sendmail anymore, please add in your rc.conf:
-
-sendmail_enable="NO"
-sendmail_submit_enable="NO"
-sendmail_outbound_enable="NO"
-sendmail_msp_queue_enable="NO"
-
-And you can disable some sendmail specific daily maintenance routines in your
-/etc/periodic.conf file:
-
-daily_clean_hoststat_enable="NO"
-daily_status_mail_rejects_enable="NO"
-daily_status_include_submit_mailq="NO"
-daily_submit_queuerun="NO"
-
-If you are using SASL, you need to make sure that postfix has access to read
-the sasldb file.  This is accomplished by adding postfix to group mail and
-making the /usr/local/etc/sasldb* file(s) readable by group mail (this should
-be the default for new installs).
-
-If you are upgrading from postfix version prior to 2.0, please see the README
-files for recommended changes to your configuration.
Index: postfix-current/pkg-install
===================================================================
--- postfix-current/pkg-install	(revision 0)
+++ postfix-current/pkg-install	(working copy)
@@ -1,167 +0,0 @@
-#!/bin/sh
-#
-#	$FreeBSD: ports/mail/postfix-current/pkg-install,v 1.24 2008/03/01 01:50:08 mnag Exp $
-#
-
-# If the POSTFIX_DEFAULT_MTA environment variable is set to YES, it
-# will make the port/package use defaults which make postfix replace
-# sendmail as much as possible.
-
-PKG_PREFIX=${PKG_PREFIX:=/usr/local}
-BATCH=${BATCH:=no}
-POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no}
-
-if [ x${POSTFIX_DEFAULT_MTA} = xno ]; then
-	DEFAULT_REPLACE_MAILERCONF=n
-else
-	DEFAULT_REPLACE_MAILERCONF=y
-fi
-
-if [ -x /usr/sbin/nologin ]; then
-	NOLOGIN=/usr/sbin/nologin
-else
-	NOLOGIN=/sbin/nologin
-fi
-
-ask() {
-	local question default answer
-
-	question=$1
-	default=$2
-	if [ -z "${PACKAGE_BUILDING}" -a x${BATCH} = xno ]; then
-		read -p "${question} [${default}]? " answer
-	fi
-	if [ x${answer} = x ]; then
-		answer=${default}
-	fi
-	echo ${answer}
-}
-
-yesno() {
-	local question default answer
-
-	question=$1
-	default=$2
-	while :; do
-		answer=$(ask "${question}" "${default}")
-		case "${answer}" in
-			[Yy]*)	return 0;;
-			[Nn]*)	return 1;;
-		esac
-		echo "Please answer yes or no."
-	done
-}
-
-if [ x"$2" = xPRE-INSTALL ]; then
-	USER=postfix
-	UID=125
-	GROUP=postfix
-	GID=125
-	GROUP2=maildrop
-	GID2=126
-
-	if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then
-		echo "You already have a group \"${GROUP}\", so I will use it."
-	else
-		if /usr/sbin/pw groupadd ${GROUP} -g ${GID}; then
-			echo "Added group \"${GROUP}\"."
-		else
-			echo "Adding group \"${GROUP}\" failed..."
-			echo "Please create it, and try again."
-			exit 1
-		fi
-	fi
-
-	if /usr/sbin/pw groupshow "${GROUP2}" 2>/dev/null; then
-		echo "You already have a group \"${GROUP2}\", so I will use it."
-	else
-		if /usr/sbin/pw groupadd ${GROUP2} -g ${GID2}; then
-			echo "Added group \"${GROUP2}\"."
-		else
-			echo "Adding group \"${GROUP2}\" failed..."
-			echo "Please create it, and try again."
-			exit 1
-		fi
-	fi
-
-	if /usr/sbin/pw user show "${USER}" 2>/dev/null; then
-		echo "You already have a user \"${USER}\", so I will use it."
-	else
-		if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - -d /var/spool/postfix -s ${NOLOGIN} -c "Postfix Mail System"; then
-			echo "Added user \"${USER}\"."
-		else
-			echo "Adding user \"${USER}\" failed..."
-			echo "Please create it, and try again."
-			exit 1
-		fi
-	fi
-
-	if /usr/sbin/pw show group mail | grep -q "${USER}" 2>/dev/null; then
-		echo "You already have user \"${USER}\" in group \"mail\", so I will use it."
-	else
-		echo "You need user \"${USER}\" added to group \"mail\"."
-		if yesno "Would you like me to add it" y; then
-			/usr/sbin/pw groupmod mail -m ${USER} || exit
-			echo "Done."
-		else
-			echo "Please create it, and try again."
-			exit 1
-		fi
-	fi
-fi
-
-if [ x"$2" = xPOST-INSTALL ]; then
-	if [ -d ${PKG_PREFIX}/etc/postfix/dist ]; then
-		for file in ${PKG_PREFIX}/etc/postfix/dist/*; do
-			if [ ! -f ${PKG_PREFIX}/etc/postfix/${file#${PKG_PREFIX}/etc/postfix/dist} ]; then
-				cp $file ${PKG_PREFIX}/etc/postfix/
-			fi
-		done
-	fi
-
-	/bin/sh ${PKG_PREFIX}/libexec/postfix/post-install tempdir=/tmp \
-	config_directory=${PKG_PREFIX}/etc/postfix \
-	data_directory=/var/db/postfix \
-	daemon_directory=${PKG_PREFIX}/libexec/postfix \
-	command_directory=${PKG_PREFIX}/sbin \
-	queue_directory=/var/spool/postfix \
-	sendmail_path=${PKG_PREFIX}/sbin/sendmail \
-	newaliases_path=${PKG_PREFIX}/bin/newaliases \
-	mailq_path=${PKG_PREFIX}/bin/mailq \
-	mail_owner=postfix \
-	setgid_group=maildrop \
-	manpage_directory=${PKG_PREFIX}/man \
-	sample_directory=${PKG_PREFIX}/etc/postfix \
-	readme_directory=no \
-	upgrade-package
-fi
-# readme_directory is "no" above since the package will have correct perms
-# already, and we don't know if they had PORTDOCS.
-
-replace() {
-	local orig repl
-
-	orig=$1
-	repl=$2
-	if [ -e ${orig} ]; then
-		/bin/mv -f ${orig} ${orig}.OFF
-		/bin/chmod 0 ${orig}.OFF
-	fi
-	if [ -e ${repl} ]; then
-		/bin/ln -s ${repl} ${orig}
-	fi
-}
-
-if [ x"$2" = xPOST-INSTALL -a -z "${PACKAGE_BUILDING}" ]; then
-	if yesno "Would you like to activate Postfix in /etc/mail/mailer.conf" ${DEFAULT_REPLACE_MAILERCONF}; then
-		/bin/mv -f /etc/mail/mailer.conf /etc/mail/mailer.conf.old
-		echo "#"						>	/etc/mail/mailer.conf
-		echo -n "# Execute the Postfix sendmail program"	>>	/etc/mail/mailer.conf
-		echo ", named ${PKG_PREFIX}/sbin/sendmail"		>>	/etc/mail/mailer.conf
-		echo "#"						>>	/etc/mail/mailer.conf
-		echo "sendmail	${PKG_PREFIX}/sbin/sendmail"	>>	/etc/mail/mailer.conf
-		echo "send-mail	${PKG_PREFIX}/sbin/sendmail"	>>	/etc/mail/mailer.conf
-		echo "mailq	${PKG_PREFIX}/sbin/sendmail"	>>	/etc/mail/mailer.conf
-		echo "newaliases	${PKG_PREFIX}/sbin/sendmail"	>>	/etc/mail/mailer.conf
-	fi
-fi
Index: postfix-current/pkg-plist
===================================================================
--- postfix-current/pkg-plist	(revision 1)
+++ postfix-current/pkg-plist	(working copy)
@@ -1,28 +1,5 @@
- at unexec if cmp -s %D/etc/postfix/main.cf %D/etc/postfix/dist/main.cf; then rm -f %D/etc/postfix/main.cf; fi
- at unexec if cmp -s %D/etc/postfix/master.cf %D/etc/postfix/dist/master.cf; then rm -f %D/etc/postfix/master.cf; fi
- at unexec if cmp -s %D/etc/postfix/access %D/etc/postfix/dist/access; then rm -f %D/etc/postfix/access; fi
- at unexec if cmp -s %D/etc/postfix/aliases %D/etc/postfix/dist/aliases; then rm -f %D/etc/postfix/aliases; fi
- at unexec if cmp -s %D/etc/postfix/canonical %D/etc/postfix/dist/canonical; then rm -f %D/etc/postfix/canonical; fi
- at unexec if cmp -s %D/etc/postfix/header_checks %D/etc/postfix/dist/header_checks; then rm -f %D/etc/postfix/header_checks; fi
- at unexec if cmp -s %D/etc/postfix/relocated %D/etc/postfix/dist/relocated; then rm -f %D/etc/postfix/relocated; fi
- at unexec if cmp -s %D/etc/postfix/transport %D/etc/postfix/dist/transport; then rm -f %D/etc/postfix/transport; fi
- at unexec if cmp -s %D/etc/postfix/virtual %D/etc/postfix/dist/virtual; then rm -f %D/etc/postfix/virtual; fi
- at unexec if cmp -s %D/etc/postfix/generic %D/etc/postfix/dist/generic; then rm -f %D/etc/postfix/generic; fi
-etc/postfix/LICENSE
-etc/postfix/TLS_LICENSE
-etc/postfix/bounce.cf.default
-etc/postfix/main.cf.default
-etc/postfix/makedefs.out
-etc/postfix/dist/main.cf
-etc/postfix/dist/master.cf
-etc/postfix/dist/access
-etc/postfix/dist/aliases
-etc/postfix/dist/canonical
-etc/postfix/dist/header_checks
-etc/postfix/dist/relocated
-etc/postfix/dist/transport
-etc/postfix/dist/virtual
-etc/postfix/dist/generic
+ at unexec if cmp -s %D/libexec/postfix/main.cf %%PFETC%%/main.cf; then rm -f %%PFETC%%/main.cf; fi
+ at unexec if cmp -s %D/libexec/postfix/master.cf %%PFETC%%/master.cf; then rm -f %%PFETC%%/master.cf; fi
 libexec/postfix/anvil
 libexec/postfix/bounce
 libexec/postfix/cleanup
@@ -57,6 +34,15 @@
 libexec/postfix/verify
 libexec/postfix/virtual
 libexec/postfix/tlsmgr
+ at dirrm libexec/postfix
+bin/mailq
+bin/newaliases
+bin/qshape
+bin/rmail
+%%TEST%%bin/qmqp-sink
+%%TEST%%bin/qmqp-source
+%%TEST%%bin/smtp-sink
+%%TEST%%bin/smtp-source
 sbin/postalias
 sbin/postcat
 sbin/postconf
@@ -70,14 +56,6 @@
 sbin/postqueue
 sbin/postsuper
 sbin/sendmail
-%%SUB_TEST%%bin/qmqp-sink
-%%SUB_TEST%%bin/qmqp-source
-%%SUB_TEST%%bin/smtp-sink
-%%SUB_TEST%%bin/smtp-source
-bin/rmail
-bin/qshape
-bin/newaliases
-bin/mailq
 %%PORTDOCS%%%%DOCSDIR%%/AAAREADME
 %%PORTDOCS%%%%DOCSDIR%%/ADDRESS_CLASS_README
 %%PORTDOCS%%%%DOCSDIR%%/ADDRESS_CLASS_README.html
@@ -154,6 +132,7 @@
 %%PORTDOCS%%%%DOCSDIR%%/SMTPD_POLICY_README.html
 %%PORTDOCS%%%%DOCSDIR%%/SMTPD_PROXY_README
 %%PORTDOCS%%%%DOCSDIR%%/SMTPD_PROXY_README.html
+%%PORTDOCS%%%%DOCSDIR%%/SOHO_README
 %%PORTDOCS%%%%DOCSDIR%%/SOHO_README.html
 %%PORTDOCS%%%%DOCSDIR%%/STANDARD_CONFIGURATION_README
 %%PORTDOCS%%%%DOCSDIR%%/STANDARD_CONFIGURATION_README.html
@@ -248,6 +227,10 @@
 %%PORTDOCS%%%%DOCSDIR%%/tlsmgr.8.html
 %%PORTDOCS%%%%DOCSDIR%%/generic.5.html
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
- at dirrm libexec/postfix
- at dirrm etc/postfix/dist
+%%BASE%%@cwd /
+etc/postfix/LICENSE
+etc/postfix/TLS_LICENSE
+etc/postfix/bounce.cf.default
+etc/postfix/main.cf.default
+etc/postfix/makedefs.out
 @dirrmtry etc/postfix
Index: postfix-current/Makefile
===================================================================
--- postfix-current/Makefile	(revision 1)
+++ postfix-current/Makefile	(working copy)
@@ -1,12 +1,12 @@
 # New ports collection makefile for:	postfix-current
-# Date created: 	18 Mar 1999
-# Whom:			torstenb
+# Date created:				18 Mar 1999
+# Whom:					torstenb
 #
 # $FreeBSD: ports/mail/postfix-current/Makefile,v 1.244 2010/04/13 13:19:42 mnag Exp $
 #
 
 PORTNAME=	postfix
-DISTVERSION=	2.8-20100323
+DISTVERSION=	2.8-20100603
 PORTEPOCH=	4
 CATEGORIES=	mail ipv6
 MASTER_SITES=	ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/ \
@@ -27,24 +27,37 @@
 MAKE_JOBS_SAFE=	yes
 USE_SUBMAKE=	yes
 USE_PERL5_BUILD=yes
-USE_RC_SUBR=	postfix.sh
+SCRIPTS_ENV+=	POSTFIX_DEFAULT_MTA="${POSTFIX_DEFAULT_MTA}"
 
-OPTIONSFILE=	${PORT_DBDIR}/${PORTNAME}${PKGNAMESUFFIX}/options
-OPTIONS=	PCRE		"Perl Compatible Regular Expressions" 			on \
-		SASL2		"Cyrus SASLv2 (Simple Auth. and Sec. Layer)"		off \
+# back compat pull in settings from POSTFIX_OPTIONS for convenience when
+# make config is run (happens first time port is built, too)
+.for o in SASL2 SASLKRB5 SASLKRB5MIT TLS BDB MySQL PgSQL OpenLDAP CDB NIS VDA Test
+STATUS_${o}=off
+.endfor
+.if defined(POSTFIX_OPTIONS)
+. for o in ${POSTFIX_OPTIONS}
+STATUS_${o}=on
+. endfor
+.endif
+
+OPTIONS=	PCRE		"Perl Compatible Regular Expressions"			on \
+		SASL2		"Cyrus SASLv2 (Simple Auth. and Sec. Layer)"		${STATUS_SASL2} \
 		DOVECOT		"Dovecot SASL authentication method"			off \
-		SASLKRB		"If your SASL req. Kerberos select this option"		off \
-		SASLKRB5	"If your SASL req. Kerberos5 select this option"	off \
-		SASLKMIT	"If your SASL req. MIT Kerberos5 select this option"	off \
-		TLS		"Enable SSL and TLS support"				off \
-		BDB		"Berkeley DB (choose version with WITH_BDB_VER)"	off \
-		MYSQL		"MySQL maps (choose version with WITH_MYSQL_VER)"	off \
-		PGSQL		"PostgreSQL maps (choose with DEFAULT_PGSQL_VER)"	off \
-		OPENLDAP	"OpenLDAP maps (choose ver. with WITH_OPENLDAP_VER)"	off \
-		CDB		"CDB maps lookups"					off \
-		NIS		"NIS maps lookups"					off \
-		TEST		"SMTP/LMTP test server and generator"			off
+		SASLKRB5	"If your SASL req. Kerberos5 select this option"	${STATUS_SASLKRB5} \
+		SASLKMIT	"If your SASL req. MIT Kerberos5 select this option"	${STATUS_SASLKRB5MIT} \
+		TLS		"Enable SSL and TLS support"				${STATUS_TLS} \
+		BDB		"Berkeley DB (choose version with WITH_BDB_VER)"	${STATUS_BDB} \
+		MYSQL		"MySQL maps (choose version with WITH_MYSQL_VER)"	${STATUS_MySQL} \
+		PGSQL		"PostgreSQL maps (choose with DEFAULT_PGSQL_VER)"	${STATUS_PgSQL} \
+		OPENLDAP	"OpenLDAP maps (choose ver. with WITH_OPENLDAP_VER)"	${STATUS_OpenLDAP} \
+		CDB		"CDB maps lookups"					${STATUS_CDB} \
+		NIS		"NIS maps lookups"					${STATUS_NIS} \
+		VDA		"VDA (Virtual Delivery Agent 32Bit)"			${STATUS_VDA} \
+		TEST		"SMTP/LMTP test server and generator"			${STATUS_Test} \
+		INST_BASE	"Install into /usr and /etc/postfix"			off
 
+.include <bsd.port.options.mk>
+
 MAN1=	postalias.1 postcat.1 postconf.1 postdrop.1 postfix.1 postkick.1 \
 	postlock.1 postlog.1 postmap.1 postmulti.1 postqueue.1 postsuper.1 \
 	sendmail.1 qshape.1
@@ -65,21 +78,33 @@
 	bounce.8 trace.8 \
 	smtp.8 lmtp.8
 
-CONF1=	access aliases canonical generic header_checks main.cf master.cf \
-	relocated transport virtual
+HTML1=	SOHO_README.html body_checks.5.html bounce.5.html postfix-power.png \
+	scache.8.html tlsmgr.8.html
 
+.if ${OSVERSION} >= 800037
+KRB5_EXTR=	-lhx509
+.endif
+
 .if !defined(DEBUG)
 MAKEFILEFLAGS+=	DEBUG=
 .endif
 
 MAKEFILEFLAGS+=	CC="${CC}" OPT="${CFLAGS}"
 
-SCRIPTS_ENV=	WRKDIRPREFIX="${WRKDIRPREFIX}" \
-		TOUCH="${TOUCH}" \
-		MKDIR="${MKDIR}"
+POSTFIX_CCARGS+=	-DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \
+			-DDEF_DAEMON_DIR=\\\"${DAEMONDIR}\\\" \
+			-DDEF_COMMAND_DIR=\\\"${PREFIX}/sbin\\\" \
+			-DDEF_SENDMAIL_PATH=\\\"${PREFIX}/sbin/sendmail\\\" \
+			-DDEF_NEWALIAS_PATH=\\\"${PREFIX}/bin/newaliases\\\" \
+			-DDEF_MAILQ_PATH=\\\"${PREFIX}/bin/mailq\\\" \
+			-DDEF_MANPAGE_DIR=\\\"${MANPREFIX}/man\\\" \
+			-DDEF_README_DIR=\\\"${READMEDIR}\\\" \
+			-DDEF_HTML_DIR=\\\"${READMEDIR}\\\" \
+			-DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\" \
+			-DDEF_DATA_DIR=\\\"/var/db/postfix\\\" \
+			-DDEF_MAIL_OWNER=\\\"postfix\\\" \
+			-DDEF_SGID_GROUP=\\\"maildrop\\\" \
 
-.include <bsd.port.pre.mk>
-
 # Default requirement for postfix rc script
 _REQUIRE=	LOGIN cleanvar
 
@@ -100,27 +125,18 @@
 .if defined(WITH_DOVECOT)
 RUN_DEPENDS+=		dovecot:${PORTSDIR}/mail/dovecot
 POSTFIX_CCARGS+=	-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"
+_REQUIRE+=		dovecot
 .endif
 
-.if defined(WITH_SASLKRB)
-.if defined(WITH_SASLKRB5) || defined(WITH_SASLKMIT)
-BROKEN=			Select only one SASL Kerberos option
-.endif
-POSTFIX_AUXLIBS+=	-lkrb -lcrypto -lcom_err
-.endif
-
 .if defined(WITH_SASLKRB5)
-.if defined(WITH_SASLKRB) || defined(WITH_SASLKMIT)
+.if defined(WITH_SASLKMIT)
 BROKEN=			Select only one SASL Kerberos option
 .endif
-.if ${OSVERSION} >= 800037
-KRB5_EXTR=		-lhx509
-.endif
 POSTFIX_AUXLIBS+=	-lkrb5 ${KRB5_EXTR} -lcrypto -lcrypt -lcom_err -lasn1 -lroken
 .endif
 
 .if defined(WITH_SASLKMIT)
-.if defined(WITH_SASLKRB) || defined(WITH_SASLKRB5)
+.if defined(WITH_SASLKRB5)
 BROKEN=			Select only one SASL Kerberos option
 .endif
 LIB_DEPENDS+=		krb5.3:${PORTSDIR}/security/krb5
@@ -174,24 +190,76 @@
 _REQUIRE+=		ypserv
 .endif
 
+# 32Bit VDA patch (64Bit has different patch)
+.if defined(WITH_VDA)
+BROKEN=		At the moment there is no VDA patch for ${PORTNAME}-${DISTVERSION} aviable
+.endif
+
 .if defined(WITH_TEST)
 BINTEST=	qmqp-sink qmqp-source smtp-sink smtp-source
 MANTEST=	qmqp-sink.1 qmqp-source.1 smtp-sink.1 smtp-source.1
 MAN1+=		${MANTEST}
-PLIST_SUB+=	SUB_TEST=""
+PLIST_SUB+=	TEST=""
 .else
-PLIST_SUB+=	SUB_TEST="@comment "
+PLIST_SUB+=	TEST="@comment "
 .endif
 
+.if defined(WITH_INST_BASE)
+PKGNAMESUFFIX=	-base
+PREFIX=		/usr
+ETCDIR=		/etc/postfix
+USE_RCORDER=	postfix.sh
+PLIST_SUB+=	BASE=""
+.else
+USE_RC_SUBR=	postfix.sh
+PLIST_SUB+=	BASE="@comment "
+.endif
+
+PLIST_SUB+=	PFETC=${ETCDIR}
+
 .if defined(NOPORTDOCS)
-READMEDIR=no
+READMEDIR=	no
 .else
-READMEDIR=${PREFIX}/share/doc/postfix
+READMEDIR=	${DOCSDIR}
 .endif
 
-SUB_LIST+=	REQUIRE="${_REQUIRE}"
+DAEMONDIR=	${PREFIX}/libexec/postfix
 
+SUB_LIST+=	REQUIRE="${_REQUIRE}" READMEDIR="${READMEDIR}" DAEMONDIR="${DAEMONDIR}"
+SUB_FILES+=	pkg-install pkg-message
+
+# sed script for files in ${WRKSRC}/README_FILES ${WRKSRC}/conf ${WRKSRC}/man
+REINPLACE=	s!^PATH=.*!PATH=/bin:/sbin:/usr/bin:/usr/sbin:${PREFIX}/bin:${PREFIX}/sbin!;\
+		s!(_directory = )/usr/!\1${PREFIX}/!g;\
+		s!^(data_directory = /var/)lib/!\1db/!g;\
+		s!^\#(mynetworks_style = host)!\1!g;\
+		s!^(sendmail_path =)!\1 ${PREFIX}/sbin/sendmail!g;\
+		s!^(newaliases_path =)!\1 ${PREFIX}/bin/newaliases!g;\
+		s!^(mailq_path =)!\1 ${PREFIX}/bin/mailq!g;\
+		s!^(setgid_group =)!\1 maildrop!g;\
+		s!^(manpage_directory =)!\1 ${MANPREFIX}/man!g;\
+		s!^((html|readme)_directory =)!\1 ${READMEDIR}!g;\
+		\!^\#alias_database = dbm:/etc/mail/aliases$$!d;\
+		s!(:|= )/etc/postfix!\1$$config_directory!g;\
+		s!/etc/postfix!${ETCDIR}!g;\
+		s!^(sample_directory =)!\1 ${ETCDIR}!g;\
+		s!($config_directory/(access|aliases|canonical|generic|header_checks|relocated|transport|virtual):f:root:-:644:)p1!\1o!;
+
 pre-patch:
+.if defined(POSTFIX_OPTIONS)
+	@${ECHO_MSG}
+	@${ECHO_MSG}
+	@${ECHO_MSG}
+	@${ECHO_MSG} "***** ALERT *****"
+	@${ECHO_MSG} "POSTFIX_OPTIONS is no longer supported,"
+	@${ECHO_MSG} "${PORTNAME} uses options, consider running"
+	@${ECHO_MSG} "# make config"
+	@${ECHO_MSG}
+	@${ECHO_MSG}
+	@${ECHO_MSG}
+	@sleep 10
+.endif
+
 .if defined(WITH_SASL2) && !defined(WITH_MYSQL) && exists(${LOCALBASE}/lib/libsasl2.a)
 	@if /usr/bin/nm ${LOCALBASE}/lib/libsasl2.a | ${GREP} -wq "mysql_init"; then \
 		${ECHO_MSG}; \
@@ -204,20 +272,23 @@
 	fi
 .endif
 
-	@${ECHO} "<HTML><BODY>See <A HREF="header_checks.5.html">header_checks.5.html</A></BODY></HTML>" \
+	@${ECHO} '<HTML><BODY>See <A HREF="header_checks.5.html">header_checks.5.html</A></BODY></HTML>' \
 		> ${WRKSRC}/html/body_checks.5.html
-	@${FIND} -P ${WRKSRC}/man -type f | ${XARGS} \
-		${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g"
-	@${FIND} -P ${WRKSRC}/README_FILES -type f | ${XARGS} \
-		${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g"
-	@${FIND} -P ${WRKSRC}/conf -type f | ${XARGS} \
-		${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g"
+	@${REINPLACE_CMD} -E -e 's![[:<:]]perl[[:>:]]!${PERL}!' \
+		${WRKSRC}/src/bounce/Makefile.in
+	@${REINPLACE_CMD} -E -e 's!^(#define DEF_SGID_GROUP[^"]+)"postdrop"$$!\1"maildrop"!' \
+		${WRKSRC}/src/global/mail_params.h
+	@${FIND} -X ${WRKSRC}/README_FILES ${WRKSRC}/conf ${WRKSRC}/man \
+		-type f -a ! \( -name INSTALL -o -name aliases \) | ${XARGS} \
+		${REINPLACE_CMD} -E -e '${REINPLACE}'
 
 post-patch:
-# All files modified with ${FILESDIR}/patch-* to use !!PREFIX!! need REINPLACE. Put below.
-	@${REINPLACE_CMD} -e "s,!!PREFIX!!,${PREFIX},g" \
-		${WRKSRC}/conf/main.cf ${WRKSRC}/src/global/mail_params.h
-	@${REINPLACE_CMD} -e "s|perl|${PERL}|" ${WRKSRC}/src/bounce/Makefile.in
+	@${ECHO} '$$readme_directory/SOHO_README:f:root:-:644' \
+		>> ${WRKSRC}/conf/postfix-files
+.for f in ${HTML1}
+	@${ECHO} '$$html_directory/$f:f:root:-:644' \
+		>> ${WRKSRC}/conf/postfix-files
+.endfor
 
 do-configure:
 	(cd ${WRKSRC} && ${MAKE} -f Makefile.init makefiles ${MAKEFILEFLAGS} \
@@ -228,26 +299,13 @@
 	@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
 
 do-install:
-	cd ${WRKSRC}; ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp \
-		config_directory=${PREFIX}/etc/postfix \
-		data_directory=/var/db/postfix \
-		daemon_directory=${PREFIX}/libexec/postfix \
-		command_directory=${PREFIX}/sbin \
-		queue_directory=/var/spool/postfix \
-		sendmail_path=${PREFIX}/sbin/sendmail \
-		newaliases_path=${PREFIX}/bin/newaliases \
-		mailq_path=${PREFIX}/bin/mailq \
-		mail_owner=postfix \
-		setgid_group=maildrop \
-		manpage_directory=${MANPREFIX}/man \
-		sample_directory=${PREFIX}/etc/postfix \
+	@cd ${WRKSRC} && ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp \
+		daemon_directory=${DAEMONDIR} \
+		html_directory=${READMEDIR} \
 		readme_directory=${READMEDIR}
-
 	${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${PREFIX}/bin/rmail
-
 	${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl ${PREFIX}/bin/qshape
 	${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 ${MANPREFIX}/man/man1
-
 .for f in ${BINTEST}
 	${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${PREFIX}/bin
 .endfor
@@ -255,22 +313,10 @@
 	${INSTALL_MAN} ${WRKSRC}/man/man1/${f} ${MANPREFIX}/man/man1
 .endfor
 
-	@${MKDIR} ${PREFIX}/etc/postfix/dist
-.for f in ${CONF1}
-	${INSTALL_DATA} ${WRKSRC}/conf/${f} ${PREFIX}/etc/postfix/dist
-.endfor
-
-.if !defined(NOPORTDOCS)
-	${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} -m 555 ${DOCSDIR}
-	@cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.jpg *.png ${DOCSDIR} && \
-		${ECHO_MSG} "Installed HTML documentation in ${DOCSDIR}"
-.endif
-
 post-install:
 	@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-# Fix compressed man pages
-	@${REINPLACE_CMD} -E -e "s|(man[158]/.*.[158]):|\1.gz:|g" ${PREFIX}/libexec/postfix/postfix-files
-	@${RM} -f ${PREFIX}/libexec/postfix/postfix-files.bak
+	# Fix compressed man pages
+	@${REINPLACE_CMD} -i '' -E -e "s|(man[158]/.*.[158]):|\1.gz:|g" ${DAEMONDIR}/postfix-files
 	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
--- patch_mail_postfix-current.txt ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list