PSARC 2014/382 Postfix
authorJohn Beck <John.Beck@Oracle.COM>
Wed, 08 Apr 2015 15:00:03 -0700
changeset 4079 4aab0107366d
parent 4078 7cfcde36f97f
child 4080 8aac22d3e66a
PSARC 2014/382 Postfix 15313187 SUNBT6386192 Include Postfix in Solaris
components/postfix/Makefile
components/postfix/files/postfix.auth_attr
components/postfix/files/postfix.exec_attr
components/postfix/files/postfix.prof_attr
components/postfix/files/postfix.xml
components/postfix/files/start-method
components/postfix/patches/01-solaris-makedefs.patch
components/postfix/patches/02-solaris-db-type.patch
components/postfix/patches/03-smf-man-tweaks.patch
components/postfix/postfix.license
components/postfix/postfix.p5m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/postfix/Makefile	Wed Apr 08 15:00:03 2015 -0700
@@ -0,0 +1,89 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+#
+
+include ../../make-rules/shared-macros.mk
+
+COMPONENT_NAME=		postfix
+COMPONENT_VERSION=	2.11.3
+COMPONENT_PROJECT_URL=	http://www.postfix.org
+COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
+COMPONENT_ARCHIVE_HASH=	\
+    sha256:04e5146e6e56261baae9f63c590348a4b12ce22d3d46260e26e97233f40802c3
+COMPONENT_BUGDB=	utility/postfix
+COMPONENT_ARCHIVE_URL=	http://mirrors-usa.go-parts.com/$(COMPONENT_NAME)/source/official/$(COMPONENT_ARCHIVE)
+
+TPNO=			7492
+
+include ../../make-rules/prep.mk
+include ../../make-rules/justmake.mk
+include ../../make-rules/ips.mk
+
+# general
+CCARGS =	-DDEF_DAEMON_DIR=\\\"/usr/lib/postfix\\\"
+CCARGS +=	-DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\"
+CCARGS +=	-DDEF_NEWALIAS_PATH=\\\"/usr/sbin/newaliases\\\"
+# TLS
+CCARGS +=	-DUSE_TLS
+AUXLIBS =	-lssl -lcrypto
+# Berkeley DB
+CCARGS +=	-DHAS_DB
+AUXLIBS +=	-ldb-5.3
+# SQLite
+CCARGS +=	-DHAS_SQLITE
+AUXLIBS +=	-lsqlite3
+# LDAP
+CCARGS +=	-DHAS_LDAP
+AUXLIBS +=	-lldap
+
+# pcre-config is run as part of the setup, so we need to find the 64-bit
+# version so it will provide a 64-bit runpath, o/w pkglint gives warnings.
+PATH =		/usr/bin/$(MACH64):/usr/bin:/usr/gnu/bin
+
+COMPONENT_BUILD_ENV += CC="$(CC) -m64"
+COMPONENT_BUILD_ENV += CCARGS="$(CCARGS)"
+COMPONENT_BUILD_ENV += PATH="$(PATH)"
+COMPONENT_BUILD_ENV += AUXLIBS="$(AUXLIBS)"
+
+COMPONENT_INSTALL_TARGETS = non-interactive-package install_root="$(PROTO_DIR)"
+
+ASLR_MODE = $(ASLR_ENABLE)
+
+build:          $(BUILD_64)
+
+install:        $(INSTALL_64)
+
+test:           $(NO_TESTS)
+
+PKG_PROTO_DIRS +=	$(COMPONENT_DIR)/files
+
+REQUIRED_PACKAGES += database/berkeleydb-5
+REQUIRED_PACKAGES += database/sqlite-3
+REQUIRED_PACKAGES += library/pcre
+REQUIRED_PACKAGES += library/security/openssl
+REQUIRED_PACKAGES += shell/ksh93
+REQUIRED_PACKAGES += system/core-os
+REQUIRED_PACKAGES += system/library
+REQUIRED_PACKAGES += system/network
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/postfix/files/postfix.auth_attr	Wed Apr 08 15:00:03 2015 -0700
@@ -0,0 +1,1 @@
+solaris.smf.manage.postfix:RO::Manage Postfix Service States::
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/postfix/files/postfix.exec_attr	Wed Apr 08 15:00:03 2015 -0700
@@ -0,0 +1,12 @@
+Postfix:solaris:cmd:RO::/usr/sbin/postalias:uid=postfix;gid=postfix
+Postfix:solaris:cmd:RO::/usr/sbin/postcat:uid=postfix;gid=postfix
+Postfix:solaris:cmd:RO::/usr/sbin/postconf:uid=postfix;gid=postfix
+Postfix:solaris:cmd:RO::/usr/sbin/postdrop:uid=postfix;gid=postdrop
+Postfix:solaris:cmd:RO::/usr/sbin/postfix:uid=postfix;gid=postfix
+Postfix:solaris:cmd:RO::/usr/sbin/postkick:uid=postfix;gid=postfix
+Postfix:solaris:cmd:RO::/usr/sbin/postlock:uid=postfix;gid=postfix
+Postfix:solaris:cmd:RO::/usr/sbin/postlog:uid=postfix;gid=postfix
+Postfix:solaris:cmd:RO::/usr/sbin/postmap:uid=postfix;gid=postfix
+Postfix:solaris:cmd:RO::/usr/sbin/postmulti:uid=postfix;gid=postfix
+Postfix:solaris:cmd:RO::/usr/sbin/postqueue:uid=postfix;gid=postdrop
+Postfix:solaris:cmd:RO::/usr/sbin/postsuper:uid=postfix;gid=postfix
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/postfix/files/postfix.prof_attr	Wed Apr 08 15:00:03 2015 -0700
@@ -0,0 +1,3 @@
+Postfix:RO::\
+Manage Postfix:\
+auths=solaris.smf.manage.postfix
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/postfix/files/postfix.xml	Wed Apr 08 15:00:03 2015 -0700
@@ -0,0 +1,183 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+   
+    Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
+
+    NOTE:  This service manifest is not editable; its contents will
+    be overwritten by package or patch operations, including
+    operating system upgrade.  Make customizations in a different
+    file.
+-->
+
+<service_bundle type='manifest' name='service/network/smtp/postfix:postfix'>
+
+<service
+	name='network/smtp'
+	type='service'
+	version='1'>
+
+	<single_instance />
+
+	<dependency
+	    name='fs-local'
+	    grouping='require_all'
+	    restart_on='none'
+	    type='service'>
+		<service_fmri value='svc:/system/filesystem/local' />
+	</dependency>
+
+	<dependency
+	    name='network-service'
+	    grouping='require_all'
+	    restart_on='none'
+	    type='service'>
+		<service_fmri value='svc:/network/service' />
+	</dependency>
+
+	<dependency
+	    name='name-services'
+	    grouping='require_all'
+	    restart_on='refresh'
+	    type='service'>
+		<service_fmri value='svc:/milestone/name-services' />
+	</dependency>
+
+	<dependency
+	    name='identity'
+	    grouping='optional_all'
+	    restart_on='refresh'
+	    type='service'>
+		<service_fmri value='svc:/system/identity:domain' />
+	</dependency>
+
+	<dependency
+	    name='system-log'
+	    grouping='optional_all'
+	    restart_on='none'
+	    type='service'>
+		<service_fmri value='svc:/system/system-log' />
+	</dependency>
+
+	<property_group name='firewall_context' type='com.sun,fw_definition'>
+		<propval name='name' type='astring' value='smtp' />
+	</property_group>
+
+	<property_group name='firewall_config' type='com.sun,fw_configuration'>
+		<propval name='policy' type='astring' value='use_global' />
+		<propval name='apply_to' type='astring' value='' />
+		<propval name='exceptions' type='astring' value='' />
+		<propval name='value_authorization' type='astring'
+			value='solaris.smf.value.firewall.config' />
+	</property_group>
+
+	<instance name='postfix' enabled='false'>
+
+		<dependency
+		    name='config-file'
+		    grouping='require_all'
+		    restart_on='refresh'
+		    type='path'>
+			<service_fmri
+			    value='file://localhost/etc/postfix/main.cf' />
+		</dependency>
+
+		<dependency
+		    name='nsswitch'
+		    grouping='require_all'
+		    restart_on='refresh'
+		    type='path'>
+			<service_fmri
+			    value='file://localhost/etc/nsswitch.conf' />
+		</dependency>
+
+		<!--
+		If autofs is enabled, wait for it to get users' home
+		directories.
+		-->
+		<dependency
+		    name='autofs'
+		    grouping='optional_all'
+		    restart_on='none'
+		    type='service'>
+			<service_fmri value='svc:/system/filesystem/autofs' />
+		</dependency>
+
+		<dependent
+			name='smtp-postfix_multi-user'
+			grouping='optional_all'
+			restart_on='none'>
+				<service_fmri
+				    value='svc:/milestone/multi-user' />
+		</dependent>
+
+		<exec_method
+			type='method'
+			name='start'
+			exec='/lib/svc/method/postfix'
+			timeout_seconds='120'>
+			<method_context>
+			    <method_credential user='root' group='postfix'
+				privileges='basic,net_privaddr,proc_setid,file_dac_search'/>
+			</method_context>
+		</exec_method>
+
+		<exec_method
+			type='method'
+			name='stop'
+			exec='/usr/sbin/postfix stop'
+			timeout_seconds='60' />
+
+		<exec_method
+			type='method'
+			name='refresh'
+			exec='/usr/sbin/postfix reload'
+			timeout_seconds='60' />
+
+		<property_group name='startd' type='framework'>
+			<propval name='ignore_error' type='astring'
+			    value='core,signal' />
+		</property_group>
+
+		<property_group name='general' type='framework'>
+			<propval name='action_authorization' type='astring'
+				value='solaris.smf.manage.postfix' />
+		</property_group>
+
+		<property_group name='config' type='application'>
+			<propval name='automatic' type='boolean' value='true' />
+		</property_group>
+
+		<template>
+			<common_name>
+				<loctext xml:lang='C'>
+				postfix SMTP mail transfer agent
+				</loctext>
+			</common_name>
+			<documentation>
+				<manpage title='postfix' section='1'
+				    manpath='/usr/share/man' />
+			</documentation>
+			<pg_pattern name='config' type='application'>
+				<description>
+					<loctext xml:lang='C'>
+						Configuration properties
+					</loctext>
+				</description>
+				<prop_pattern name='value_authorization' type='astring'>
+					<description>
+						<loctext xml:lang='C'>
+Declares authorization needed to change values in the config property group.
+						</loctext>
+					</description>
+				</prop_pattern>
+			</pg_pattern>
+		</template>
+
+	</instance>
+
+	<stability value='Unstable' />
+
+</service>
+
+</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/postfix/files/start-method	Wed Apr 08 15:00:03 2015 -0700
@@ -0,0 +1,107 @@
+#!/usr/sbin/sh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 1991, 2015, Oracle and/or its affiliates. All rights reserved.
+
+. /lib/svc/share/smf_include.sh
+
+SWITCH_FMRI=svc:/system/name-service/switch:default
+
+tweak_aliases()
+{
+	aliasprop=$(/usr/bin/svcprop -p config/aliases $SWITCH_FMRI 2>/dev/null)
+
+	# Check the alias configuration. Per
+	# http://www.postfix.org/postconf.5.html
+	#    On systems with NIS, the default is to search the local alias
+	#    database, then the NIS alias database. 
+	# All Solaris systems ship "with NIS", but unless NIS is configured for
+	# aliases, this will cause problems, so check and tweak the default if
+	# NIS is not configured.
+	alias_maps=$(/usr/sbin/postconf -h alias_maps)
+	if [[ $alias_maps == "hash:/etc/mail/aliases, nis:mail.aliases" ]]; then
+		# We have the default Postfix setting.
+		if [[ "$aliasprop" == "${aliasprop%nis}" ]]; then
+			# NIS is not configured, so change the Postfix setting.
+			alias_maps="hash:/etc/mail/aliases"
+			/usr/sbin/postconf alias_maps=$alias_maps
+		fi
+	fi
+
+	# Check for LDAP: if configured via the switch, then (if needed)
+	# create $LDAP_ALIASES and configure in alias_maps.
+	LDAP_ALIASES=/etc/postfix/ldap-aliases.cf
+	if [[ $aliasprop != ${aliasprop%ldap} ]]; then
+		# LDAP is configured for aliases.
+		if [[ ! -f $LDAP_ALIASES ]]; then
+			# $LDAP_ALIASES does not exist yet, so create it.
+			servers=$(/usr/sbin/ldapclient list | \
+			    grep NS_LDAP_SERVERS | \
+			    sed -e 's/^.*=//' -e 's/,//g')
+        		basedn=$(/usr/sbin/ldapclient list | \
+			    grep NS_LDAP_SEARCH_BASEDN | sed -e 's/^.*= //')
+			echo "server_host = $servers" > $LDAP_ALIASES
+			echo "search_base = $basedn" >> $LDAP_ALIASES
+			echo "query_filter = mail=%s" >> $LDAP_ALIASES
+			echo "result_attribute = mgrpRFC822MailMember" >> \
+			    $LDAP_ALIASES
+
+		fi
+		if [[ "$alias_maps" == "${alias_maps%ldap:}" ]]; then
+			# No "ldap:" entry yet in alias_maps, so add one.
+			/usr/sbin/postconf \
+			    alias_maps="$alias_maps, ldap:$LDAP_ALIASES"
+		fi
+	fi
+}
+
+# First, make sure we have a valid domain name.
+myhostname=$(/usr/bin/hostname)
+case $myhostname in
+*.*)
+	# Fully qualified: we're set.
+	;;
+*)
+	# Unqualified; fall back to postconf.
+	mydomain=$(/usr/sbin/postconf -h mydomain)
+	case $mydomain in
+	*.*)
+		# Fully qualified: we're set.
+		;;
+	localdomain)
+		echo "Domain name cannot be determined."
+		echo "Either set hostname to a fully-qualified value,"
+		echo "or run '/usr/sbin/postconf mydomain=YOUR.DOMAIN'."
+		exit $SMF_EXIT_ERR_CONFIG
+		;;
+	esac
+esac
+
+# Second, tweak aliases for NIS and LDAP as needed.
+auto=`/usr/bin/svcprop -c -p config/automatic $SMF_FMRI 2>/dev/null`
+if [[ $auto == true ]]; then
+	tweak_aliases
+fi
+
+# Finally, start the daemon.
+/usr/sbin/postfix start
+
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/postfix/patches/01-solaris-makedefs.patch	Wed Apr 08 15:00:03 2015 -0700
@@ -0,0 +1,20 @@
+Upstream contribution is planned but has not yet occurred.
+
+--- postfix-2.11.1/makedefs.orig	2014-01-16 11:49:11.000000000 -0800
++++ postfix-2.11.1/makedefs	2014-09-19 13:43:56.091926293 -0700
+@@ -217,9 +217,13 @@
+ 		case $RELEASE in
+ 		    5.[0-8]|5.[0-8].*) CCARGS="$CCARGS -DNO_CLOSEFROM -DNO_DEV_URANDOM -DNO_FUTIMESAT -DSTREAM_CONNECTIONS";;
+ 		esac
+-		# Somewhere NISPLUS went away.
++		# NISPLUS went away in Solaris 11.
+ 		case $RELEASE in
+-		    5.[0-9][0-9]*) CCARGS="$CCARGS -DNO_NISPLUS";;
++		    5.1[1-9]*) CCARGS="$CCARGS -DNO_NISPLUS";;
++		esac
++		# libsocket & libnsl were merged into libc in Solaris 12.
++		case $RELEASE in
++		    5.1[2-9]*) SYSLIBS="-lresolv -ldl"
+ 		esac
+ 		# Work around broken str*casecmp(). Do it all here instead
+ 		# of having half the solution in the sys_defs.h file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/postfix/patches/02-solaris-db-type.patch	Wed Apr 08 15:00:03 2015 -0700
@@ -0,0 +1,15 @@
+This patch originated in-house, to update the Solaris native DB type for
+aliases from "dbm" (which was correct for 2.6 and earlier) to "hash" (which
+has we have used since Solaris 7).  Upstream contribution is planned.
+
+--- postfix-2.11.3/src/util/sys_defs.h.orig	2013-09-29 13:51:55.000000000 -0700
++++ postfix-2.11.3/src/util/sys_defs.h	2015-04-06 15:29:51.826173244 -0700
+@@ -429,7 +429,7 @@
+ #define DEF_MAILBOX_LOCK "fcntl, dotlock"
+ #define HAS_FSYNC
+ #define HAS_DBM
+-#define NATIVE_DB_TYPE	"dbm"
++#define NATIVE_DB_TYPE	"hash"
+ #define ALIAS_DB_MAP	DEF_DB_TYPE ":/etc/mail/aliases"
+ #ifndef NO_NIS
+ #define HAS_NIS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/postfix/patches/03-smf-man-tweaks.patch	Wed Apr 08 15:00:03 2015 -0700
@@ -0,0 +1,37 @@
+--- postfix-2.11.3/man/man1/postfix.1.orig	2013-11-21 17:40:50.000000000 -0800
++++ postfix-2.11.3/man/man1/postfix.1	2015-04-08 14:41:28.034168740 -0700
+@@ -101,6 +101,34 @@
+ .IP \fB-v\fR
+ Enable verbose logging for debugging purposes. Multiple \fB-v\fR
+ options make the software increasingly verbose.
++.SS "Service Management"
++.sp
++.LP
++The \fBpostfix\fR service is managed by the service management facility,
++\fBsmf\fR(5), under the service identifier:
++.sp
++.in +2
++.nf
++svc:/network/smtp:postfix
++.fi
++.in -2
++.sp
++.LP
++Administrative actions on this service, such as enabling, disabling, or
++requesting restart, can be performed using \fBsvcadm\fR(1M). The service's
++status can be queried using the \fBsvcs\fR(1) command.
++.sp
++Postfix uses NIS but not LDAP in its default set of methods for aliases.
++If the service property \fIconfig/automatic\fR is set to \fItrue\fR (which
++is the default value), then upon service start, the \fIconfig/aliases\fR
++property of the \fIsvc:/system/name-service/switch:default\fR service will
++be consulted, and \fINIS\fR will be disabled if needed to match the value
++of that property; likewise, \fILDAP\fR will be enabled if needed to match
++the property value.  Note for LDAP this will create
++\fB/etc/postfix/ldap-aliases.cf\fR with
++\fIresult_attribute = mgrpRFC822MailMember\fR.  Adjust as needed to match
++your local schema.
++.sp
+ .SH "ENVIRONMENT"
+ .na
+ .nf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/postfix/postfix.license	Wed Apr 08 15:00:03 2015 -0700
@@ -0,0 +1,225 @@
+IBM Public License 1.0
+
+ftp://ftp.porcupine.org/mirrors/postfix-release/LICENSE
+                                                                       
+IBM PUBLIC LICENSE VERSION 1.0 - SECURE MAILER
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS IBM PUBLIC
+LICENSE ("AGREEMENT").  ANY USE, REPRODUCTION OR DISTRIBUTION OF THE
+PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1.  DEFINITIONS
+
+"Contribution" means:  
+    a) in the case of International Business Machines Corporation ("IBM"), 
+       the Original Program, and 
+    b) in the case of each Contributor, 
+       i)  changes to the Program, and
+       ii) additions to the Program;
+           where such changes and/or additions to the Program originate
+           from and are distributed by that particular Contributor.  
+           A Contribution 'originates' from a Contributor if it was added 
+           to the Program by such Contributor itself or anyone acting on 
+           such Contributor's behalf.  
+    Contributions do not include additions to the Program which:
+       (i)  are separate modules of software distributed in conjunction 
+            with the Program under their own license agreement, and 
+       (ii) are not derivative works of the Program.
+
+"Contributor" means IBM and any other entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+"Original Program" means the original version of the software accompanying
+this Agreement as released by IBM, including source code, object code
+and documentation, if any.
+
+"Program" means the Original Program and Contributions.
+
+"Recipient" means anyone who receives the Program under this Agreement, 
+including all Contributors.
+
+2.  GRANT OF RIGHTS
+
+    a) Subject to the terms of this Agreement, each Contributor hereby
+    grants Recipient a non-exclusive, worldwide, royalty-free copyright
+    license to reproduce, prepare derivative works of, publicly display,
+    publicly perform, distribute and sublicense the Contribution of such
+    Contributor, if any, and such derivative works, in source code and
+    object code form.
+
+    b) Subject to the terms of this Agreement, each Contributor hereby
+    grants Recipient a non-exclusive, worldwide, royalty-free patent
+    license under Licensed Patents to make, use, sell, offer to sell,
+    import and otherwise transfer the Contribution of such Contributor,
+    if any, in source code and object code form.  This patent license
+    shall apply to the combination of the Contribution and the Program
+    if, at the time the Contribution is added by the Contributor, such
+    addition of the Contribution causes such combination to be covered
+    by the Licensed Patents.  The patent license shall not apply to any
+    other combinations which include the Contribution.  No hardware per
+    se is licensed hereunder.
+
+    c) Recipient understands that although each Contributor grants the
+    licenses to its Contributions set forth herein, no assurances are
+    provided by any Contributor that the Program does not infringe the
+    patent or other intellectual property rights of any other entity.
+    Each Contributor disclaims any liability to Recipient for claims
+    brought by any other entity based on infringement of intellectual
+    property rights or otherwise.  As a condition to exercising the rights
+    and licenses granted hereunder, each Recipient hereby assumes sole
+    responsibility to secure any other intellectual property rights
+    needed, if any.  For example, if a third party patent license
+    is required to allow Recipient to distribute the Program, it is
+    Recipient's responsibility to acquire that license before distributing
+    the Program.
+
+    d) Each Contributor represents that to its knowledge it has sufficient
+    copyright rights in its Contribution, if any, to grant the copyright
+    license set forth in this Agreement.
+
+3.  REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form 
+under its own license agreement, provided that:
+    a) it complies with the terms and conditions of this Agreement; and
+    b) its license agreement:
+       i)   effectively disclaims on behalf of all Contributors all
+            warranties and conditions, express and implied, including
+            warranties or conditions of title and non-infringement, and
+            implied warranties or conditions of merchantability and fitness
+            for a particular purpose;
+       ii)  effectively excludes on behalf of all Contributors all 
+            liability for damages, including direct, indirect, special, 
+            incidental and consequential damages, such as lost profits; 
+       iii) states that any provisions which differ from this Agreement 
+            are offered by that Contributor alone and not by any other 
+            party; and
+       iv)  states that source code for the Program is available from 
+            such Contributor, and informs licensees how to obtain it in a 
+            reasonable manner on or through a medium customarily used for 
+            software exchange. 
+
+When the Program is made available in source code form:
+    a) it must be made available under this Agreement; and 
+    b) a copy of this Agreement must be included with each copy of the 
+       Program.  
+
+Each Contributor must include the following in a conspicuous location 
+in the Program: 
+
+    Copyright (c) 1997,1998,1999, International Business Machines
+    Corporation and others. All Rights Reserved.
+
+In addition, each Contributor must identify itself as the originator of
+its Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution. 
+
+4.  COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like.  While this
+license is intended to facilitate the commercial use of the Program, the
+Contributor who includes the Program in a commercial product offering
+should do so in a manner which does not create potential liability for
+other Contributors.   Therefore, if a Contributor includes the Program in
+a commercial product offering, such Contributor ("Commercial Contributor")
+hereby agrees to defend and indemnify every other Contributor
+("Indemnified Contributor") against any losses, damages and costs
+(collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor
+in connection with its distribution of the Program in a commercial
+product offering.  The obligations in this section do not apply to any
+claims or Losses relating to any actual or alleged intellectual property
+infringement.  In order to qualify, an Indemnified Contributor must:
+    a) promptly notify the Commercial Contributor in writing of such claim,
+and 
+    b) allow the Commercial Contributor to control, and cooperate with
+       the Commercial Contributor in, the defense and any related 
+       settlement negotiations.  The Indemnified Contributor may 
+       participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X.  That Contributor is then a Commercial
+Contributor.  If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone.  Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those performance
+claims and warranties, and if a court requires any other Contributor to
+pay any damages as a result, the Commercial Contributor must pay those
+damages.
+
+5.  NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED
+ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
+EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
+CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
+PARTICULAR PURPOSE. Each Recipient is solely responsible for determining
+the appropriateness of using and distributing the Program and assumes
+all risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. 
+
+6.  DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
+ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION
+OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7.  GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with
+respect to a patent applicable to software (including a cross-claim or
+counterclaim in a lawsuit), then any patent licenses granted by that
+Contributor to such Recipient under this Agreement shall terminate
+as of the date such litigation is filed.  In addition, If Recipient
+institutes patent litigation against any entity (including a cross-claim
+or counterclaim in a lawsuit) alleging that the Program itself (excluding
+combinations of the Program with other software or hardware) infringes
+such Recipient's patent(s), then such Recipient's rights granted under
+Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails
+to comply with any of the material terms or conditions of this Agreement
+and does not cure such failure in a reasonable period of time after
+becoming aware of such noncompliance.  If all Recipient's rights under
+this Agreement terminate, Recipient agrees to cease use and distribution
+of the Program as soon as reasonably practicable.  However, Recipient's
+obligations under this Agreement and any licenses granted by Recipient
+relating to the Program shall continue and survive. 
+
+IBM may publish new versions (including revisions) of this Agreement
+from time to time.  Each new version of the Agreement will be given a
+distinguishing version number.  The Program (including Contributions)
+may always be distributed subject to the version of the Agreement under
+which it was received. In addition, after a new version of the Agreement
+is published, Contributor may elect to distribute the Program (including
+its Contributions) under the new version. No one other than IBM has the
+right to modify this Agreement.  Except as expressly stated in Sections
+2(a) and 2(b) above, Recipient receives no rights or licenses to the
+intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise.  All rights in the
+Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to
+this Agreement will bring a legal action under this Agreement more than
+one year after the cause of action arose.  Each party waives its rights
+to a jury trial in any resulting litigation. 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/postfix/postfix.p5m	Wed Apr 08 15:00:03 2015 -0700
@@ -0,0 +1,207 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+#
+
+<transform file path=usr.*/man/.+ -> default mangler.man.stability volatile>
+<transform file path=usr/lib/postfix/.+ -> default mode 0555>
+<transform dir path=var/spool/postfix/.+ -> default mode 0700>
+<transform dir path=var/spool/postfix/.+ -> default owner postfix>
+#
+set name=pkg.fmri \
+    value=pkg:/service/network/smtp/postfix@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value="Postfix mail system"
+set name=com.oracle.info.description \
+    value="mail server alternative to the widely-used Sendmail program; it attempts to be fast, easy to administer, and secure. The outside has a definite Sendmail-ish flavor, but the inside is completely different."
+set name=com.oracle.info.tpno value=7492
+set name=info.classification \
+    value="org.opensolaris.category.2008:Applications/System Utilities"
+set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
+set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
+set name=org.opensolaris.arc-caseid value=PSARC/2014/382
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+#
+file path=etc/postfix/LICENSE
+file path=etc/postfix/TLS_LICENSE
+file path=etc/postfix/access
+file path=etc/postfix/aliases
+file path=etc/postfix/bounce.cf.default
+file path=etc/postfix/canonical
+file path=etc/postfix/generic
+file path=etc/postfix/header_checks
+file path=etc/postfix/main.cf
+file path=etc/postfix/main.cf.default
+file path=etc/postfix/makedefs.out
+file path=etc/postfix/master.cf
+file path=etc/postfix/relocated
+file path=etc/postfix/transport
+file path=etc/postfix/virtual
+file postfix.auth_attr path=etc/security/auth_attr.d/postfix group=sys
+file postfix.exec_attr path=etc/security/exec_attr.d/postfix group=sys
+file postfix.prof_attr path=etc/security/prof_attr.d/postfix group=sys
+file postfix.xml path=lib/svc/manifest/network/postfix.xml
+file start-method path=lib/svc/method/postfix
+link path=usr/bin/mailq target=../../usr/lib/postfix/sendmail \
+    mediator=sendmail mediator-implementation=postfix
+dir  path=usr/lib/postfix
+file path=usr/lib/postfix/anvil
+file path=usr/lib/postfix/bounce
+file path=usr/lib/postfix/cleanup
+file path=usr/lib/postfix/discard
+file path=usr/lib/postfix/dnsblog
+file path=usr/lib/postfix/error
+file path=usr/lib/postfix/flush
+hardlink path=usr/lib/postfix/lmtp target=smtp
+file path=usr/lib/postfix/local
+file path=usr/lib/postfix/main.cf mode=0444
+file path=usr/lib/postfix/master
+file path=usr/lib/postfix/master.cf mode=0444
+file path=usr/lib/postfix/nqmgr
+file path=usr/lib/postfix/oqmgr
+file path=usr/lib/postfix/pickup
+file path=usr/lib/postfix/pipe
+file path=usr/lib/postfix/post-install
+file path=usr/lib/postfix/postfix-files
+file path=usr/lib/postfix/postfix-script
+file path=usr/lib/postfix/postfix-wrapper
+file path=usr/lib/postfix/postmulti-script
+file path=usr/lib/postfix/postscreen
+file path=usr/lib/postfix/proxymap
+hardlink path=usr/lib/postfix/qmgr target=nqmgr
+file path=usr/lib/postfix/qmqpd
+file path=usr/lib/postfix/scache
+file usr/lib/sendmail path=usr/lib/postfix/sendmail
+file path=usr/lib/postfix/showq
+file path=usr/lib/postfix/smtp
+file path=usr/lib/postfix/smtpd
+file path=usr/lib/postfix/spawn
+file path=usr/lib/postfix/tlsmgr
+file path=usr/lib/postfix/tlsproxy
+file path=usr/lib/postfix/trivial-rewrite
+file path=usr/lib/postfix/verify
+file path=usr/lib/postfix/virtual
+link path=usr/lib/sendmail target=postfix/sendmail mediator=sendmail \
+    mediator-implementation=postfix
+link path=usr/sbin/newaliases target=../../usr/lib/postfix/sendmail \
+    mediator=sendmail mediator-implementation=postfix
+file path=usr/sbin/postalias
+file path=usr/sbin/postcat
+file path=usr/sbin/postconf
+file path=usr/sbin/postdrop group=postdrop mode=02555
+file path=usr/sbin/postfix
+file path=usr/sbin/postkick
+file path=usr/sbin/postlock
+file path=usr/sbin/postlog
+file path=usr/sbin/postmap
+file path=usr/sbin/postmulti
+file path=usr/sbin/postqueue group=postdrop mode=02555
+file path=usr/sbin/postsuper
+link path=usr/share/man/man1/mailq.1 target=postfix-mailq.1 mediator=sendmail \
+    mediator-implementation=postfix
+file path=usr/share/man/man1/newaliases.1
+file path=usr/share/man/man1/postalias.1
+file path=usr/share/man/man1/postcat.1
+file path=usr/share/man/man1/postconf.1
+file path=usr/share/man/man1/postdrop.1
+file usr/share/man/man1/mailq.1 path=usr/share/man/man1/postfix-mailq.1
+file path=usr/share/man/man1/postfix.1
+file path=usr/share/man/man1/postkick.1
+file path=usr/share/man/man1/postlock.1
+file path=usr/share/man/man1/postlog.1
+file path=usr/share/man/man1/postmap.1
+file path=usr/share/man/man1/postmulti.1
+file path=usr/share/man/man1/postqueue.1
+file path=usr/share/man/man1/postsuper.1
+file path=usr/share/man/man1/sendmail.1
+file path=usr/share/man/man5/access.5
+file path=usr/share/man/man5/aliases.5
+file path=usr/share/man/man5/body_checks.5
+file path=usr/share/man/man5/bounce.5
+file path=usr/share/man/man5/canonical.5
+file path=usr/share/man/man5/cidr_table.5
+file path=usr/share/man/man5/generic.5
+file path=usr/share/man/man5/header_checks.5
+file path=usr/share/man/man5/ldap_table.5
+file path=usr/share/man/man5/master.5
+file path=usr/share/man/man5/memcache_table.5
+file path=usr/share/man/man5/pcre_table.5
+file path=usr/share/man/man5/postconf.5
+file path=usr/share/man/man5/postfix-wrapper.5
+file path=usr/share/man/man5/regexp_table.5
+file path=usr/share/man/man5/relocated.5
+file path=usr/share/man/man5/socketmap_table.5
+file path=usr/share/man/man5/sqlite_table.5
+file path=usr/share/man/man5/tcp_table.5
+file path=usr/share/man/man5/transport.5
+file path=usr/share/man/man5/virtual.5
+file path=usr/share/man/man8/anvil.8
+file path=usr/share/man/man8/bounce.8
+file path=usr/share/man/man8/cleanup.8
+file path=usr/share/man/man8/defer.8
+file path=usr/share/man/man8/discard.8
+file path=usr/share/man/man8/dnsblog.8
+file path=usr/share/man/man8/error.8
+file path=usr/share/man/man8/flush.8
+file path=usr/share/man/man8/lmtp.8
+file path=usr/share/man/man8/local.8
+file path=usr/share/man/man8/master.8
+file path=usr/share/man/man8/oqmgr.8
+file path=usr/share/man/man8/pickup.8
+file path=usr/share/man/man8/pipe.8
+file path=usr/share/man/man8/postscreen.8
+file path=usr/share/man/man8/proxymap.8
+file path=usr/share/man/man8/qmgr.8
+file path=usr/share/man/man8/qmqpd.8
+file path=usr/share/man/man8/scache.8
+file path=usr/share/man/man8/showq.8
+file path=usr/share/man/man8/smtp.8
+file path=usr/share/man/man8/smtpd.8
+file path=usr/share/man/man8/spawn.8
+file path=usr/share/man/man8/tlsmgr.8
+file path=usr/share/man/man8/tlsproxy.8
+file path=usr/share/man/man8/trace.8
+file path=usr/share/man/man8/trivial-rewrite.8
+file path=usr/share/man/man8/verify.8
+file path=usr/share/man/man8/virtual.8
+dir  path=var/lib/postfix owner=postfix mode=0700
+dir  path=var/spool/postfix/active
+dir  path=var/spool/postfix/bounce
+dir  path=var/spool/postfix/corrupt
+dir  path=var/spool/postfix/defer
+dir  path=var/spool/postfix/deferred
+dir  path=var/spool/postfix/flush
+dir  path=var/spool/postfix/hold
+dir  path=var/spool/postfix/incoming
+dir  path=var/spool/postfix/maildrop group=postdrop mode=0730
+dir  path=var/spool/postfix/pid owner=root mode=0755
+dir  path=var/spool/postfix/private
+dir  path=var/spool/postfix/public group=postdrop mode=0710
+dir  path=var/spool/postfix/saved
+dir  path=var/spool/postfix/trace
+#
+group groupname=postdrop gid=28
+group groupname=postfix gid=27
+user username=postfix ftpuser=false gcos-field=Postfix group=postfix \
+    home-dir=/ password=NP uid=27
+#
+license postfix.license license="IBM PUBLIC LICENSE VERSION 1.0"