? files/patch-src-dns-dns.h
Index: Portfile
===================================================================
RCS file: /Volumes/src/cvs/od/proj/darwinports/dports/mail/postfix/Portfile,v
retrieving revision 1.16
diff -u -r1.16 Portfile
--- Portfile	6 Jan 2004 16:35:33 -0000	1.16
+++ Portfile	31 Jan 2004 22:00:34 -0000
@@ -2,7 +2,7 @@
 
 PortSystem	1.0
 name	        postfix
-version	        2.0.14
+version	        2.0.17
 categories	mail
 maintainers	charlie@rubberduck.com	
 description	Fast and robust mail transfer agent
@@ -13,7 +13,7 @@
 			Postfix act as delivery daemon for ezmlm-idx.
 homepage        http://www.postfix.org/
 platforms	darwin
-checksums       md5 d0f1d1382958f3ce918d4d690be22229
+checksums       md5 482e3912e4e910bd62f1a2d74bfa3b77
 master_sites	ftp://ftp.tau.ac.il/pub/unix/mail/postfix/official/ \
                 http://postfix.problemlos.ch/release/official/ \
                 ftp://ftp.matrix.com.br/pub/postfix/official/ \
@@ -21,7 +21,7 @@
                 ftp://ftp.club-internet.fr/pub/mirrors/ftp.porcupine.org/postfix-release/official/ \
                 ftp://ftp.doc.cs.univ-paris8.fr/mirrors/ftp.porcupine.org/postfix-release/official/
 patchfiles      patch-access.5 patch-flush.8 patch-master.8 \
-		patch-regexp_table.5 patch-sys_defs.h patch-canonical.5 \
+				patch-regexp_table.5 patch-sys_defs.h patch-canonical.5 \
                 patch-mail_params.h patch-pcre_table.5 patch-postdrop.1 \
                 patch-postqueue.1 patch-relocated.5 patch-transport.5 \
                 patch-cleanup.8 patch-main.cf patch-postfix-install \
@@ -35,6 +35,10 @@
 	build.env-delete	CCARGS=-DNO_PCRE
 }
 
+platform darwin 7 {
+	patchfiles-append patch-src-dns-dns.h
+}
+
 configure {
 	cd ${worksrcpath}
 	reinplace "s|__PREFIX|${prefix}|g" src/util/sys_defs.h
@@ -72,8 +76,13 @@
 	file mkdir ${destroot}${prefix}/sbin
 	file mkdir ${destroot}${prefix}/man
 	file mkdir ${destroot}${prefix}/share/postfix
-	system "install -d -g postdrop ${destroot}${prefix}/var/spool/postfix/public"
-	system "install -d -g postdrop ${destroot}${prefix}/var/spool/postfix/maildrop"
+	xinstall -d -o postfix -g postdrop ${destroot}${prefix}/var/spool/postfix/public
+	xinstall -d -o postfix -g postdrop ${destroot}${prefix}/var/spool/postfix/maildrop
+	# Add turd files to avoid these directories to be deleted.
+	system "touch ${destroot}${prefix}/var/spool/postfix/public/.turd"
+	system "chown postfix:postdrop ${destroot}${prefix}/var/spool/postfix/public/.turd"
+	system "touch ${destroot}${prefix}/var/spool/postfix/maildrop/.turd"
+	system "chown postfix:postdrop ${destroot}${prefix}/var/spool/postfix/maildrop/.turd"
 	system "/bin/sh postfix-install -non-interactive \
 		install_root=${destroot} \
 		config_directory=${prefix}/etc/postfix \
@@ -86,9 +95,8 @@
 		mailq_path=${prefix}/bin/mailq \
 		sample_directory=${prefix}/share/postfix/sample \
 		readme_directory=${prefix}/share/postfix/readme"
-	system "install -o root -m 755 -d ${destroot}${prefix}/etc/rc.d"
-	system "install -o root -m 755 -c \
-		${portpath}/files/postfix.sh ${destroot}${prefix}/etc/rc.d"
+	xinstall -m 755 -d ${destroot}${prefix}/etc/rc.d
+	xinstall -m 755 -c ${portpath}/files/postfix.sh ${destroot}${prefix}/etc/rc.d
 	reinplace "s|__PREFIX|${prefix}|g" \
 		${destroot}${prefix}/etc/rc.d/postfix.sh
 }
@@ -102,4 +110,11 @@
 		${destroot}${prefix}/etc/postfix/master.cf.sample
 	file rename ${destroot}${prefix}/etc/postfix/aliases \
 		${destroot}${prefix}/etc/postfix/aliases.sample
+}
+
+post-install {
+	# Tell the user about the renaming of the configuration files.
+	ui_msg "To get postfix working, you need to copy sample configuration "
+	ui_msg "files and to edit them (${prefix}/etc/postfix/*.sample)."
+	ui_msg "You may also want to turn your system's MTA off."
 }
Index: files/patch-main.cf
===================================================================
RCS file: /Volumes/src/cvs/od/proj/darwinports/dports/mail/postfix/files/patch-main.cf,v
retrieving revision 1.2
diff -u -r1.2 patch-main.cf
--- files/patch-main.cf	22 Jun 2003 16:42:03 -0000	1.2
+++ files/patch-main.cf	31 Jan 2004 22:00:34 -0000
@@ -1,5 +1,5 @@
---- conf/main.cf	Sat Jun 21 13:20:30 2003
-+++ conf/main.cf.new	Sat Jun 21 13:22:23 2003
+--- conf/main.cf.old	Sat Jan 31 22:49:08 2004
++++ conf/main.cf	Sat Jan 31 22:50:21 2004
 @@ -26,18 +26,23 @@
  # See the files in examples/chroot-setup for setting up Postfix chroot
  # environments on different UNIX systems.
@@ -36,7 +36,7 @@
  
  # INTERNET HOST AND DOMAIN NAMES
  # 
-@@ -252,7 +257,7 @@
+@@ -255,7 +260,7 @@
  #
  #mynetworks = 168.100.189.0/28, 127.0.0.0/8
  #mynetworks = $config_directory/mynetworks
@@ -45,7 +45,7 @@
  
  # The relay_domains parameter restricts what destinations this system will
  # relay mail to.  See the smtpd_recipient_restrictions restriction in the
-@@ -316,7 +321,7 @@
+@@ -319,7 +324,7 @@
  # In the left-hand side, specify an @domain.tld wild-card, or specify
  # a user@domain.tld address.
  # 
@@ -54,7 +54,16 @@
  
  # INPUT RATE CONTROL
  #
-@@ -511,7 +516,7 @@
+@@ -376,6 +381,8 @@
+ # It will take a minute or so before changes become visible.  Use
+ # "postfix reload" to eliminate the delay.
+ #
++# netinfo only works on Darwin < 7 and MacOS X < Panther.
++#
+ #alias_maps = dbm:/etc/aliases
+ #alias_maps = hash:/etc/aliases
+ #alias_maps = hash:/etc/aliases, nis:mail.aliases
+@@ -514,7 +521,7 @@
  #
  # For details, see the sample-filter.cf file.
  #
@@ -63,7 +72,7 @@
  
  # FAST ETRN SERVICE
  #
-@@ -602,27 +607,27 @@
+@@ -605,27 +612,27 @@
  # sendmail_path: The full pathname of the Postfix sendmail command.
  # This is the Sendmail-compatible mail posting interface.
  # 
Index: files/patch-sys_defs.h
===================================================================
RCS file: /Volumes/src/cvs/od/proj/darwinports/dports/mail/postfix/files/patch-sys_defs.h,v
retrieving revision 1.2
diff -u -r1.2 patch-sys_defs.h
--- files/patch-sys_defs.h	22 Jun 2003 16:42:04 -0000	1.2
+++ files/patch-sys_defs.h	31 Jan 2004 22:00:34 -0000
@@ -1,23 +1,27 @@
---- src/util/sys_defs.h	Tue Jun 10 02:11:56 2003
-+++ src/util/sys_defs.h.new	Sat Jun 21 13:16:27 2003
-@@ -88,10 +88,10 @@
+--- src/util/sys_defs.h.old	Sat Jan 31 22:45:53 2004
++++ src/util/sys_defs.h	Sat Jan 31 22:46:56 2004
+@@ -88,10 +88,8 @@
  #define HAS_FSYNC
  #define HAS_DB
  #define HAS_SA_LEN
 -#define DEF_DB_TYPE	"hash"
 -#define ALIAS_DB_MAP	"hash:/etc/aliases"
-+#define DEF_DB_TYPE	"netinfo"
-+#define ALIAS_DB_MAP	"netinfo:/aliases"
  #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
 -#define ROOT_PATH	"/bin:/usr/bin:/sbin:/usr/sbin"
 +#define ROOT_PATH	"/bin:/usr/bin:/sbin:/usr/sbin:__PREFIX/bin:__PREFIX/sbin"
  #define USE_STATFS
  #define STATFS_IN_SYS_MOUNT_H
  #define HAS_POSIX_REGEXP
-@@ -99,11 +99,11 @@
- #define PRINTFLIKE(x,y)
+@@ -100,12 +98,17 @@
  #define SCANFLIKE(x,y)
+ #ifndef NO_NETINFO
  #define HAS_NETINFO
++#define DEF_DB_TYPE	"netinfo"
++#define ALIAS_DB_MAP	"netinfo:/aliases"
++#else
++#define DEF_DB_TYPE	"hash"
++#define ALIAS_DB_MAP	"hash:/etc/aliases"
+ #endif
 -#define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
 -#define NATIVE_MAILQ_PATH "/usr/bin/mailq"
 -#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
