summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorTorsten Blum <torstenb@FreeBSD.org>1999-03-29 20:15:09 +0000
committerTorsten Blum <torstenb@FreeBSD.org>1999-03-29 20:15:09 +0000
commitf7f54da77e43b5cc834e48482babbe81dc49f043 (patch)
tree4060ca58c256e685793e7662b30bb8d26240e1af /mail
parentCleanup Makefile and pkg/DESCR (diff)
Port of Wietse Venema's postfix, yet another mail transport agent that tries to
replace sendmail.
Notes
Notes: svn path=/head/; revision=17439
Diffstat (limited to 'mail')
-rw-r--r--mail/postfix-current/Makefile122
-rw-r--r--mail/postfix-current/distinfo1
-rw-r--r--mail/postfix-current/files/patch-aa36
-rw-r--r--mail/postfix-current/files/patch-ab74
-rw-r--r--mail/postfix-current/files/patch-ba19
-rw-r--r--mail/postfix-current/files/patch-bb36
-rw-r--r--mail/postfix-current/files/patch-bc19
-rw-r--r--mail/postfix-current/files/patch-bd19
-rw-r--r--mail/postfix-current/files/patch-be19
-rw-r--r--mail/postfix-current/files/patch-bf19
-rw-r--r--mail/postfix-current/files/patch-bg19
-rw-r--r--mail/postfix-current/files/patch-bh21
-rw-r--r--mail/postfix-current/files/patch-bi21
-rw-r--r--mail/postfix-current/pkg-comment1
-rw-r--r--mail/postfix-current/pkg-descr6
-rw-r--r--mail/postfix-current/pkg-install77
-rw-r--r--mail/postfix-current/pkg-plist49
-rw-r--r--mail/postfix-current/scripts/configure26
-rw-r--r--mail/postfix/Makefile122
-rw-r--r--mail/postfix/distinfo1
-rw-r--r--mail/postfix/files/patch-aa36
-rw-r--r--mail/postfix/files/patch-ab74
-rw-r--r--mail/postfix/files/patch-ba19
-rw-r--r--mail/postfix/files/patch-bb36
-rw-r--r--mail/postfix/files/patch-bc19
-rw-r--r--mail/postfix/files/patch-bd19
-rw-r--r--mail/postfix/files/patch-be19
-rw-r--r--mail/postfix/files/patch-bf19
-rw-r--r--mail/postfix/files/patch-bg19
-rw-r--r--mail/postfix/files/patch-bh21
-rw-r--r--mail/postfix/files/patch-bi21
-rw-r--r--mail/postfix/pkg-comment1
-rw-r--r--mail/postfix/pkg-descr6
-rw-r--r--mail/postfix/pkg-install77
-rw-r--r--mail/postfix/pkg-plist49
-rw-r--r--mail/postfix/scripts/configure26
-rw-r--r--mail/postfix1/Makefile122
-rw-r--r--mail/postfix1/distinfo1
-rw-r--r--mail/postfix1/files/patch-aa36
-rw-r--r--mail/postfix1/files/patch-ab74
-rw-r--r--mail/postfix1/files/patch-ba19
-rw-r--r--mail/postfix1/files/patch-bb36
-rw-r--r--mail/postfix1/files/patch-bc19
-rw-r--r--mail/postfix1/files/patch-bd19
-rw-r--r--mail/postfix1/files/patch-be19
-rw-r--r--mail/postfix1/files/patch-bf19
-rw-r--r--mail/postfix1/files/patch-bg19
-rw-r--r--mail/postfix1/files/patch-bh21
-rw-r--r--mail/postfix1/files/patch-bi21
-rw-r--r--mail/postfix1/pkg-comment1
-rw-r--r--mail/postfix1/pkg-descr6
-rw-r--r--mail/postfix1/pkg-install77
-rw-r--r--mail/postfix1/pkg-plist49
-rw-r--r--mail/postfix1/scripts/configure26
-rw-r--r--mail/postfix20/Makefile122
-rw-r--r--mail/postfix20/distinfo1
-rw-r--r--mail/postfix20/files/patch-aa36
-rw-r--r--mail/postfix20/files/patch-ab74
-rw-r--r--mail/postfix20/files/patch-ba19
-rw-r--r--mail/postfix20/files/patch-bb36
-rw-r--r--mail/postfix20/files/patch-bc19
-rw-r--r--mail/postfix20/files/patch-bd19
-rw-r--r--mail/postfix20/files/patch-be19
-rw-r--r--mail/postfix20/files/patch-bf19
-rw-r--r--mail/postfix20/files/patch-bg19
-rw-r--r--mail/postfix20/files/patch-bh21
-rw-r--r--mail/postfix20/files/patch-bi21
-rw-r--r--mail/postfix20/pkg-comment1
-rw-r--r--mail/postfix20/pkg-descr6
-rw-r--r--mail/postfix20/pkg-install77
-rw-r--r--mail/postfix20/pkg-plist49
-rw-r--r--mail/postfix20/scripts/configure26
-rw-r--r--mail/postfix21/Makefile122
-rw-r--r--mail/postfix21/distinfo1
-rw-r--r--mail/postfix21/files/patch-aa36
-rw-r--r--mail/postfix21/files/patch-ab74
-rw-r--r--mail/postfix21/files/patch-ba19
-rw-r--r--mail/postfix21/files/patch-bb36
-rw-r--r--mail/postfix21/files/patch-bc19
-rw-r--r--mail/postfix21/files/patch-bd19
-rw-r--r--mail/postfix21/files/patch-be19
-rw-r--r--mail/postfix21/files/patch-bf19
-rw-r--r--mail/postfix21/files/patch-bg19
-rw-r--r--mail/postfix21/files/patch-bh21
-rw-r--r--mail/postfix21/files/patch-bi21
-rw-r--r--mail/postfix21/pkg-comment1
-rw-r--r--mail/postfix21/pkg-descr6
-rw-r--r--mail/postfix21/pkg-install77
-rw-r--r--mail/postfix21/pkg-plist49
-rw-r--r--mail/postfix21/scripts/configure26
-rw-r--r--mail/postfix22/Makefile122
-rw-r--r--mail/postfix22/distinfo1
-rw-r--r--mail/postfix22/files/patch-aa36
-rw-r--r--mail/postfix22/files/patch-ab74
-rw-r--r--mail/postfix22/files/patch-ba19
-rw-r--r--mail/postfix22/files/patch-bb36
-rw-r--r--mail/postfix22/files/patch-bc19
-rw-r--r--mail/postfix22/files/patch-bd19
-rw-r--r--mail/postfix22/files/patch-be19
-rw-r--r--mail/postfix22/files/patch-bf19
-rw-r--r--mail/postfix22/files/patch-bg19
-rw-r--r--mail/postfix22/files/patch-bh21
-rw-r--r--mail/postfix22/files/patch-bi21
-rw-r--r--mail/postfix22/pkg-comment1
-rw-r--r--mail/postfix22/pkg-descr6
-rw-r--r--mail/postfix22/pkg-install77
-rw-r--r--mail/postfix22/pkg-plist49
-rw-r--r--mail/postfix22/scripts/configure26
-rw-r--r--mail/postfix23/Makefile122
-rw-r--r--mail/postfix23/distinfo1
-rw-r--r--mail/postfix23/files/patch-aa36
-rw-r--r--mail/postfix23/files/patch-ab74
-rw-r--r--mail/postfix23/files/patch-ba19
-rw-r--r--mail/postfix23/files/patch-bb36
-rw-r--r--mail/postfix23/files/patch-bc19
-rw-r--r--mail/postfix23/files/patch-bd19
-rw-r--r--mail/postfix23/files/patch-be19
-rw-r--r--mail/postfix23/files/patch-bf19
-rw-r--r--mail/postfix23/files/patch-bg19
-rw-r--r--mail/postfix23/files/patch-bh21
-rw-r--r--mail/postfix23/files/patch-bi21
-rw-r--r--mail/postfix23/pkg-comment1
-rw-r--r--mail/postfix23/pkg-descr6
-rw-r--r--mail/postfix23/pkg-install77
-rw-r--r--mail/postfix23/pkg-plist49
-rw-r--r--mail/postfix23/scripts/configure26
-rw-r--r--mail/postfix24/Makefile122
-rw-r--r--mail/postfix24/distinfo1
-rw-r--r--mail/postfix24/files/patch-aa36
-rw-r--r--mail/postfix24/files/patch-ab74
-rw-r--r--mail/postfix24/files/patch-ba19
-rw-r--r--mail/postfix24/files/patch-bb36
-rw-r--r--mail/postfix24/files/patch-bc19
-rw-r--r--mail/postfix24/files/patch-bd19
-rw-r--r--mail/postfix24/files/patch-be19
-rw-r--r--mail/postfix24/files/patch-bf19
-rw-r--r--mail/postfix24/files/patch-bg19
-rw-r--r--mail/postfix24/files/patch-bh21
-rw-r--r--mail/postfix24/files/patch-bi21
-rw-r--r--mail/postfix24/pkg-comment1
-rw-r--r--mail/postfix24/pkg-descr6
-rw-r--r--mail/postfix24/pkg-install77
-rw-r--r--mail/postfix24/pkg-plist49
-rw-r--r--mail/postfix24/scripts/configure26
-rw-r--r--mail/postfix25/Makefile122
-rw-r--r--mail/postfix25/distinfo1
-rw-r--r--mail/postfix25/files/patch-aa36
-rw-r--r--mail/postfix25/files/patch-ab74
-rw-r--r--mail/postfix25/files/patch-ba19
-rw-r--r--mail/postfix25/files/patch-bb36
-rw-r--r--mail/postfix25/files/patch-bc19
-rw-r--r--mail/postfix25/files/patch-bd19
-rw-r--r--mail/postfix25/files/patch-be19
-rw-r--r--mail/postfix25/files/patch-bf19
-rw-r--r--mail/postfix25/files/patch-bg19
-rw-r--r--mail/postfix25/files/patch-bh21
-rw-r--r--mail/postfix25/files/patch-bi21
-rw-r--r--mail/postfix25/pkg-comment1
-rw-r--r--mail/postfix25/pkg-descr6
-rw-r--r--mail/postfix25/pkg-install77
-rw-r--r--mail/postfix25/pkg-plist49
-rw-r--r--mail/postfix25/scripts/configure26
-rw-r--r--mail/postfix26/Makefile122
-rw-r--r--mail/postfix26/distinfo1
-rw-r--r--mail/postfix26/files/patch-aa36
-rw-r--r--mail/postfix26/files/patch-ab74
-rw-r--r--mail/postfix26/files/patch-ba19
-rw-r--r--mail/postfix26/files/patch-bb36
-rw-r--r--mail/postfix26/files/patch-bc19
-rw-r--r--mail/postfix26/files/patch-bd19
-rw-r--r--mail/postfix26/files/patch-be19
-rw-r--r--mail/postfix26/files/patch-bf19
-rw-r--r--mail/postfix26/files/patch-bg19
-rw-r--r--mail/postfix26/files/patch-bh21
-rw-r--r--mail/postfix26/files/patch-bi21
-rw-r--r--mail/postfix26/pkg-comment1
-rw-r--r--mail/postfix26/pkg-descr6
-rw-r--r--mail/postfix26/pkg-install77
-rw-r--r--mail/postfix26/pkg-plist49
-rw-r--r--mail/postfix26/scripts/configure26
-rw-r--r--mail/postfix27/Makefile122
-rw-r--r--mail/postfix27/distinfo1
-rw-r--r--mail/postfix27/files/patch-aa36
-rw-r--r--mail/postfix27/files/patch-ab74
-rw-r--r--mail/postfix27/files/patch-ba19
-rw-r--r--mail/postfix27/files/patch-bb36
-rw-r--r--mail/postfix27/files/patch-bc19
-rw-r--r--mail/postfix27/files/patch-bd19
-rw-r--r--mail/postfix27/files/patch-be19
-rw-r--r--mail/postfix27/files/patch-bf19
-rw-r--r--mail/postfix27/files/patch-bg19
-rw-r--r--mail/postfix27/files/patch-bh21
-rw-r--r--mail/postfix27/files/patch-bi21
-rw-r--r--mail/postfix27/pkg-comment1
-rw-r--r--mail/postfix27/pkg-descr6
-rw-r--r--mail/postfix27/pkg-install77
-rw-r--r--mail/postfix27/pkg-plist49
-rw-r--r--mail/postfix27/scripts/configure26
-rw-r--r--mail/postfix28/Makefile122
-rw-r--r--mail/postfix28/distinfo1
-rw-r--r--mail/postfix28/files/patch-aa36
-rw-r--r--mail/postfix28/files/patch-ab74
-rw-r--r--mail/postfix28/files/patch-ba19
-rw-r--r--mail/postfix28/files/patch-bb36
-rw-r--r--mail/postfix28/files/patch-bc19
-rw-r--r--mail/postfix28/files/patch-bd19
-rw-r--r--mail/postfix28/files/patch-be19
-rw-r--r--mail/postfix28/files/patch-bf19
-rw-r--r--mail/postfix28/files/patch-bg19
-rw-r--r--mail/postfix28/files/patch-bh21
-rw-r--r--mail/postfix28/files/patch-bi21
-rw-r--r--mail/postfix28/pkg-comment1
-rw-r--r--mail/postfix28/pkg-descr6
-rw-r--r--mail/postfix28/pkg-install77
-rw-r--r--mail/postfix28/pkg-plist49
-rw-r--r--mail/postfix28/scripts/configure26
216 files changed, 7008 insertions, 0 deletions
diff --git a/mail/postfix-current/Makefile b/mail/postfix-current/Makefile
new file mode 100644
index 000000000000..8c8e340a8706
--- /dev/null
+++ b/mail/postfix-current/Makefile
@@ -0,0 +1,122 @@
+# New ports collection makefile for: postfix
+# Version required: postfix 19990317-pl03
+# Date created: 18 Mar 1999
+# Whom: torstenb
+#
+# $Id$
+#
+
+DISTNAME= postfix-19990317-pl03
+PKGNAME= postfix-alpha-19990317.03
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.merit.edu/postfix/ \
+ ftp://ftp.snoopy.net/pub/mirrors/postfix/ \
+ ftp://ftp.reverse.net/pub/postfix/ \
+ ftp://postfix.eu.org/pub/postfix/ \
+ ftp://ftp.sunet.se/pub/unix/mail/postfix/ \
+ ftp://ftp.cs.tu-berlin.de/pub/net/mail/postfix/ \
+ ftp://ftp.postfix.oaktree.co.uk/pub/postfix/
+
+MAINTAINER= torstenb@FreeBSD.ORG
+
+ALL_TARGET= default
+
+SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
+
+MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
+ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
+ sendmail.1
+MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
+MAN8= bounce.8 cleanup.8 defer.8 local.8 master.8 pickup.8 pipe.8 qmgr.8 \
+ showq.8 smtp.8 smtpd.8 trivial-rewrite.8
+
+do-install:
+ @mkdir -p -m 755 ${PREFIX}/etc/postfix
+ @chown root:wheel ${PREFIX}/etc/postfix
+ @install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
+ ${PREFIX}/etc/postfix/LICENSE
+ @for f in access main.cf master.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/sample-$$f ; \
+ done
+ @exit
+ @for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
+ sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
+ sample-rate.cf sample-relocated.cf sample-resource.cf \
+ sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
+ sample-transport.cf sample-virtual.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/$$f ;\
+ done
+ @install -C -o root -g wheel -m 755 ${WRKSRC}/conf/postfix-script-sgid \
+ ${PREFIX}/etc/postfix/postfix-script
+ @mkdir -p -m 0755 ${PREFIX}/libexec/postfix
+ @for f in bounce cleanup fsstone local master pickup pipe \
+ qmgr showq smtp smtp-sink smtp-source smtpd \
+ trivial-rewrite ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/libexec/postfix/$$f ;\
+ done
+ @for f in sendmail postalias postcat postconf postfix \
+ postkick postlock postlog postmap postsuper ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/sbin/$$f ;\
+ done
+ @install -C -o root -g wheel -m 0555 ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
+ @for f in ${MAN1} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
+ ${PREFIX}/man/man1/$$f ;\
+ done
+ @for f in ${MAN5} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man5/$$f \
+ ${PREFIX}/man/man5/$$f ;\
+ done
+ @for f in ${MAN8} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man8/$$f \
+ ${PREFIX}/man/man8/$$f ;\
+ done
+ @mkdir -p -m 0755 /var/spool/postfix
+ @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
+ ${PREFIX}/etc/postfix/main.cf; \
+ fi
+ @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
+ ${PREFIX}/etc/postfix/master.cf; \
+ fi
+ @echo "--------------------------------------------------"
+ @echo "- To replace your existing sendmail with postfix -"
+ @echo "- type \"make replace\" "
+ @echo "--------------------------------------------------"
+
+post-install:
+ @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
+replace:
+ @echo "===> Replacing sendmail"
+ @if [ -e /usr/sbin/sendmail ]; then \
+ ${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
+ chmod 0 /usr/sbin/sendmail.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
+ fi
+ @echo "===> Replacing mailq"
+ @if [ -e /usr/bin/mailq ]; then \
+ ${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
+ chmod 0 /usr/bin/mailq.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
+ fi
+ @echo "===> Replacing newaliases"
+ @if [ -e /usr/bin/newaliases ]; then \
+ ${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
+ chmod 0 /usr/bin/newaliases.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/mail/postfix-current/distinfo b/mail/postfix-current/distinfo
new file mode 100644
index 000000000000..0ff555aac014
--- /dev/null
+++ b/mail/postfix-current/distinfo
@@ -0,0 +1 @@
+MD5 (postfix-19990317-pl03.tar.gz) = d40f5773f4886ecbff40908588f07406
diff --git a/mail/postfix-current/files/patch-aa b/mail/postfix-current/files/patch-aa
new file mode 100644
index 000000000000..3af6375f1959
--- /dev/null
+++ b/mail/postfix-current/files/patch-aa
@@ -0,0 +1,36 @@
+*** global/mail_params.h.orig Sat Mar 20 15:09:46 1999
+--- global/mail_params.h Sat Mar 20 15:10:46 1999
+***************
+*** 127,133 ****
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "/usr/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+--- 127,133 ----
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "!!PREFIX!!/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+***************
+*** 161,167 ****
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
+--- 161,167 ----
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "!!PREFIX!!/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
diff --git a/mail/postfix-current/files/patch-ab b/mail/postfix-current/files/patch-ab
new file mode 100644
index 000000000000..6824371c251b
--- /dev/null
+++ b/mail/postfix-current/files/patch-ab
@@ -0,0 +1,74 @@
+*** conf/main.cf.orig Mon Mar 29 22:10:14 1999
+--- conf/main.cf Mon Mar 29 22:13:09 1999
+***************
+*** 18,36 ****
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = /some/where/postfix/bin
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! #command_directory = /usr/sbin
+
+ # The daemon_directory parameter specifies the location of all Postfix
+ # daemon programs (i.e. programs listed in the master.cf file). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! #daemon_directory = /usr/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+--- 18,36 ----
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = !!PREFIX!!/pbexec/postfix
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! 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). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! daemon_directory = !!PREFIX!!/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+***************
+*** 40,53 ****
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! #mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! #default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
+--- 40,53 ----
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
diff --git a/mail/postfix-current/files/patch-ba b/mail/postfix-current/files/patch-ba
new file mode 100644
index 000000000000..73feeef81f27
--- /dev/null
+++ b/mail/postfix-current/files/patch-ba
@@ -0,0 +1,19 @@
+*** man/man1/postdrop.1.orig Mon Mar 29 22:35:14 1999
+--- man/man1/postdrop.1 Mon Mar 29 22:35:25 1999
+***************
+*** 51,57 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 51,57 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix-current/files/patch-bb b/mail/postfix-current/files/patch-bb
new file mode 100644
index 000000000000..af024b23b3d9
--- /dev/null
+++ b/mail/postfix-current/files/patch-bb
@@ -0,0 +1,36 @@
+*** man/man1/sendmail.1.orig Mon Mar 29 22:35:30 1999
+--- man/man1/sendmail.1 Mon Mar 29 22:35:44 1999
+***************
+*** 60,66 ****
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+--- 60,66 ----
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB!!PREFIX!!/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+***************
+*** 164,170 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 164,170 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix-current/files/patch-bc b/mail/postfix-current/files/patch-bc
new file mode 100644
index 000000000000..12a369684c8f
--- /dev/null
+++ b/mail/postfix-current/files/patch-bc
@@ -0,0 +1,19 @@
+*** man/man5/access.5.orig Mon Mar 29 22:35:58 1999
+--- man/man5/access.5 Mon Mar 29 22:36:13 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix-current/files/patch-bd b/mail/postfix-current/files/patch-bd
new file mode 100644
index 000000000000..2b2f30f720f5
--- /dev/null
+++ b/mail/postfix-current/files/patch-bd
@@ -0,0 +1,19 @@
+*** man/man5/canonical.5.orig Mon Mar 29 22:36:25 1999
+--- man/man5/canonical.5 Mon Mar 29 22:36:32 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix-current/files/patch-be b/mail/postfix-current/files/patch-be
new file mode 100644
index 000000000000..354737c7e68d
--- /dev/null
+++ b/mail/postfix-current/files/patch-be
@@ -0,0 +1,19 @@
+*** man/man5/relocated.5.orig Mon Mar 29 22:36:36 1999
+--- man/man5/relocated.5 Mon Mar 29 22:36:47 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix-current/files/patch-bf b/mail/postfix-current/files/patch-bf
new file mode 100644
index 000000000000..4de817826469
--- /dev/null
+++ b/mail/postfix-current/files/patch-bf
@@ -0,0 +1,19 @@
+*** man/man5/virtual.5.orig Mon Mar 29 22:36:55 1999
+--- man/man5/virtual.5 Mon Mar 29 22:37:02 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix-current/files/patch-bg b/mail/postfix-current/files/patch-bg
new file mode 100644
index 000000000000..fb2b093bff0f
--- /dev/null
+++ b/mail/postfix-current/files/patch-bg
@@ -0,0 +1,19 @@
+*** man/man8/local.8.orig Mon Mar 29 22:37:14 1999
+--- man/man8/local.8 Mon Mar 29 22:37:44 1999
+***************
+*** 75,81 ****
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR or \fB/var/spool/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
+--- 75,81 ----
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
diff --git a/mail/postfix-current/files/patch-bh b/mail/postfix-current/files/patch-bh
new file mode 100644
index 000000000000..42b7373d3fb5
--- /dev/null
+++ b/mail/postfix-current/files/patch-bh
@@ -0,0 +1,21 @@
+*** man/man8/cleanup.8.orig Mon Mar 29 22:37:59 1999
+--- man/man8/cleanup.8 Mon Mar 29 22:38:13 1999
+***************
+*** 118,125 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/canonical*, canonical mapping table
+! /etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
+--- 118,125 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/canonical*, canonical mapping table
+! !!PREFIX!!/etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
diff --git a/mail/postfix-current/files/patch-bi b/mail/postfix-current/files/patch-bi
new file mode 100644
index 000000000000..2b57467ed976
--- /dev/null
+++ b/mail/postfix-current/files/patch-bi
@@ -0,0 +1,21 @@
+*** man/man8/master.8.orig Mon Mar 29 22:38:17 1999
+--- man/man8/master.8 Mon Mar 29 22:38:46 1999
+***************
+*** 116,123 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/main.cf: global configuration file.
+! /etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
+--- 116,123 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/main.cf: global configuration file.
+! !!PREFIX!!/etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
diff --git a/mail/postfix-current/pkg-comment b/mail/postfix-current/pkg-comment
new file mode 100644
index 000000000000..e9fea510ce32
--- /dev/null
+++ b/mail/postfix-current/pkg-comment
@@ -0,0 +1 @@
+Postfix aims to be an alternative to sendmail
diff --git a/mail/postfix-current/pkg-descr b/mail/postfix-current/pkg-descr
new file mode 100644
index 000000000000..fa5e129bf08b
--- /dev/null
+++ b/mail/postfix-current/pkg-descr
@@ -0,0 +1,6 @@
+Postfix aims to be an alternative to the widely-used sendmail
+program. Sendmail is responsible for 70% of all e-mail delivered
+on the Internet. With an estimated 100 million users, that's an
+estimated 10 billion (10^10) messages daily. A stunning number.
+
+See http://www.postfix.org/ for details
diff --git a/mail/postfix-current/pkg-install b/mail/postfix-current/pkg-install
new file mode 100644
index 000000000000..7b4849639b05
--- /dev/null
+++ b/mail/postfix-current/pkg-install
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+user=postfix
+group=postfix
+group2=maildrop
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
+else
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+chown root:maildrop ${PREFIX}/sbin/postdrop
+chmod 2755 ${PREFIX}/sbin/postdrop
diff --git a/mail/postfix-current/pkg-plist b/mail/postfix-current/pkg-plist
new file mode 100644
index 000000000000..28bc453e2bc2
--- /dev/null
+++ b/mail/postfix-current/pkg-plist
@@ -0,0 +1,49 @@
+etc/postfix/main.cf
+etc/postfix/LICENSE
+etc/postfix/sample-access
+etc/postfix/sample-main.cf
+etc/postfix/sample-master.cf
+etc/postfix/sample-aliases.cf
+etc/postfix/sample-canonical.cf
+etc/postfix/sample-debug.cf
+etc/postfix/sample-ldap.cf
+etc/postfix/sample-local.cf
+etc/postfix/sample-misc.cf
+etc/postfix/sample-pcre.cf
+etc/postfix/sample-rate.cf
+etc/postfix/sample-relocated.cf
+etc/postfix/sample-resource.cf
+etc/postfix/sample-rewrite.cf
+etc/postfix/sample-smtp.cf
+etc/postfix/sample-smtpd.cf
+etc/postfix/sample-transport.cf
+etc/postfix/sample-virtual.cf
+etc/postfix/postfix-script
+etc/postfix/master.cf
+libexec/postfix/bounce
+libexec/postfix/cleanup
+libexec/postfix/fsstone
+libexec/postfix/local
+libexec/postfix/master
+libexec/postfix/pickup
+libexec/postfix/pipe
+libexec/postfix/qmgr
+libexec/postfix/showq
+libexec/postfix/smtp
+libexec/postfix/smtp-sink
+libexec/postfix/smtp-source
+libexec/postfix/smtpd
+libexec/postfix/trivial-rewrite
+sbin/sendmail
+sbin/postalias
+sbin/postcat
+sbin/postconf
+sbin/postfix
+sbin/postkick
+sbin/postlock
+sbin/postlog
+sbin/postmap
+sbin/postsuper
+sbin/postdrop
+@exec mkdir -p -m 0755 /var/spool/postfix
+@exec chown root:wheel /var/spool/postfix
diff --git a/mail/postfix-current/scripts/configure b/mail/postfix-current/scripts/configure
new file mode 100644
index 000000000000..48d9220b478d
--- /dev/null
+++ b/mail/postfix-current/scripts/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $Id$
+
+mv ${WRKSRC}/global/mail_params.h ${WRKSRC}/global/mail_params.h.bak
+sed <${WRKSRC}/global/mail_params.h.bak >${WRKSRC}/global/mail_params.h s+!!PREFIX!!+$PREFIX+g
+
+mv ${WRKSRC}/conf/main.cf ${WRKSRC}/conf/main.cf.bak
+sed <${WRKSRC}/conf/main.cf.bak >${WRKSRC}/conf/main.cf
+
+cd ${WRKSRC}/man
+
+for f in ${MAN1} ; do
+ mv man1/$f man1/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man1/$f.bak | soelim >man1/$f
+done
+
+for f in ${MAN5} ; do
+ mv man5/$f man5/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man5/$f.bak | soelim >man5/$f
+done
+
+for f in ${MAN8} ; do
+ mv man8/$f man8/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man8/$f.bak | soelim >man8/$f
+done
diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile
new file mode 100644
index 000000000000..8c8e340a8706
--- /dev/null
+++ b/mail/postfix/Makefile
@@ -0,0 +1,122 @@
+# New ports collection makefile for: postfix
+# Version required: postfix 19990317-pl03
+# Date created: 18 Mar 1999
+# Whom: torstenb
+#
+# $Id$
+#
+
+DISTNAME= postfix-19990317-pl03
+PKGNAME= postfix-alpha-19990317.03
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.merit.edu/postfix/ \
+ ftp://ftp.snoopy.net/pub/mirrors/postfix/ \
+ ftp://ftp.reverse.net/pub/postfix/ \
+ ftp://postfix.eu.org/pub/postfix/ \
+ ftp://ftp.sunet.se/pub/unix/mail/postfix/ \
+ ftp://ftp.cs.tu-berlin.de/pub/net/mail/postfix/ \
+ ftp://ftp.postfix.oaktree.co.uk/pub/postfix/
+
+MAINTAINER= torstenb@FreeBSD.ORG
+
+ALL_TARGET= default
+
+SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
+
+MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
+ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
+ sendmail.1
+MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
+MAN8= bounce.8 cleanup.8 defer.8 local.8 master.8 pickup.8 pipe.8 qmgr.8 \
+ showq.8 smtp.8 smtpd.8 trivial-rewrite.8
+
+do-install:
+ @mkdir -p -m 755 ${PREFIX}/etc/postfix
+ @chown root:wheel ${PREFIX}/etc/postfix
+ @install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
+ ${PREFIX}/etc/postfix/LICENSE
+ @for f in access main.cf master.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/sample-$$f ; \
+ done
+ @exit
+ @for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
+ sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
+ sample-rate.cf sample-relocated.cf sample-resource.cf \
+ sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
+ sample-transport.cf sample-virtual.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/$$f ;\
+ done
+ @install -C -o root -g wheel -m 755 ${WRKSRC}/conf/postfix-script-sgid \
+ ${PREFIX}/etc/postfix/postfix-script
+ @mkdir -p -m 0755 ${PREFIX}/libexec/postfix
+ @for f in bounce cleanup fsstone local master pickup pipe \
+ qmgr showq smtp smtp-sink smtp-source smtpd \
+ trivial-rewrite ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/libexec/postfix/$$f ;\
+ done
+ @for f in sendmail postalias postcat postconf postfix \
+ postkick postlock postlog postmap postsuper ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/sbin/$$f ;\
+ done
+ @install -C -o root -g wheel -m 0555 ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
+ @for f in ${MAN1} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
+ ${PREFIX}/man/man1/$$f ;\
+ done
+ @for f in ${MAN5} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man5/$$f \
+ ${PREFIX}/man/man5/$$f ;\
+ done
+ @for f in ${MAN8} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man8/$$f \
+ ${PREFIX}/man/man8/$$f ;\
+ done
+ @mkdir -p -m 0755 /var/spool/postfix
+ @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
+ ${PREFIX}/etc/postfix/main.cf; \
+ fi
+ @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
+ ${PREFIX}/etc/postfix/master.cf; \
+ fi
+ @echo "--------------------------------------------------"
+ @echo "- To replace your existing sendmail with postfix -"
+ @echo "- type \"make replace\" "
+ @echo "--------------------------------------------------"
+
+post-install:
+ @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
+replace:
+ @echo "===> Replacing sendmail"
+ @if [ -e /usr/sbin/sendmail ]; then \
+ ${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
+ chmod 0 /usr/sbin/sendmail.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
+ fi
+ @echo "===> Replacing mailq"
+ @if [ -e /usr/bin/mailq ]; then \
+ ${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
+ chmod 0 /usr/bin/mailq.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
+ fi
+ @echo "===> Replacing newaliases"
+ @if [ -e /usr/bin/newaliases ]; then \
+ ${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
+ chmod 0 /usr/bin/newaliases.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/mail/postfix/distinfo b/mail/postfix/distinfo
new file mode 100644
index 000000000000..0ff555aac014
--- /dev/null
+++ b/mail/postfix/distinfo
@@ -0,0 +1 @@
+MD5 (postfix-19990317-pl03.tar.gz) = d40f5773f4886ecbff40908588f07406
diff --git a/mail/postfix/files/patch-aa b/mail/postfix/files/patch-aa
new file mode 100644
index 000000000000..3af6375f1959
--- /dev/null
+++ b/mail/postfix/files/patch-aa
@@ -0,0 +1,36 @@
+*** global/mail_params.h.orig Sat Mar 20 15:09:46 1999
+--- global/mail_params.h Sat Mar 20 15:10:46 1999
+***************
+*** 127,133 ****
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "/usr/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+--- 127,133 ----
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "!!PREFIX!!/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+***************
+*** 161,167 ****
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
+--- 161,167 ----
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "!!PREFIX!!/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
diff --git a/mail/postfix/files/patch-ab b/mail/postfix/files/patch-ab
new file mode 100644
index 000000000000..6824371c251b
--- /dev/null
+++ b/mail/postfix/files/patch-ab
@@ -0,0 +1,74 @@
+*** conf/main.cf.orig Mon Mar 29 22:10:14 1999
+--- conf/main.cf Mon Mar 29 22:13:09 1999
+***************
+*** 18,36 ****
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = /some/where/postfix/bin
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! #command_directory = /usr/sbin
+
+ # The daemon_directory parameter specifies the location of all Postfix
+ # daemon programs (i.e. programs listed in the master.cf file). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! #daemon_directory = /usr/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+--- 18,36 ----
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = !!PREFIX!!/pbexec/postfix
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! 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). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! daemon_directory = !!PREFIX!!/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+***************
+*** 40,53 ****
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! #mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! #default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
+--- 40,53 ----
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
diff --git a/mail/postfix/files/patch-ba b/mail/postfix/files/patch-ba
new file mode 100644
index 000000000000..73feeef81f27
--- /dev/null
+++ b/mail/postfix/files/patch-ba
@@ -0,0 +1,19 @@
+*** man/man1/postdrop.1.orig Mon Mar 29 22:35:14 1999
+--- man/man1/postdrop.1 Mon Mar 29 22:35:25 1999
+***************
+*** 51,57 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 51,57 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix/files/patch-bb b/mail/postfix/files/patch-bb
new file mode 100644
index 000000000000..af024b23b3d9
--- /dev/null
+++ b/mail/postfix/files/patch-bb
@@ -0,0 +1,36 @@
+*** man/man1/sendmail.1.orig Mon Mar 29 22:35:30 1999
+--- man/man1/sendmail.1 Mon Mar 29 22:35:44 1999
+***************
+*** 60,66 ****
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+--- 60,66 ----
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB!!PREFIX!!/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+***************
+*** 164,170 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 164,170 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix/files/patch-bc b/mail/postfix/files/patch-bc
new file mode 100644
index 000000000000..12a369684c8f
--- /dev/null
+++ b/mail/postfix/files/patch-bc
@@ -0,0 +1,19 @@
+*** man/man5/access.5.orig Mon Mar 29 22:35:58 1999
+--- man/man5/access.5 Mon Mar 29 22:36:13 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix/files/patch-bd b/mail/postfix/files/patch-bd
new file mode 100644
index 000000000000..2b2f30f720f5
--- /dev/null
+++ b/mail/postfix/files/patch-bd
@@ -0,0 +1,19 @@
+*** man/man5/canonical.5.orig Mon Mar 29 22:36:25 1999
+--- man/man5/canonical.5 Mon Mar 29 22:36:32 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix/files/patch-be b/mail/postfix/files/patch-be
new file mode 100644
index 000000000000..354737c7e68d
--- /dev/null
+++ b/mail/postfix/files/patch-be
@@ -0,0 +1,19 @@
+*** man/man5/relocated.5.orig Mon Mar 29 22:36:36 1999
+--- man/man5/relocated.5 Mon Mar 29 22:36:47 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix/files/patch-bf b/mail/postfix/files/patch-bf
new file mode 100644
index 000000000000..4de817826469
--- /dev/null
+++ b/mail/postfix/files/patch-bf
@@ -0,0 +1,19 @@
+*** man/man5/virtual.5.orig Mon Mar 29 22:36:55 1999
+--- man/man5/virtual.5 Mon Mar 29 22:37:02 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix/files/patch-bg b/mail/postfix/files/patch-bg
new file mode 100644
index 000000000000..fb2b093bff0f
--- /dev/null
+++ b/mail/postfix/files/patch-bg
@@ -0,0 +1,19 @@
+*** man/man8/local.8.orig Mon Mar 29 22:37:14 1999
+--- man/man8/local.8 Mon Mar 29 22:37:44 1999
+***************
+*** 75,81 ****
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR or \fB/var/spool/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
+--- 75,81 ----
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
diff --git a/mail/postfix/files/patch-bh b/mail/postfix/files/patch-bh
new file mode 100644
index 000000000000..42b7373d3fb5
--- /dev/null
+++ b/mail/postfix/files/patch-bh
@@ -0,0 +1,21 @@
+*** man/man8/cleanup.8.orig Mon Mar 29 22:37:59 1999
+--- man/man8/cleanup.8 Mon Mar 29 22:38:13 1999
+***************
+*** 118,125 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/canonical*, canonical mapping table
+! /etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
+--- 118,125 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/canonical*, canonical mapping table
+! !!PREFIX!!/etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
diff --git a/mail/postfix/files/patch-bi b/mail/postfix/files/patch-bi
new file mode 100644
index 000000000000..2b57467ed976
--- /dev/null
+++ b/mail/postfix/files/patch-bi
@@ -0,0 +1,21 @@
+*** man/man8/master.8.orig Mon Mar 29 22:38:17 1999
+--- man/man8/master.8 Mon Mar 29 22:38:46 1999
+***************
+*** 116,123 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/main.cf: global configuration file.
+! /etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
+--- 116,123 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/main.cf: global configuration file.
+! !!PREFIX!!/etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
diff --git a/mail/postfix/pkg-comment b/mail/postfix/pkg-comment
new file mode 100644
index 000000000000..e9fea510ce32
--- /dev/null
+++ b/mail/postfix/pkg-comment
@@ -0,0 +1 @@
+Postfix aims to be an alternative to sendmail
diff --git a/mail/postfix/pkg-descr b/mail/postfix/pkg-descr
new file mode 100644
index 000000000000..fa5e129bf08b
--- /dev/null
+++ b/mail/postfix/pkg-descr
@@ -0,0 +1,6 @@
+Postfix aims to be an alternative to the widely-used sendmail
+program. Sendmail is responsible for 70% of all e-mail delivered
+on the Internet. With an estimated 100 million users, that's an
+estimated 10 billion (10^10) messages daily. A stunning number.
+
+See http://www.postfix.org/ for details
diff --git a/mail/postfix/pkg-install b/mail/postfix/pkg-install
new file mode 100644
index 000000000000..7b4849639b05
--- /dev/null
+++ b/mail/postfix/pkg-install
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+user=postfix
+group=postfix
+group2=maildrop
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
+else
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+chown root:maildrop ${PREFIX}/sbin/postdrop
+chmod 2755 ${PREFIX}/sbin/postdrop
diff --git a/mail/postfix/pkg-plist b/mail/postfix/pkg-plist
new file mode 100644
index 000000000000..28bc453e2bc2
--- /dev/null
+++ b/mail/postfix/pkg-plist
@@ -0,0 +1,49 @@
+etc/postfix/main.cf
+etc/postfix/LICENSE
+etc/postfix/sample-access
+etc/postfix/sample-main.cf
+etc/postfix/sample-master.cf
+etc/postfix/sample-aliases.cf
+etc/postfix/sample-canonical.cf
+etc/postfix/sample-debug.cf
+etc/postfix/sample-ldap.cf
+etc/postfix/sample-local.cf
+etc/postfix/sample-misc.cf
+etc/postfix/sample-pcre.cf
+etc/postfix/sample-rate.cf
+etc/postfix/sample-relocated.cf
+etc/postfix/sample-resource.cf
+etc/postfix/sample-rewrite.cf
+etc/postfix/sample-smtp.cf
+etc/postfix/sample-smtpd.cf
+etc/postfix/sample-transport.cf
+etc/postfix/sample-virtual.cf
+etc/postfix/postfix-script
+etc/postfix/master.cf
+libexec/postfix/bounce
+libexec/postfix/cleanup
+libexec/postfix/fsstone
+libexec/postfix/local
+libexec/postfix/master
+libexec/postfix/pickup
+libexec/postfix/pipe
+libexec/postfix/qmgr
+libexec/postfix/showq
+libexec/postfix/smtp
+libexec/postfix/smtp-sink
+libexec/postfix/smtp-source
+libexec/postfix/smtpd
+libexec/postfix/trivial-rewrite
+sbin/sendmail
+sbin/postalias
+sbin/postcat
+sbin/postconf
+sbin/postfix
+sbin/postkick
+sbin/postlock
+sbin/postlog
+sbin/postmap
+sbin/postsuper
+sbin/postdrop
+@exec mkdir -p -m 0755 /var/spool/postfix
+@exec chown root:wheel /var/spool/postfix
diff --git a/mail/postfix/scripts/configure b/mail/postfix/scripts/configure
new file mode 100644
index 000000000000..48d9220b478d
--- /dev/null
+++ b/mail/postfix/scripts/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $Id$
+
+mv ${WRKSRC}/global/mail_params.h ${WRKSRC}/global/mail_params.h.bak
+sed <${WRKSRC}/global/mail_params.h.bak >${WRKSRC}/global/mail_params.h s+!!PREFIX!!+$PREFIX+g
+
+mv ${WRKSRC}/conf/main.cf ${WRKSRC}/conf/main.cf.bak
+sed <${WRKSRC}/conf/main.cf.bak >${WRKSRC}/conf/main.cf
+
+cd ${WRKSRC}/man
+
+for f in ${MAN1} ; do
+ mv man1/$f man1/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man1/$f.bak | soelim >man1/$f
+done
+
+for f in ${MAN5} ; do
+ mv man5/$f man5/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man5/$f.bak | soelim >man5/$f
+done
+
+for f in ${MAN8} ; do
+ mv man8/$f man8/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man8/$f.bak | soelim >man8/$f
+done
diff --git a/mail/postfix1/Makefile b/mail/postfix1/Makefile
new file mode 100644
index 000000000000..8c8e340a8706
--- /dev/null
+++ b/mail/postfix1/Makefile
@@ -0,0 +1,122 @@
+# New ports collection makefile for: postfix
+# Version required: postfix 19990317-pl03
+# Date created: 18 Mar 1999
+# Whom: torstenb
+#
+# $Id$
+#
+
+DISTNAME= postfix-19990317-pl03
+PKGNAME= postfix-alpha-19990317.03
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.merit.edu/postfix/ \
+ ftp://ftp.snoopy.net/pub/mirrors/postfix/ \
+ ftp://ftp.reverse.net/pub/postfix/ \
+ ftp://postfix.eu.org/pub/postfix/ \
+ ftp://ftp.sunet.se/pub/unix/mail/postfix/ \
+ ftp://ftp.cs.tu-berlin.de/pub/net/mail/postfix/ \
+ ftp://ftp.postfix.oaktree.co.uk/pub/postfix/
+
+MAINTAINER= torstenb@FreeBSD.ORG
+
+ALL_TARGET= default
+
+SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
+
+MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
+ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
+ sendmail.1
+MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
+MAN8= bounce.8 cleanup.8 defer.8 local.8 master.8 pickup.8 pipe.8 qmgr.8 \
+ showq.8 smtp.8 smtpd.8 trivial-rewrite.8
+
+do-install:
+ @mkdir -p -m 755 ${PREFIX}/etc/postfix
+ @chown root:wheel ${PREFIX}/etc/postfix
+ @install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
+ ${PREFIX}/etc/postfix/LICENSE
+ @for f in access main.cf master.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/sample-$$f ; \
+ done
+ @exit
+ @for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
+ sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
+ sample-rate.cf sample-relocated.cf sample-resource.cf \
+ sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
+ sample-transport.cf sample-virtual.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/$$f ;\
+ done
+ @install -C -o root -g wheel -m 755 ${WRKSRC}/conf/postfix-script-sgid \
+ ${PREFIX}/etc/postfix/postfix-script
+ @mkdir -p -m 0755 ${PREFIX}/libexec/postfix
+ @for f in bounce cleanup fsstone local master pickup pipe \
+ qmgr showq smtp smtp-sink smtp-source smtpd \
+ trivial-rewrite ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/libexec/postfix/$$f ;\
+ done
+ @for f in sendmail postalias postcat postconf postfix \
+ postkick postlock postlog postmap postsuper ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/sbin/$$f ;\
+ done
+ @install -C -o root -g wheel -m 0555 ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
+ @for f in ${MAN1} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
+ ${PREFIX}/man/man1/$$f ;\
+ done
+ @for f in ${MAN5} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man5/$$f \
+ ${PREFIX}/man/man5/$$f ;\
+ done
+ @for f in ${MAN8} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man8/$$f \
+ ${PREFIX}/man/man8/$$f ;\
+ done
+ @mkdir -p -m 0755 /var/spool/postfix
+ @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
+ ${PREFIX}/etc/postfix/main.cf; \
+ fi
+ @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
+ ${PREFIX}/etc/postfix/master.cf; \
+ fi
+ @echo "--------------------------------------------------"
+ @echo "- To replace your existing sendmail with postfix -"
+ @echo "- type \"make replace\" "
+ @echo "--------------------------------------------------"
+
+post-install:
+ @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
+replace:
+ @echo "===> Replacing sendmail"
+ @if [ -e /usr/sbin/sendmail ]; then \
+ ${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
+ chmod 0 /usr/sbin/sendmail.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
+ fi
+ @echo "===> Replacing mailq"
+ @if [ -e /usr/bin/mailq ]; then \
+ ${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
+ chmod 0 /usr/bin/mailq.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
+ fi
+ @echo "===> Replacing newaliases"
+ @if [ -e /usr/bin/newaliases ]; then \
+ ${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
+ chmod 0 /usr/bin/newaliases.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/mail/postfix1/distinfo b/mail/postfix1/distinfo
new file mode 100644
index 000000000000..0ff555aac014
--- /dev/null
+++ b/mail/postfix1/distinfo
@@ -0,0 +1 @@
+MD5 (postfix-19990317-pl03.tar.gz) = d40f5773f4886ecbff40908588f07406
diff --git a/mail/postfix1/files/patch-aa b/mail/postfix1/files/patch-aa
new file mode 100644
index 000000000000..3af6375f1959
--- /dev/null
+++ b/mail/postfix1/files/patch-aa
@@ -0,0 +1,36 @@
+*** global/mail_params.h.orig Sat Mar 20 15:09:46 1999
+--- global/mail_params.h Sat Mar 20 15:10:46 1999
+***************
+*** 127,133 ****
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "/usr/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+--- 127,133 ----
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "!!PREFIX!!/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+***************
+*** 161,167 ****
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
+--- 161,167 ----
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "!!PREFIX!!/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
diff --git a/mail/postfix1/files/patch-ab b/mail/postfix1/files/patch-ab
new file mode 100644
index 000000000000..6824371c251b
--- /dev/null
+++ b/mail/postfix1/files/patch-ab
@@ -0,0 +1,74 @@
+*** conf/main.cf.orig Mon Mar 29 22:10:14 1999
+--- conf/main.cf Mon Mar 29 22:13:09 1999
+***************
+*** 18,36 ****
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = /some/where/postfix/bin
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! #command_directory = /usr/sbin
+
+ # The daemon_directory parameter specifies the location of all Postfix
+ # daemon programs (i.e. programs listed in the master.cf file). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! #daemon_directory = /usr/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+--- 18,36 ----
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = !!PREFIX!!/pbexec/postfix
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! 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). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! daemon_directory = !!PREFIX!!/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+***************
+*** 40,53 ****
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! #mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! #default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
+--- 40,53 ----
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
diff --git a/mail/postfix1/files/patch-ba b/mail/postfix1/files/patch-ba
new file mode 100644
index 000000000000..73feeef81f27
--- /dev/null
+++ b/mail/postfix1/files/patch-ba
@@ -0,0 +1,19 @@
+*** man/man1/postdrop.1.orig Mon Mar 29 22:35:14 1999
+--- man/man1/postdrop.1 Mon Mar 29 22:35:25 1999
+***************
+*** 51,57 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 51,57 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix1/files/patch-bb b/mail/postfix1/files/patch-bb
new file mode 100644
index 000000000000..af024b23b3d9
--- /dev/null
+++ b/mail/postfix1/files/patch-bb
@@ -0,0 +1,36 @@
+*** man/man1/sendmail.1.orig Mon Mar 29 22:35:30 1999
+--- man/man1/sendmail.1 Mon Mar 29 22:35:44 1999
+***************
+*** 60,66 ****
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+--- 60,66 ----
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB!!PREFIX!!/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+***************
+*** 164,170 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 164,170 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix1/files/patch-bc b/mail/postfix1/files/patch-bc
new file mode 100644
index 000000000000..12a369684c8f
--- /dev/null
+++ b/mail/postfix1/files/patch-bc
@@ -0,0 +1,19 @@
+*** man/man5/access.5.orig Mon Mar 29 22:35:58 1999
+--- man/man5/access.5 Mon Mar 29 22:36:13 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix1/files/patch-bd b/mail/postfix1/files/patch-bd
new file mode 100644
index 000000000000..2b2f30f720f5
--- /dev/null
+++ b/mail/postfix1/files/patch-bd
@@ -0,0 +1,19 @@
+*** man/man5/canonical.5.orig Mon Mar 29 22:36:25 1999
+--- man/man5/canonical.5 Mon Mar 29 22:36:32 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix1/files/patch-be b/mail/postfix1/files/patch-be
new file mode 100644
index 000000000000..354737c7e68d
--- /dev/null
+++ b/mail/postfix1/files/patch-be
@@ -0,0 +1,19 @@
+*** man/man5/relocated.5.orig Mon Mar 29 22:36:36 1999
+--- man/man5/relocated.5 Mon Mar 29 22:36:47 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix1/files/patch-bf b/mail/postfix1/files/patch-bf
new file mode 100644
index 000000000000..4de817826469
--- /dev/null
+++ b/mail/postfix1/files/patch-bf
@@ -0,0 +1,19 @@
+*** man/man5/virtual.5.orig Mon Mar 29 22:36:55 1999
+--- man/man5/virtual.5 Mon Mar 29 22:37:02 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix1/files/patch-bg b/mail/postfix1/files/patch-bg
new file mode 100644
index 000000000000..fb2b093bff0f
--- /dev/null
+++ b/mail/postfix1/files/patch-bg
@@ -0,0 +1,19 @@
+*** man/man8/local.8.orig Mon Mar 29 22:37:14 1999
+--- man/man8/local.8 Mon Mar 29 22:37:44 1999
+***************
+*** 75,81 ****
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR or \fB/var/spool/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
+--- 75,81 ----
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
diff --git a/mail/postfix1/files/patch-bh b/mail/postfix1/files/patch-bh
new file mode 100644
index 000000000000..42b7373d3fb5
--- /dev/null
+++ b/mail/postfix1/files/patch-bh
@@ -0,0 +1,21 @@
+*** man/man8/cleanup.8.orig Mon Mar 29 22:37:59 1999
+--- man/man8/cleanup.8 Mon Mar 29 22:38:13 1999
+***************
+*** 118,125 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/canonical*, canonical mapping table
+! /etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
+--- 118,125 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/canonical*, canonical mapping table
+! !!PREFIX!!/etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
diff --git a/mail/postfix1/files/patch-bi b/mail/postfix1/files/patch-bi
new file mode 100644
index 000000000000..2b57467ed976
--- /dev/null
+++ b/mail/postfix1/files/patch-bi
@@ -0,0 +1,21 @@
+*** man/man8/master.8.orig Mon Mar 29 22:38:17 1999
+--- man/man8/master.8 Mon Mar 29 22:38:46 1999
+***************
+*** 116,123 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/main.cf: global configuration file.
+! /etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
+--- 116,123 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/main.cf: global configuration file.
+! !!PREFIX!!/etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
diff --git a/mail/postfix1/pkg-comment b/mail/postfix1/pkg-comment
new file mode 100644
index 000000000000..e9fea510ce32
--- /dev/null
+++ b/mail/postfix1/pkg-comment
@@ -0,0 +1 @@
+Postfix aims to be an alternative to sendmail
diff --git a/mail/postfix1/pkg-descr b/mail/postfix1/pkg-descr
new file mode 100644
index 000000000000..fa5e129bf08b
--- /dev/null
+++ b/mail/postfix1/pkg-descr
@@ -0,0 +1,6 @@
+Postfix aims to be an alternative to the widely-used sendmail
+program. Sendmail is responsible for 70% of all e-mail delivered
+on the Internet. With an estimated 100 million users, that's an
+estimated 10 billion (10^10) messages daily. A stunning number.
+
+See http://www.postfix.org/ for details
diff --git a/mail/postfix1/pkg-install b/mail/postfix1/pkg-install
new file mode 100644
index 000000000000..7b4849639b05
--- /dev/null
+++ b/mail/postfix1/pkg-install
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+user=postfix
+group=postfix
+group2=maildrop
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
+else
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+chown root:maildrop ${PREFIX}/sbin/postdrop
+chmod 2755 ${PREFIX}/sbin/postdrop
diff --git a/mail/postfix1/pkg-plist b/mail/postfix1/pkg-plist
new file mode 100644
index 000000000000..28bc453e2bc2
--- /dev/null
+++ b/mail/postfix1/pkg-plist
@@ -0,0 +1,49 @@
+etc/postfix/main.cf
+etc/postfix/LICENSE
+etc/postfix/sample-access
+etc/postfix/sample-main.cf
+etc/postfix/sample-master.cf
+etc/postfix/sample-aliases.cf
+etc/postfix/sample-canonical.cf
+etc/postfix/sample-debug.cf
+etc/postfix/sample-ldap.cf
+etc/postfix/sample-local.cf
+etc/postfix/sample-misc.cf
+etc/postfix/sample-pcre.cf
+etc/postfix/sample-rate.cf
+etc/postfix/sample-relocated.cf
+etc/postfix/sample-resource.cf
+etc/postfix/sample-rewrite.cf
+etc/postfix/sample-smtp.cf
+etc/postfix/sample-smtpd.cf
+etc/postfix/sample-transport.cf
+etc/postfix/sample-virtual.cf
+etc/postfix/postfix-script
+etc/postfix/master.cf
+libexec/postfix/bounce
+libexec/postfix/cleanup
+libexec/postfix/fsstone
+libexec/postfix/local
+libexec/postfix/master
+libexec/postfix/pickup
+libexec/postfix/pipe
+libexec/postfix/qmgr
+libexec/postfix/showq
+libexec/postfix/smtp
+libexec/postfix/smtp-sink
+libexec/postfix/smtp-source
+libexec/postfix/smtpd
+libexec/postfix/trivial-rewrite
+sbin/sendmail
+sbin/postalias
+sbin/postcat
+sbin/postconf
+sbin/postfix
+sbin/postkick
+sbin/postlock
+sbin/postlog
+sbin/postmap
+sbin/postsuper
+sbin/postdrop
+@exec mkdir -p -m 0755 /var/spool/postfix
+@exec chown root:wheel /var/spool/postfix
diff --git a/mail/postfix1/scripts/configure b/mail/postfix1/scripts/configure
new file mode 100644
index 000000000000..48d9220b478d
--- /dev/null
+++ b/mail/postfix1/scripts/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $Id$
+
+mv ${WRKSRC}/global/mail_params.h ${WRKSRC}/global/mail_params.h.bak
+sed <${WRKSRC}/global/mail_params.h.bak >${WRKSRC}/global/mail_params.h s+!!PREFIX!!+$PREFIX+g
+
+mv ${WRKSRC}/conf/main.cf ${WRKSRC}/conf/main.cf.bak
+sed <${WRKSRC}/conf/main.cf.bak >${WRKSRC}/conf/main.cf
+
+cd ${WRKSRC}/man
+
+for f in ${MAN1} ; do
+ mv man1/$f man1/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man1/$f.bak | soelim >man1/$f
+done
+
+for f in ${MAN5} ; do
+ mv man5/$f man5/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man5/$f.bak | soelim >man5/$f
+done
+
+for f in ${MAN8} ; do
+ mv man8/$f man8/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man8/$f.bak | soelim >man8/$f
+done
diff --git a/mail/postfix20/Makefile b/mail/postfix20/Makefile
new file mode 100644
index 000000000000..8c8e340a8706
--- /dev/null
+++ b/mail/postfix20/Makefile
@@ -0,0 +1,122 @@
+# New ports collection makefile for: postfix
+# Version required: postfix 19990317-pl03
+# Date created: 18 Mar 1999
+# Whom: torstenb
+#
+# $Id$
+#
+
+DISTNAME= postfix-19990317-pl03
+PKGNAME= postfix-alpha-19990317.03
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.merit.edu/postfix/ \
+ ftp://ftp.snoopy.net/pub/mirrors/postfix/ \
+ ftp://ftp.reverse.net/pub/postfix/ \
+ ftp://postfix.eu.org/pub/postfix/ \
+ ftp://ftp.sunet.se/pub/unix/mail/postfix/ \
+ ftp://ftp.cs.tu-berlin.de/pub/net/mail/postfix/ \
+ ftp://ftp.postfix.oaktree.co.uk/pub/postfix/
+
+MAINTAINER= torstenb@FreeBSD.ORG
+
+ALL_TARGET= default
+
+SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
+
+MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
+ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
+ sendmail.1
+MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
+MAN8= bounce.8 cleanup.8 defer.8 local.8 master.8 pickup.8 pipe.8 qmgr.8 \
+ showq.8 smtp.8 smtpd.8 trivial-rewrite.8
+
+do-install:
+ @mkdir -p -m 755 ${PREFIX}/etc/postfix
+ @chown root:wheel ${PREFIX}/etc/postfix
+ @install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
+ ${PREFIX}/etc/postfix/LICENSE
+ @for f in access main.cf master.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/sample-$$f ; \
+ done
+ @exit
+ @for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
+ sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
+ sample-rate.cf sample-relocated.cf sample-resource.cf \
+ sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
+ sample-transport.cf sample-virtual.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/$$f ;\
+ done
+ @install -C -o root -g wheel -m 755 ${WRKSRC}/conf/postfix-script-sgid \
+ ${PREFIX}/etc/postfix/postfix-script
+ @mkdir -p -m 0755 ${PREFIX}/libexec/postfix
+ @for f in bounce cleanup fsstone local master pickup pipe \
+ qmgr showq smtp smtp-sink smtp-source smtpd \
+ trivial-rewrite ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/libexec/postfix/$$f ;\
+ done
+ @for f in sendmail postalias postcat postconf postfix \
+ postkick postlock postlog postmap postsuper ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/sbin/$$f ;\
+ done
+ @install -C -o root -g wheel -m 0555 ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
+ @for f in ${MAN1} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
+ ${PREFIX}/man/man1/$$f ;\
+ done
+ @for f in ${MAN5} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man5/$$f \
+ ${PREFIX}/man/man5/$$f ;\
+ done
+ @for f in ${MAN8} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man8/$$f \
+ ${PREFIX}/man/man8/$$f ;\
+ done
+ @mkdir -p -m 0755 /var/spool/postfix
+ @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
+ ${PREFIX}/etc/postfix/main.cf; \
+ fi
+ @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
+ ${PREFIX}/etc/postfix/master.cf; \
+ fi
+ @echo "--------------------------------------------------"
+ @echo "- To replace your existing sendmail with postfix -"
+ @echo "- type \"make replace\" "
+ @echo "--------------------------------------------------"
+
+post-install:
+ @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
+replace:
+ @echo "===> Replacing sendmail"
+ @if [ -e /usr/sbin/sendmail ]; then \
+ ${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
+ chmod 0 /usr/sbin/sendmail.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
+ fi
+ @echo "===> Replacing mailq"
+ @if [ -e /usr/bin/mailq ]; then \
+ ${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
+ chmod 0 /usr/bin/mailq.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
+ fi
+ @echo "===> Replacing newaliases"
+ @if [ -e /usr/bin/newaliases ]; then \
+ ${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
+ chmod 0 /usr/bin/newaliases.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/mail/postfix20/distinfo b/mail/postfix20/distinfo
new file mode 100644
index 000000000000..0ff555aac014
--- /dev/null
+++ b/mail/postfix20/distinfo
@@ -0,0 +1 @@
+MD5 (postfix-19990317-pl03.tar.gz) = d40f5773f4886ecbff40908588f07406
diff --git a/mail/postfix20/files/patch-aa b/mail/postfix20/files/patch-aa
new file mode 100644
index 000000000000..3af6375f1959
--- /dev/null
+++ b/mail/postfix20/files/patch-aa
@@ -0,0 +1,36 @@
+*** global/mail_params.h.orig Sat Mar 20 15:09:46 1999
+--- global/mail_params.h Sat Mar 20 15:10:46 1999
+***************
+*** 127,133 ****
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "/usr/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+--- 127,133 ----
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "!!PREFIX!!/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+***************
+*** 161,167 ****
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
+--- 161,167 ----
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "!!PREFIX!!/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
diff --git a/mail/postfix20/files/patch-ab b/mail/postfix20/files/patch-ab
new file mode 100644
index 000000000000..6824371c251b
--- /dev/null
+++ b/mail/postfix20/files/patch-ab
@@ -0,0 +1,74 @@
+*** conf/main.cf.orig Mon Mar 29 22:10:14 1999
+--- conf/main.cf Mon Mar 29 22:13:09 1999
+***************
+*** 18,36 ****
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = /some/where/postfix/bin
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! #command_directory = /usr/sbin
+
+ # The daemon_directory parameter specifies the location of all Postfix
+ # daemon programs (i.e. programs listed in the master.cf file). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! #daemon_directory = /usr/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+--- 18,36 ----
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = !!PREFIX!!/pbexec/postfix
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! 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). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! daemon_directory = !!PREFIX!!/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+***************
+*** 40,53 ****
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! #mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! #default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
+--- 40,53 ----
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
diff --git a/mail/postfix20/files/patch-ba b/mail/postfix20/files/patch-ba
new file mode 100644
index 000000000000..73feeef81f27
--- /dev/null
+++ b/mail/postfix20/files/patch-ba
@@ -0,0 +1,19 @@
+*** man/man1/postdrop.1.orig Mon Mar 29 22:35:14 1999
+--- man/man1/postdrop.1 Mon Mar 29 22:35:25 1999
+***************
+*** 51,57 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 51,57 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix20/files/patch-bb b/mail/postfix20/files/patch-bb
new file mode 100644
index 000000000000..af024b23b3d9
--- /dev/null
+++ b/mail/postfix20/files/patch-bb
@@ -0,0 +1,36 @@
+*** man/man1/sendmail.1.orig Mon Mar 29 22:35:30 1999
+--- man/man1/sendmail.1 Mon Mar 29 22:35:44 1999
+***************
+*** 60,66 ****
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+--- 60,66 ----
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB!!PREFIX!!/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+***************
+*** 164,170 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 164,170 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix20/files/patch-bc b/mail/postfix20/files/patch-bc
new file mode 100644
index 000000000000..12a369684c8f
--- /dev/null
+++ b/mail/postfix20/files/patch-bc
@@ -0,0 +1,19 @@
+*** man/man5/access.5.orig Mon Mar 29 22:35:58 1999
+--- man/man5/access.5 Mon Mar 29 22:36:13 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix20/files/patch-bd b/mail/postfix20/files/patch-bd
new file mode 100644
index 000000000000..2b2f30f720f5
--- /dev/null
+++ b/mail/postfix20/files/patch-bd
@@ -0,0 +1,19 @@
+*** man/man5/canonical.5.orig Mon Mar 29 22:36:25 1999
+--- man/man5/canonical.5 Mon Mar 29 22:36:32 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix20/files/patch-be b/mail/postfix20/files/patch-be
new file mode 100644
index 000000000000..354737c7e68d
--- /dev/null
+++ b/mail/postfix20/files/patch-be
@@ -0,0 +1,19 @@
+*** man/man5/relocated.5.orig Mon Mar 29 22:36:36 1999
+--- man/man5/relocated.5 Mon Mar 29 22:36:47 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix20/files/patch-bf b/mail/postfix20/files/patch-bf
new file mode 100644
index 000000000000..4de817826469
--- /dev/null
+++ b/mail/postfix20/files/patch-bf
@@ -0,0 +1,19 @@
+*** man/man5/virtual.5.orig Mon Mar 29 22:36:55 1999
+--- man/man5/virtual.5 Mon Mar 29 22:37:02 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix20/files/patch-bg b/mail/postfix20/files/patch-bg
new file mode 100644
index 000000000000..fb2b093bff0f
--- /dev/null
+++ b/mail/postfix20/files/patch-bg
@@ -0,0 +1,19 @@
+*** man/man8/local.8.orig Mon Mar 29 22:37:14 1999
+--- man/man8/local.8 Mon Mar 29 22:37:44 1999
+***************
+*** 75,81 ****
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR or \fB/var/spool/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
+--- 75,81 ----
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
diff --git a/mail/postfix20/files/patch-bh b/mail/postfix20/files/patch-bh
new file mode 100644
index 000000000000..42b7373d3fb5
--- /dev/null
+++ b/mail/postfix20/files/patch-bh
@@ -0,0 +1,21 @@
+*** man/man8/cleanup.8.orig Mon Mar 29 22:37:59 1999
+--- man/man8/cleanup.8 Mon Mar 29 22:38:13 1999
+***************
+*** 118,125 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/canonical*, canonical mapping table
+! /etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
+--- 118,125 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/canonical*, canonical mapping table
+! !!PREFIX!!/etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
diff --git a/mail/postfix20/files/patch-bi b/mail/postfix20/files/patch-bi
new file mode 100644
index 000000000000..2b57467ed976
--- /dev/null
+++ b/mail/postfix20/files/patch-bi
@@ -0,0 +1,21 @@
+*** man/man8/master.8.orig Mon Mar 29 22:38:17 1999
+--- man/man8/master.8 Mon Mar 29 22:38:46 1999
+***************
+*** 116,123 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/main.cf: global configuration file.
+! /etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
+--- 116,123 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/main.cf: global configuration file.
+! !!PREFIX!!/etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
diff --git a/mail/postfix20/pkg-comment b/mail/postfix20/pkg-comment
new file mode 100644
index 000000000000..e9fea510ce32
--- /dev/null
+++ b/mail/postfix20/pkg-comment
@@ -0,0 +1 @@
+Postfix aims to be an alternative to sendmail
diff --git a/mail/postfix20/pkg-descr b/mail/postfix20/pkg-descr
new file mode 100644
index 000000000000..fa5e129bf08b
--- /dev/null
+++ b/mail/postfix20/pkg-descr
@@ -0,0 +1,6 @@
+Postfix aims to be an alternative to the widely-used sendmail
+program. Sendmail is responsible for 70% of all e-mail delivered
+on the Internet. With an estimated 100 million users, that's an
+estimated 10 billion (10^10) messages daily. A stunning number.
+
+See http://www.postfix.org/ for details
diff --git a/mail/postfix20/pkg-install b/mail/postfix20/pkg-install
new file mode 100644
index 000000000000..7b4849639b05
--- /dev/null
+++ b/mail/postfix20/pkg-install
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+user=postfix
+group=postfix
+group2=maildrop
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
+else
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+chown root:maildrop ${PREFIX}/sbin/postdrop
+chmod 2755 ${PREFIX}/sbin/postdrop
diff --git a/mail/postfix20/pkg-plist b/mail/postfix20/pkg-plist
new file mode 100644
index 000000000000..28bc453e2bc2
--- /dev/null
+++ b/mail/postfix20/pkg-plist
@@ -0,0 +1,49 @@
+etc/postfix/main.cf
+etc/postfix/LICENSE
+etc/postfix/sample-access
+etc/postfix/sample-main.cf
+etc/postfix/sample-master.cf
+etc/postfix/sample-aliases.cf
+etc/postfix/sample-canonical.cf
+etc/postfix/sample-debug.cf
+etc/postfix/sample-ldap.cf
+etc/postfix/sample-local.cf
+etc/postfix/sample-misc.cf
+etc/postfix/sample-pcre.cf
+etc/postfix/sample-rate.cf
+etc/postfix/sample-relocated.cf
+etc/postfix/sample-resource.cf
+etc/postfix/sample-rewrite.cf
+etc/postfix/sample-smtp.cf
+etc/postfix/sample-smtpd.cf
+etc/postfix/sample-transport.cf
+etc/postfix/sample-virtual.cf
+etc/postfix/postfix-script
+etc/postfix/master.cf
+libexec/postfix/bounce
+libexec/postfix/cleanup
+libexec/postfix/fsstone
+libexec/postfix/local
+libexec/postfix/master
+libexec/postfix/pickup
+libexec/postfix/pipe
+libexec/postfix/qmgr
+libexec/postfix/showq
+libexec/postfix/smtp
+libexec/postfix/smtp-sink
+libexec/postfix/smtp-source
+libexec/postfix/smtpd
+libexec/postfix/trivial-rewrite
+sbin/sendmail
+sbin/postalias
+sbin/postcat
+sbin/postconf
+sbin/postfix
+sbin/postkick
+sbin/postlock
+sbin/postlog
+sbin/postmap
+sbin/postsuper
+sbin/postdrop
+@exec mkdir -p -m 0755 /var/spool/postfix
+@exec chown root:wheel /var/spool/postfix
diff --git a/mail/postfix20/scripts/configure b/mail/postfix20/scripts/configure
new file mode 100644
index 000000000000..48d9220b478d
--- /dev/null
+++ b/mail/postfix20/scripts/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $Id$
+
+mv ${WRKSRC}/global/mail_params.h ${WRKSRC}/global/mail_params.h.bak
+sed <${WRKSRC}/global/mail_params.h.bak >${WRKSRC}/global/mail_params.h s+!!PREFIX!!+$PREFIX+g
+
+mv ${WRKSRC}/conf/main.cf ${WRKSRC}/conf/main.cf.bak
+sed <${WRKSRC}/conf/main.cf.bak >${WRKSRC}/conf/main.cf
+
+cd ${WRKSRC}/man
+
+for f in ${MAN1} ; do
+ mv man1/$f man1/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man1/$f.bak | soelim >man1/$f
+done
+
+for f in ${MAN5} ; do
+ mv man5/$f man5/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man5/$f.bak | soelim >man5/$f
+done
+
+for f in ${MAN8} ; do
+ mv man8/$f man8/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man8/$f.bak | soelim >man8/$f
+done
diff --git a/mail/postfix21/Makefile b/mail/postfix21/Makefile
new file mode 100644
index 000000000000..8c8e340a8706
--- /dev/null
+++ b/mail/postfix21/Makefile
@@ -0,0 +1,122 @@
+# New ports collection makefile for: postfix
+# Version required: postfix 19990317-pl03
+# Date created: 18 Mar 1999
+# Whom: torstenb
+#
+# $Id$
+#
+
+DISTNAME= postfix-19990317-pl03
+PKGNAME= postfix-alpha-19990317.03
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.merit.edu/postfix/ \
+ ftp://ftp.snoopy.net/pub/mirrors/postfix/ \
+ ftp://ftp.reverse.net/pub/postfix/ \
+ ftp://postfix.eu.org/pub/postfix/ \
+ ftp://ftp.sunet.se/pub/unix/mail/postfix/ \
+ ftp://ftp.cs.tu-berlin.de/pub/net/mail/postfix/ \
+ ftp://ftp.postfix.oaktree.co.uk/pub/postfix/
+
+MAINTAINER= torstenb@FreeBSD.ORG
+
+ALL_TARGET= default
+
+SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
+
+MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
+ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
+ sendmail.1
+MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
+MAN8= bounce.8 cleanup.8 defer.8 local.8 master.8 pickup.8 pipe.8 qmgr.8 \
+ showq.8 smtp.8 smtpd.8 trivial-rewrite.8
+
+do-install:
+ @mkdir -p -m 755 ${PREFIX}/etc/postfix
+ @chown root:wheel ${PREFIX}/etc/postfix
+ @install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
+ ${PREFIX}/etc/postfix/LICENSE
+ @for f in access main.cf master.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/sample-$$f ; \
+ done
+ @exit
+ @for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
+ sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
+ sample-rate.cf sample-relocated.cf sample-resource.cf \
+ sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
+ sample-transport.cf sample-virtual.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/$$f ;\
+ done
+ @install -C -o root -g wheel -m 755 ${WRKSRC}/conf/postfix-script-sgid \
+ ${PREFIX}/etc/postfix/postfix-script
+ @mkdir -p -m 0755 ${PREFIX}/libexec/postfix
+ @for f in bounce cleanup fsstone local master pickup pipe \
+ qmgr showq smtp smtp-sink smtp-source smtpd \
+ trivial-rewrite ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/libexec/postfix/$$f ;\
+ done
+ @for f in sendmail postalias postcat postconf postfix \
+ postkick postlock postlog postmap postsuper ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/sbin/$$f ;\
+ done
+ @install -C -o root -g wheel -m 0555 ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
+ @for f in ${MAN1} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
+ ${PREFIX}/man/man1/$$f ;\
+ done
+ @for f in ${MAN5} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man5/$$f \
+ ${PREFIX}/man/man5/$$f ;\
+ done
+ @for f in ${MAN8} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man8/$$f \
+ ${PREFIX}/man/man8/$$f ;\
+ done
+ @mkdir -p -m 0755 /var/spool/postfix
+ @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
+ ${PREFIX}/etc/postfix/main.cf; \
+ fi
+ @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
+ ${PREFIX}/etc/postfix/master.cf; \
+ fi
+ @echo "--------------------------------------------------"
+ @echo "- To replace your existing sendmail with postfix -"
+ @echo "- type \"make replace\" "
+ @echo "--------------------------------------------------"
+
+post-install:
+ @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
+replace:
+ @echo "===> Replacing sendmail"
+ @if [ -e /usr/sbin/sendmail ]; then \
+ ${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
+ chmod 0 /usr/sbin/sendmail.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
+ fi
+ @echo "===> Replacing mailq"
+ @if [ -e /usr/bin/mailq ]; then \
+ ${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
+ chmod 0 /usr/bin/mailq.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
+ fi
+ @echo "===> Replacing newaliases"
+ @if [ -e /usr/bin/newaliases ]; then \
+ ${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
+ chmod 0 /usr/bin/newaliases.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/mail/postfix21/distinfo b/mail/postfix21/distinfo
new file mode 100644
index 000000000000..0ff555aac014
--- /dev/null
+++ b/mail/postfix21/distinfo
@@ -0,0 +1 @@
+MD5 (postfix-19990317-pl03.tar.gz) = d40f5773f4886ecbff40908588f07406
diff --git a/mail/postfix21/files/patch-aa b/mail/postfix21/files/patch-aa
new file mode 100644
index 000000000000..3af6375f1959
--- /dev/null
+++ b/mail/postfix21/files/patch-aa
@@ -0,0 +1,36 @@
+*** global/mail_params.h.orig Sat Mar 20 15:09:46 1999
+--- global/mail_params.h Sat Mar 20 15:10:46 1999
+***************
+*** 127,133 ****
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "/usr/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+--- 127,133 ----
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "!!PREFIX!!/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+***************
+*** 161,167 ****
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
+--- 161,167 ----
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "!!PREFIX!!/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
diff --git a/mail/postfix21/files/patch-ab b/mail/postfix21/files/patch-ab
new file mode 100644
index 000000000000..6824371c251b
--- /dev/null
+++ b/mail/postfix21/files/patch-ab
@@ -0,0 +1,74 @@
+*** conf/main.cf.orig Mon Mar 29 22:10:14 1999
+--- conf/main.cf Mon Mar 29 22:13:09 1999
+***************
+*** 18,36 ****
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = /some/where/postfix/bin
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! #command_directory = /usr/sbin
+
+ # The daemon_directory parameter specifies the location of all Postfix
+ # daemon programs (i.e. programs listed in the master.cf file). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! #daemon_directory = /usr/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+--- 18,36 ----
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = !!PREFIX!!/pbexec/postfix
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! 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). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! daemon_directory = !!PREFIX!!/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+***************
+*** 40,53 ****
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! #mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! #default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
+--- 40,53 ----
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
diff --git a/mail/postfix21/files/patch-ba b/mail/postfix21/files/patch-ba
new file mode 100644
index 000000000000..73feeef81f27
--- /dev/null
+++ b/mail/postfix21/files/patch-ba
@@ -0,0 +1,19 @@
+*** man/man1/postdrop.1.orig Mon Mar 29 22:35:14 1999
+--- man/man1/postdrop.1 Mon Mar 29 22:35:25 1999
+***************
+*** 51,57 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 51,57 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix21/files/patch-bb b/mail/postfix21/files/patch-bb
new file mode 100644
index 000000000000..af024b23b3d9
--- /dev/null
+++ b/mail/postfix21/files/patch-bb
@@ -0,0 +1,36 @@
+*** man/man1/sendmail.1.orig Mon Mar 29 22:35:30 1999
+--- man/man1/sendmail.1 Mon Mar 29 22:35:44 1999
+***************
+*** 60,66 ****
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+--- 60,66 ----
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB!!PREFIX!!/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+***************
+*** 164,170 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 164,170 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix21/files/patch-bc b/mail/postfix21/files/patch-bc
new file mode 100644
index 000000000000..12a369684c8f
--- /dev/null
+++ b/mail/postfix21/files/patch-bc
@@ -0,0 +1,19 @@
+*** man/man5/access.5.orig Mon Mar 29 22:35:58 1999
+--- man/man5/access.5 Mon Mar 29 22:36:13 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix21/files/patch-bd b/mail/postfix21/files/patch-bd
new file mode 100644
index 000000000000..2b2f30f720f5
--- /dev/null
+++ b/mail/postfix21/files/patch-bd
@@ -0,0 +1,19 @@
+*** man/man5/canonical.5.orig Mon Mar 29 22:36:25 1999
+--- man/man5/canonical.5 Mon Mar 29 22:36:32 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix21/files/patch-be b/mail/postfix21/files/patch-be
new file mode 100644
index 000000000000..354737c7e68d
--- /dev/null
+++ b/mail/postfix21/files/patch-be
@@ -0,0 +1,19 @@
+*** man/man5/relocated.5.orig Mon Mar 29 22:36:36 1999
+--- man/man5/relocated.5 Mon Mar 29 22:36:47 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix21/files/patch-bf b/mail/postfix21/files/patch-bf
new file mode 100644
index 000000000000..4de817826469
--- /dev/null
+++ b/mail/postfix21/files/patch-bf
@@ -0,0 +1,19 @@
+*** man/man5/virtual.5.orig Mon Mar 29 22:36:55 1999
+--- man/man5/virtual.5 Mon Mar 29 22:37:02 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix21/files/patch-bg b/mail/postfix21/files/patch-bg
new file mode 100644
index 000000000000..fb2b093bff0f
--- /dev/null
+++ b/mail/postfix21/files/patch-bg
@@ -0,0 +1,19 @@
+*** man/man8/local.8.orig Mon Mar 29 22:37:14 1999
+--- man/man8/local.8 Mon Mar 29 22:37:44 1999
+***************
+*** 75,81 ****
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR or \fB/var/spool/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
+--- 75,81 ----
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
diff --git a/mail/postfix21/files/patch-bh b/mail/postfix21/files/patch-bh
new file mode 100644
index 000000000000..42b7373d3fb5
--- /dev/null
+++ b/mail/postfix21/files/patch-bh
@@ -0,0 +1,21 @@
+*** man/man8/cleanup.8.orig Mon Mar 29 22:37:59 1999
+--- man/man8/cleanup.8 Mon Mar 29 22:38:13 1999
+***************
+*** 118,125 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/canonical*, canonical mapping table
+! /etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
+--- 118,125 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/canonical*, canonical mapping table
+! !!PREFIX!!/etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
diff --git a/mail/postfix21/files/patch-bi b/mail/postfix21/files/patch-bi
new file mode 100644
index 000000000000..2b57467ed976
--- /dev/null
+++ b/mail/postfix21/files/patch-bi
@@ -0,0 +1,21 @@
+*** man/man8/master.8.orig Mon Mar 29 22:38:17 1999
+--- man/man8/master.8 Mon Mar 29 22:38:46 1999
+***************
+*** 116,123 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/main.cf: global configuration file.
+! /etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
+--- 116,123 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/main.cf: global configuration file.
+! !!PREFIX!!/etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
diff --git a/mail/postfix21/pkg-comment b/mail/postfix21/pkg-comment
new file mode 100644
index 000000000000..e9fea510ce32
--- /dev/null
+++ b/mail/postfix21/pkg-comment
@@ -0,0 +1 @@
+Postfix aims to be an alternative to sendmail
diff --git a/mail/postfix21/pkg-descr b/mail/postfix21/pkg-descr
new file mode 100644
index 000000000000..fa5e129bf08b
--- /dev/null
+++ b/mail/postfix21/pkg-descr
@@ -0,0 +1,6 @@
+Postfix aims to be an alternative to the widely-used sendmail
+program. Sendmail is responsible for 70% of all e-mail delivered
+on the Internet. With an estimated 100 million users, that's an
+estimated 10 billion (10^10) messages daily. A stunning number.
+
+See http://www.postfix.org/ for details
diff --git a/mail/postfix21/pkg-install b/mail/postfix21/pkg-install
new file mode 100644
index 000000000000..7b4849639b05
--- /dev/null
+++ b/mail/postfix21/pkg-install
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+user=postfix
+group=postfix
+group2=maildrop
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
+else
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+chown root:maildrop ${PREFIX}/sbin/postdrop
+chmod 2755 ${PREFIX}/sbin/postdrop
diff --git a/mail/postfix21/pkg-plist b/mail/postfix21/pkg-plist
new file mode 100644
index 000000000000..28bc453e2bc2
--- /dev/null
+++ b/mail/postfix21/pkg-plist
@@ -0,0 +1,49 @@
+etc/postfix/main.cf
+etc/postfix/LICENSE
+etc/postfix/sample-access
+etc/postfix/sample-main.cf
+etc/postfix/sample-master.cf
+etc/postfix/sample-aliases.cf
+etc/postfix/sample-canonical.cf
+etc/postfix/sample-debug.cf
+etc/postfix/sample-ldap.cf
+etc/postfix/sample-local.cf
+etc/postfix/sample-misc.cf
+etc/postfix/sample-pcre.cf
+etc/postfix/sample-rate.cf
+etc/postfix/sample-relocated.cf
+etc/postfix/sample-resource.cf
+etc/postfix/sample-rewrite.cf
+etc/postfix/sample-smtp.cf
+etc/postfix/sample-smtpd.cf
+etc/postfix/sample-transport.cf
+etc/postfix/sample-virtual.cf
+etc/postfix/postfix-script
+etc/postfix/master.cf
+libexec/postfix/bounce
+libexec/postfix/cleanup
+libexec/postfix/fsstone
+libexec/postfix/local
+libexec/postfix/master
+libexec/postfix/pickup
+libexec/postfix/pipe
+libexec/postfix/qmgr
+libexec/postfix/showq
+libexec/postfix/smtp
+libexec/postfix/smtp-sink
+libexec/postfix/smtp-source
+libexec/postfix/smtpd
+libexec/postfix/trivial-rewrite
+sbin/sendmail
+sbin/postalias
+sbin/postcat
+sbin/postconf
+sbin/postfix
+sbin/postkick
+sbin/postlock
+sbin/postlog
+sbin/postmap
+sbin/postsuper
+sbin/postdrop
+@exec mkdir -p -m 0755 /var/spool/postfix
+@exec chown root:wheel /var/spool/postfix
diff --git a/mail/postfix21/scripts/configure b/mail/postfix21/scripts/configure
new file mode 100644
index 000000000000..48d9220b478d
--- /dev/null
+++ b/mail/postfix21/scripts/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $Id$
+
+mv ${WRKSRC}/global/mail_params.h ${WRKSRC}/global/mail_params.h.bak
+sed <${WRKSRC}/global/mail_params.h.bak >${WRKSRC}/global/mail_params.h s+!!PREFIX!!+$PREFIX+g
+
+mv ${WRKSRC}/conf/main.cf ${WRKSRC}/conf/main.cf.bak
+sed <${WRKSRC}/conf/main.cf.bak >${WRKSRC}/conf/main.cf
+
+cd ${WRKSRC}/man
+
+for f in ${MAN1} ; do
+ mv man1/$f man1/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man1/$f.bak | soelim >man1/$f
+done
+
+for f in ${MAN5} ; do
+ mv man5/$f man5/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man5/$f.bak | soelim >man5/$f
+done
+
+for f in ${MAN8} ; do
+ mv man8/$f man8/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man8/$f.bak | soelim >man8/$f
+done
diff --git a/mail/postfix22/Makefile b/mail/postfix22/Makefile
new file mode 100644
index 000000000000..8c8e340a8706
--- /dev/null
+++ b/mail/postfix22/Makefile
@@ -0,0 +1,122 @@
+# New ports collection makefile for: postfix
+# Version required: postfix 19990317-pl03
+# Date created: 18 Mar 1999
+# Whom: torstenb
+#
+# $Id$
+#
+
+DISTNAME= postfix-19990317-pl03
+PKGNAME= postfix-alpha-19990317.03
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.merit.edu/postfix/ \
+ ftp://ftp.snoopy.net/pub/mirrors/postfix/ \
+ ftp://ftp.reverse.net/pub/postfix/ \
+ ftp://postfix.eu.org/pub/postfix/ \
+ ftp://ftp.sunet.se/pub/unix/mail/postfix/ \
+ ftp://ftp.cs.tu-berlin.de/pub/net/mail/postfix/ \
+ ftp://ftp.postfix.oaktree.co.uk/pub/postfix/
+
+MAINTAINER= torstenb@FreeBSD.ORG
+
+ALL_TARGET= default
+
+SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
+
+MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
+ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
+ sendmail.1
+MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
+MAN8= bounce.8 cleanup.8 defer.8 local.8 master.8 pickup.8 pipe.8 qmgr.8 \
+ showq.8 smtp.8 smtpd.8 trivial-rewrite.8
+
+do-install:
+ @mkdir -p -m 755 ${PREFIX}/etc/postfix
+ @chown root:wheel ${PREFIX}/etc/postfix
+ @install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
+ ${PREFIX}/etc/postfix/LICENSE
+ @for f in access main.cf master.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/sample-$$f ; \
+ done
+ @exit
+ @for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
+ sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
+ sample-rate.cf sample-relocated.cf sample-resource.cf \
+ sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
+ sample-transport.cf sample-virtual.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/$$f ;\
+ done
+ @install -C -o root -g wheel -m 755 ${WRKSRC}/conf/postfix-script-sgid \
+ ${PREFIX}/etc/postfix/postfix-script
+ @mkdir -p -m 0755 ${PREFIX}/libexec/postfix
+ @for f in bounce cleanup fsstone local master pickup pipe \
+ qmgr showq smtp smtp-sink smtp-source smtpd \
+ trivial-rewrite ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/libexec/postfix/$$f ;\
+ done
+ @for f in sendmail postalias postcat postconf postfix \
+ postkick postlock postlog postmap postsuper ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/sbin/$$f ;\
+ done
+ @install -C -o root -g wheel -m 0555 ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
+ @for f in ${MAN1} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
+ ${PREFIX}/man/man1/$$f ;\
+ done
+ @for f in ${MAN5} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man5/$$f \
+ ${PREFIX}/man/man5/$$f ;\
+ done
+ @for f in ${MAN8} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man8/$$f \
+ ${PREFIX}/man/man8/$$f ;\
+ done
+ @mkdir -p -m 0755 /var/spool/postfix
+ @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
+ ${PREFIX}/etc/postfix/main.cf; \
+ fi
+ @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
+ ${PREFIX}/etc/postfix/master.cf; \
+ fi
+ @echo "--------------------------------------------------"
+ @echo "- To replace your existing sendmail with postfix -"
+ @echo "- type \"make replace\" "
+ @echo "--------------------------------------------------"
+
+post-install:
+ @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
+replace:
+ @echo "===> Replacing sendmail"
+ @if [ -e /usr/sbin/sendmail ]; then \
+ ${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
+ chmod 0 /usr/sbin/sendmail.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
+ fi
+ @echo "===> Replacing mailq"
+ @if [ -e /usr/bin/mailq ]; then \
+ ${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
+ chmod 0 /usr/bin/mailq.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
+ fi
+ @echo "===> Replacing newaliases"
+ @if [ -e /usr/bin/newaliases ]; then \
+ ${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
+ chmod 0 /usr/bin/newaliases.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/mail/postfix22/distinfo b/mail/postfix22/distinfo
new file mode 100644
index 000000000000..0ff555aac014
--- /dev/null
+++ b/mail/postfix22/distinfo
@@ -0,0 +1 @@
+MD5 (postfix-19990317-pl03.tar.gz) = d40f5773f4886ecbff40908588f07406
diff --git a/mail/postfix22/files/patch-aa b/mail/postfix22/files/patch-aa
new file mode 100644
index 000000000000..3af6375f1959
--- /dev/null
+++ b/mail/postfix22/files/patch-aa
@@ -0,0 +1,36 @@
+*** global/mail_params.h.orig Sat Mar 20 15:09:46 1999
+--- global/mail_params.h Sat Mar 20 15:10:46 1999
+***************
+*** 127,133 ****
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "/usr/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+--- 127,133 ----
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "!!PREFIX!!/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+***************
+*** 161,167 ****
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
+--- 161,167 ----
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "!!PREFIX!!/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
diff --git a/mail/postfix22/files/patch-ab b/mail/postfix22/files/patch-ab
new file mode 100644
index 000000000000..6824371c251b
--- /dev/null
+++ b/mail/postfix22/files/patch-ab
@@ -0,0 +1,74 @@
+*** conf/main.cf.orig Mon Mar 29 22:10:14 1999
+--- conf/main.cf Mon Mar 29 22:13:09 1999
+***************
+*** 18,36 ****
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = /some/where/postfix/bin
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! #command_directory = /usr/sbin
+
+ # The daemon_directory parameter specifies the location of all Postfix
+ # daemon programs (i.e. programs listed in the master.cf file). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! #daemon_directory = /usr/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+--- 18,36 ----
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = !!PREFIX!!/pbexec/postfix
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! 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). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! daemon_directory = !!PREFIX!!/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+***************
+*** 40,53 ****
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! #mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! #default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
+--- 40,53 ----
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
diff --git a/mail/postfix22/files/patch-ba b/mail/postfix22/files/patch-ba
new file mode 100644
index 000000000000..73feeef81f27
--- /dev/null
+++ b/mail/postfix22/files/patch-ba
@@ -0,0 +1,19 @@
+*** man/man1/postdrop.1.orig Mon Mar 29 22:35:14 1999
+--- man/man1/postdrop.1 Mon Mar 29 22:35:25 1999
+***************
+*** 51,57 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 51,57 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix22/files/patch-bb b/mail/postfix22/files/patch-bb
new file mode 100644
index 000000000000..af024b23b3d9
--- /dev/null
+++ b/mail/postfix22/files/patch-bb
@@ -0,0 +1,36 @@
+*** man/man1/sendmail.1.orig Mon Mar 29 22:35:30 1999
+--- man/man1/sendmail.1 Mon Mar 29 22:35:44 1999
+***************
+*** 60,66 ****
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+--- 60,66 ----
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB!!PREFIX!!/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+***************
+*** 164,170 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 164,170 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix22/files/patch-bc b/mail/postfix22/files/patch-bc
new file mode 100644
index 000000000000..12a369684c8f
--- /dev/null
+++ b/mail/postfix22/files/patch-bc
@@ -0,0 +1,19 @@
+*** man/man5/access.5.orig Mon Mar 29 22:35:58 1999
+--- man/man5/access.5 Mon Mar 29 22:36:13 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix22/files/patch-bd b/mail/postfix22/files/patch-bd
new file mode 100644
index 000000000000..2b2f30f720f5
--- /dev/null
+++ b/mail/postfix22/files/patch-bd
@@ -0,0 +1,19 @@
+*** man/man5/canonical.5.orig Mon Mar 29 22:36:25 1999
+--- man/man5/canonical.5 Mon Mar 29 22:36:32 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix22/files/patch-be b/mail/postfix22/files/patch-be
new file mode 100644
index 000000000000..354737c7e68d
--- /dev/null
+++ b/mail/postfix22/files/patch-be
@@ -0,0 +1,19 @@
+*** man/man5/relocated.5.orig Mon Mar 29 22:36:36 1999
+--- man/man5/relocated.5 Mon Mar 29 22:36:47 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix22/files/patch-bf b/mail/postfix22/files/patch-bf
new file mode 100644
index 000000000000..4de817826469
--- /dev/null
+++ b/mail/postfix22/files/patch-bf
@@ -0,0 +1,19 @@
+*** man/man5/virtual.5.orig Mon Mar 29 22:36:55 1999
+--- man/man5/virtual.5 Mon Mar 29 22:37:02 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix22/files/patch-bg b/mail/postfix22/files/patch-bg
new file mode 100644
index 000000000000..fb2b093bff0f
--- /dev/null
+++ b/mail/postfix22/files/patch-bg
@@ -0,0 +1,19 @@
+*** man/man8/local.8.orig Mon Mar 29 22:37:14 1999
+--- man/man8/local.8 Mon Mar 29 22:37:44 1999
+***************
+*** 75,81 ****
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR or \fB/var/spool/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
+--- 75,81 ----
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
diff --git a/mail/postfix22/files/patch-bh b/mail/postfix22/files/patch-bh
new file mode 100644
index 000000000000..42b7373d3fb5
--- /dev/null
+++ b/mail/postfix22/files/patch-bh
@@ -0,0 +1,21 @@
+*** man/man8/cleanup.8.orig Mon Mar 29 22:37:59 1999
+--- man/man8/cleanup.8 Mon Mar 29 22:38:13 1999
+***************
+*** 118,125 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/canonical*, canonical mapping table
+! /etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
+--- 118,125 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/canonical*, canonical mapping table
+! !!PREFIX!!/etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
diff --git a/mail/postfix22/files/patch-bi b/mail/postfix22/files/patch-bi
new file mode 100644
index 000000000000..2b57467ed976
--- /dev/null
+++ b/mail/postfix22/files/patch-bi
@@ -0,0 +1,21 @@
+*** man/man8/master.8.orig Mon Mar 29 22:38:17 1999
+--- man/man8/master.8 Mon Mar 29 22:38:46 1999
+***************
+*** 116,123 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/main.cf: global configuration file.
+! /etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
+--- 116,123 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/main.cf: global configuration file.
+! !!PREFIX!!/etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
diff --git a/mail/postfix22/pkg-comment b/mail/postfix22/pkg-comment
new file mode 100644
index 000000000000..e9fea510ce32
--- /dev/null
+++ b/mail/postfix22/pkg-comment
@@ -0,0 +1 @@
+Postfix aims to be an alternative to sendmail
diff --git a/mail/postfix22/pkg-descr b/mail/postfix22/pkg-descr
new file mode 100644
index 000000000000..fa5e129bf08b
--- /dev/null
+++ b/mail/postfix22/pkg-descr
@@ -0,0 +1,6 @@
+Postfix aims to be an alternative to the widely-used sendmail
+program. Sendmail is responsible for 70% of all e-mail delivered
+on the Internet. With an estimated 100 million users, that's an
+estimated 10 billion (10^10) messages daily. A stunning number.
+
+See http://www.postfix.org/ for details
diff --git a/mail/postfix22/pkg-install b/mail/postfix22/pkg-install
new file mode 100644
index 000000000000..7b4849639b05
--- /dev/null
+++ b/mail/postfix22/pkg-install
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+user=postfix
+group=postfix
+group2=maildrop
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
+else
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+chown root:maildrop ${PREFIX}/sbin/postdrop
+chmod 2755 ${PREFIX}/sbin/postdrop
diff --git a/mail/postfix22/pkg-plist b/mail/postfix22/pkg-plist
new file mode 100644
index 000000000000..28bc453e2bc2
--- /dev/null
+++ b/mail/postfix22/pkg-plist
@@ -0,0 +1,49 @@
+etc/postfix/main.cf
+etc/postfix/LICENSE
+etc/postfix/sample-access
+etc/postfix/sample-main.cf
+etc/postfix/sample-master.cf
+etc/postfix/sample-aliases.cf
+etc/postfix/sample-canonical.cf
+etc/postfix/sample-debug.cf
+etc/postfix/sample-ldap.cf
+etc/postfix/sample-local.cf
+etc/postfix/sample-misc.cf
+etc/postfix/sample-pcre.cf
+etc/postfix/sample-rate.cf
+etc/postfix/sample-relocated.cf
+etc/postfix/sample-resource.cf
+etc/postfix/sample-rewrite.cf
+etc/postfix/sample-smtp.cf
+etc/postfix/sample-smtpd.cf
+etc/postfix/sample-transport.cf
+etc/postfix/sample-virtual.cf
+etc/postfix/postfix-script
+etc/postfix/master.cf
+libexec/postfix/bounce
+libexec/postfix/cleanup
+libexec/postfix/fsstone
+libexec/postfix/local
+libexec/postfix/master
+libexec/postfix/pickup
+libexec/postfix/pipe
+libexec/postfix/qmgr
+libexec/postfix/showq
+libexec/postfix/smtp
+libexec/postfix/smtp-sink
+libexec/postfix/smtp-source
+libexec/postfix/smtpd
+libexec/postfix/trivial-rewrite
+sbin/sendmail
+sbin/postalias
+sbin/postcat
+sbin/postconf
+sbin/postfix
+sbin/postkick
+sbin/postlock
+sbin/postlog
+sbin/postmap
+sbin/postsuper
+sbin/postdrop
+@exec mkdir -p -m 0755 /var/spool/postfix
+@exec chown root:wheel /var/spool/postfix
diff --git a/mail/postfix22/scripts/configure b/mail/postfix22/scripts/configure
new file mode 100644
index 000000000000..48d9220b478d
--- /dev/null
+++ b/mail/postfix22/scripts/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $Id$
+
+mv ${WRKSRC}/global/mail_params.h ${WRKSRC}/global/mail_params.h.bak
+sed <${WRKSRC}/global/mail_params.h.bak >${WRKSRC}/global/mail_params.h s+!!PREFIX!!+$PREFIX+g
+
+mv ${WRKSRC}/conf/main.cf ${WRKSRC}/conf/main.cf.bak
+sed <${WRKSRC}/conf/main.cf.bak >${WRKSRC}/conf/main.cf
+
+cd ${WRKSRC}/man
+
+for f in ${MAN1} ; do
+ mv man1/$f man1/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man1/$f.bak | soelim >man1/$f
+done
+
+for f in ${MAN5} ; do
+ mv man5/$f man5/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man5/$f.bak | soelim >man5/$f
+done
+
+for f in ${MAN8} ; do
+ mv man8/$f man8/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man8/$f.bak | soelim >man8/$f
+done
diff --git a/mail/postfix23/Makefile b/mail/postfix23/Makefile
new file mode 100644
index 000000000000..8c8e340a8706
--- /dev/null
+++ b/mail/postfix23/Makefile
@@ -0,0 +1,122 @@
+# New ports collection makefile for: postfix
+# Version required: postfix 19990317-pl03
+# Date created: 18 Mar 1999
+# Whom: torstenb
+#
+# $Id$
+#
+
+DISTNAME= postfix-19990317-pl03
+PKGNAME= postfix-alpha-19990317.03
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.merit.edu/postfix/ \
+ ftp://ftp.snoopy.net/pub/mirrors/postfix/ \
+ ftp://ftp.reverse.net/pub/postfix/ \
+ ftp://postfix.eu.org/pub/postfix/ \
+ ftp://ftp.sunet.se/pub/unix/mail/postfix/ \
+ ftp://ftp.cs.tu-berlin.de/pub/net/mail/postfix/ \
+ ftp://ftp.postfix.oaktree.co.uk/pub/postfix/
+
+MAINTAINER= torstenb@FreeBSD.ORG
+
+ALL_TARGET= default
+
+SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
+
+MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
+ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
+ sendmail.1
+MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
+MAN8= bounce.8 cleanup.8 defer.8 local.8 master.8 pickup.8 pipe.8 qmgr.8 \
+ showq.8 smtp.8 smtpd.8 trivial-rewrite.8
+
+do-install:
+ @mkdir -p -m 755 ${PREFIX}/etc/postfix
+ @chown root:wheel ${PREFIX}/etc/postfix
+ @install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
+ ${PREFIX}/etc/postfix/LICENSE
+ @for f in access main.cf master.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/sample-$$f ; \
+ done
+ @exit
+ @for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
+ sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
+ sample-rate.cf sample-relocated.cf sample-resource.cf \
+ sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
+ sample-transport.cf sample-virtual.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/$$f ;\
+ done
+ @install -C -o root -g wheel -m 755 ${WRKSRC}/conf/postfix-script-sgid \
+ ${PREFIX}/etc/postfix/postfix-script
+ @mkdir -p -m 0755 ${PREFIX}/libexec/postfix
+ @for f in bounce cleanup fsstone local master pickup pipe \
+ qmgr showq smtp smtp-sink smtp-source smtpd \
+ trivial-rewrite ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/libexec/postfix/$$f ;\
+ done
+ @for f in sendmail postalias postcat postconf postfix \
+ postkick postlock postlog postmap postsuper ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/sbin/$$f ;\
+ done
+ @install -C -o root -g wheel -m 0555 ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
+ @for f in ${MAN1} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
+ ${PREFIX}/man/man1/$$f ;\
+ done
+ @for f in ${MAN5} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man5/$$f \
+ ${PREFIX}/man/man5/$$f ;\
+ done
+ @for f in ${MAN8} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man8/$$f \
+ ${PREFIX}/man/man8/$$f ;\
+ done
+ @mkdir -p -m 0755 /var/spool/postfix
+ @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
+ ${PREFIX}/etc/postfix/main.cf; \
+ fi
+ @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
+ ${PREFIX}/etc/postfix/master.cf; \
+ fi
+ @echo "--------------------------------------------------"
+ @echo "- To replace your existing sendmail with postfix -"
+ @echo "- type \"make replace\" "
+ @echo "--------------------------------------------------"
+
+post-install:
+ @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
+replace:
+ @echo "===> Replacing sendmail"
+ @if [ -e /usr/sbin/sendmail ]; then \
+ ${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
+ chmod 0 /usr/sbin/sendmail.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
+ fi
+ @echo "===> Replacing mailq"
+ @if [ -e /usr/bin/mailq ]; then \
+ ${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
+ chmod 0 /usr/bin/mailq.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
+ fi
+ @echo "===> Replacing newaliases"
+ @if [ -e /usr/bin/newaliases ]; then \
+ ${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
+ chmod 0 /usr/bin/newaliases.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/mail/postfix23/distinfo b/mail/postfix23/distinfo
new file mode 100644
index 000000000000..0ff555aac014
--- /dev/null
+++ b/mail/postfix23/distinfo
@@ -0,0 +1 @@
+MD5 (postfix-19990317-pl03.tar.gz) = d40f5773f4886ecbff40908588f07406
diff --git a/mail/postfix23/files/patch-aa b/mail/postfix23/files/patch-aa
new file mode 100644
index 000000000000..3af6375f1959
--- /dev/null
+++ b/mail/postfix23/files/patch-aa
@@ -0,0 +1,36 @@
+*** global/mail_params.h.orig Sat Mar 20 15:09:46 1999
+--- global/mail_params.h Sat Mar 20 15:10:46 1999
+***************
+*** 127,133 ****
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "/usr/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+--- 127,133 ----
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "!!PREFIX!!/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+***************
+*** 161,167 ****
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
+--- 161,167 ----
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "!!PREFIX!!/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
diff --git a/mail/postfix23/files/patch-ab b/mail/postfix23/files/patch-ab
new file mode 100644
index 000000000000..6824371c251b
--- /dev/null
+++ b/mail/postfix23/files/patch-ab
@@ -0,0 +1,74 @@
+*** conf/main.cf.orig Mon Mar 29 22:10:14 1999
+--- conf/main.cf Mon Mar 29 22:13:09 1999
+***************
+*** 18,36 ****
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = /some/where/postfix/bin
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! #command_directory = /usr/sbin
+
+ # The daemon_directory parameter specifies the location of all Postfix
+ # daemon programs (i.e. programs listed in the master.cf file). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! #daemon_directory = /usr/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+--- 18,36 ----
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = !!PREFIX!!/pbexec/postfix
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! 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). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! daemon_directory = !!PREFIX!!/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+***************
+*** 40,53 ****
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! #mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! #default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
+--- 40,53 ----
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
diff --git a/mail/postfix23/files/patch-ba b/mail/postfix23/files/patch-ba
new file mode 100644
index 000000000000..73feeef81f27
--- /dev/null
+++ b/mail/postfix23/files/patch-ba
@@ -0,0 +1,19 @@
+*** man/man1/postdrop.1.orig Mon Mar 29 22:35:14 1999
+--- man/man1/postdrop.1 Mon Mar 29 22:35:25 1999
+***************
+*** 51,57 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 51,57 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix23/files/patch-bb b/mail/postfix23/files/patch-bb
new file mode 100644
index 000000000000..af024b23b3d9
--- /dev/null
+++ b/mail/postfix23/files/patch-bb
@@ -0,0 +1,36 @@
+*** man/man1/sendmail.1.orig Mon Mar 29 22:35:30 1999
+--- man/man1/sendmail.1 Mon Mar 29 22:35:44 1999
+***************
+*** 60,66 ****
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+--- 60,66 ----
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB!!PREFIX!!/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+***************
+*** 164,170 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 164,170 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix23/files/patch-bc b/mail/postfix23/files/patch-bc
new file mode 100644
index 000000000000..12a369684c8f
--- /dev/null
+++ b/mail/postfix23/files/patch-bc
@@ -0,0 +1,19 @@
+*** man/man5/access.5.orig Mon Mar 29 22:35:58 1999
+--- man/man5/access.5 Mon Mar 29 22:36:13 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix23/files/patch-bd b/mail/postfix23/files/patch-bd
new file mode 100644
index 000000000000..2b2f30f720f5
--- /dev/null
+++ b/mail/postfix23/files/patch-bd
@@ -0,0 +1,19 @@
+*** man/man5/canonical.5.orig Mon Mar 29 22:36:25 1999
+--- man/man5/canonical.5 Mon Mar 29 22:36:32 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix23/files/patch-be b/mail/postfix23/files/patch-be
new file mode 100644
index 000000000000..354737c7e68d
--- /dev/null
+++ b/mail/postfix23/files/patch-be
@@ -0,0 +1,19 @@
+*** man/man5/relocated.5.orig Mon Mar 29 22:36:36 1999
+--- man/man5/relocated.5 Mon Mar 29 22:36:47 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix23/files/patch-bf b/mail/postfix23/files/patch-bf
new file mode 100644
index 000000000000..4de817826469
--- /dev/null
+++ b/mail/postfix23/files/patch-bf
@@ -0,0 +1,19 @@
+*** man/man5/virtual.5.orig Mon Mar 29 22:36:55 1999
+--- man/man5/virtual.5 Mon Mar 29 22:37:02 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix23/files/patch-bg b/mail/postfix23/files/patch-bg
new file mode 100644
index 000000000000..fb2b093bff0f
--- /dev/null
+++ b/mail/postfix23/files/patch-bg
@@ -0,0 +1,19 @@
+*** man/man8/local.8.orig Mon Mar 29 22:37:14 1999
+--- man/man8/local.8 Mon Mar 29 22:37:44 1999
+***************
+*** 75,81 ****
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR or \fB/var/spool/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
+--- 75,81 ----
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
diff --git a/mail/postfix23/files/patch-bh b/mail/postfix23/files/patch-bh
new file mode 100644
index 000000000000..42b7373d3fb5
--- /dev/null
+++ b/mail/postfix23/files/patch-bh
@@ -0,0 +1,21 @@
+*** man/man8/cleanup.8.orig Mon Mar 29 22:37:59 1999
+--- man/man8/cleanup.8 Mon Mar 29 22:38:13 1999
+***************
+*** 118,125 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/canonical*, canonical mapping table
+! /etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
+--- 118,125 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/canonical*, canonical mapping table
+! !!PREFIX!!/etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
diff --git a/mail/postfix23/files/patch-bi b/mail/postfix23/files/patch-bi
new file mode 100644
index 000000000000..2b57467ed976
--- /dev/null
+++ b/mail/postfix23/files/patch-bi
@@ -0,0 +1,21 @@
+*** man/man8/master.8.orig Mon Mar 29 22:38:17 1999
+--- man/man8/master.8 Mon Mar 29 22:38:46 1999
+***************
+*** 116,123 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/main.cf: global configuration file.
+! /etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
+--- 116,123 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/main.cf: global configuration file.
+! !!PREFIX!!/etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
diff --git a/mail/postfix23/pkg-comment b/mail/postfix23/pkg-comment
new file mode 100644
index 000000000000..e9fea510ce32
--- /dev/null
+++ b/mail/postfix23/pkg-comment
@@ -0,0 +1 @@
+Postfix aims to be an alternative to sendmail
diff --git a/mail/postfix23/pkg-descr b/mail/postfix23/pkg-descr
new file mode 100644
index 000000000000..fa5e129bf08b
--- /dev/null
+++ b/mail/postfix23/pkg-descr
@@ -0,0 +1,6 @@
+Postfix aims to be an alternative to the widely-used sendmail
+program. Sendmail is responsible for 70% of all e-mail delivered
+on the Internet. With an estimated 100 million users, that's an
+estimated 10 billion (10^10) messages daily. A stunning number.
+
+See http://www.postfix.org/ for details
diff --git a/mail/postfix23/pkg-install b/mail/postfix23/pkg-install
new file mode 100644
index 000000000000..7b4849639b05
--- /dev/null
+++ b/mail/postfix23/pkg-install
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+user=postfix
+group=postfix
+group2=maildrop
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
+else
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+chown root:maildrop ${PREFIX}/sbin/postdrop
+chmod 2755 ${PREFIX}/sbin/postdrop
diff --git a/mail/postfix23/pkg-plist b/mail/postfix23/pkg-plist
new file mode 100644
index 000000000000..28bc453e2bc2
--- /dev/null
+++ b/mail/postfix23/pkg-plist
@@ -0,0 +1,49 @@
+etc/postfix/main.cf
+etc/postfix/LICENSE
+etc/postfix/sample-access
+etc/postfix/sample-main.cf
+etc/postfix/sample-master.cf
+etc/postfix/sample-aliases.cf
+etc/postfix/sample-canonical.cf
+etc/postfix/sample-debug.cf
+etc/postfix/sample-ldap.cf
+etc/postfix/sample-local.cf
+etc/postfix/sample-misc.cf
+etc/postfix/sample-pcre.cf
+etc/postfix/sample-rate.cf
+etc/postfix/sample-relocated.cf
+etc/postfix/sample-resource.cf
+etc/postfix/sample-rewrite.cf
+etc/postfix/sample-smtp.cf
+etc/postfix/sample-smtpd.cf
+etc/postfix/sample-transport.cf
+etc/postfix/sample-virtual.cf
+etc/postfix/postfix-script
+etc/postfix/master.cf
+libexec/postfix/bounce
+libexec/postfix/cleanup
+libexec/postfix/fsstone
+libexec/postfix/local
+libexec/postfix/master
+libexec/postfix/pickup
+libexec/postfix/pipe
+libexec/postfix/qmgr
+libexec/postfix/showq
+libexec/postfix/smtp
+libexec/postfix/smtp-sink
+libexec/postfix/smtp-source
+libexec/postfix/smtpd
+libexec/postfix/trivial-rewrite
+sbin/sendmail
+sbin/postalias
+sbin/postcat
+sbin/postconf
+sbin/postfix
+sbin/postkick
+sbin/postlock
+sbin/postlog
+sbin/postmap
+sbin/postsuper
+sbin/postdrop
+@exec mkdir -p -m 0755 /var/spool/postfix
+@exec chown root:wheel /var/spool/postfix
diff --git a/mail/postfix23/scripts/configure b/mail/postfix23/scripts/configure
new file mode 100644
index 000000000000..48d9220b478d
--- /dev/null
+++ b/mail/postfix23/scripts/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $Id$
+
+mv ${WRKSRC}/global/mail_params.h ${WRKSRC}/global/mail_params.h.bak
+sed <${WRKSRC}/global/mail_params.h.bak >${WRKSRC}/global/mail_params.h s+!!PREFIX!!+$PREFIX+g
+
+mv ${WRKSRC}/conf/main.cf ${WRKSRC}/conf/main.cf.bak
+sed <${WRKSRC}/conf/main.cf.bak >${WRKSRC}/conf/main.cf
+
+cd ${WRKSRC}/man
+
+for f in ${MAN1} ; do
+ mv man1/$f man1/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man1/$f.bak | soelim >man1/$f
+done
+
+for f in ${MAN5} ; do
+ mv man5/$f man5/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man5/$f.bak | soelim >man5/$f
+done
+
+for f in ${MAN8} ; do
+ mv man8/$f man8/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man8/$f.bak | soelim >man8/$f
+done
diff --git a/mail/postfix24/Makefile b/mail/postfix24/Makefile
new file mode 100644
index 000000000000..8c8e340a8706
--- /dev/null
+++ b/mail/postfix24/Makefile
@@ -0,0 +1,122 @@
+# New ports collection makefile for: postfix
+# Version required: postfix 19990317-pl03
+# Date created: 18 Mar 1999
+# Whom: torstenb
+#
+# $Id$
+#
+
+DISTNAME= postfix-19990317-pl03
+PKGNAME= postfix-alpha-19990317.03
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.merit.edu/postfix/ \
+ ftp://ftp.snoopy.net/pub/mirrors/postfix/ \
+ ftp://ftp.reverse.net/pub/postfix/ \
+ ftp://postfix.eu.org/pub/postfix/ \
+ ftp://ftp.sunet.se/pub/unix/mail/postfix/ \
+ ftp://ftp.cs.tu-berlin.de/pub/net/mail/postfix/ \
+ ftp://ftp.postfix.oaktree.co.uk/pub/postfix/
+
+MAINTAINER= torstenb@FreeBSD.ORG
+
+ALL_TARGET= default
+
+SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
+
+MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
+ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
+ sendmail.1
+MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
+MAN8= bounce.8 cleanup.8 defer.8 local.8 master.8 pickup.8 pipe.8 qmgr.8 \
+ showq.8 smtp.8 smtpd.8 trivial-rewrite.8
+
+do-install:
+ @mkdir -p -m 755 ${PREFIX}/etc/postfix
+ @chown root:wheel ${PREFIX}/etc/postfix
+ @install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
+ ${PREFIX}/etc/postfix/LICENSE
+ @for f in access main.cf master.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/sample-$$f ; \
+ done
+ @exit
+ @for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
+ sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
+ sample-rate.cf sample-relocated.cf sample-resource.cf \
+ sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
+ sample-transport.cf sample-virtual.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/$$f ;\
+ done
+ @install -C -o root -g wheel -m 755 ${WRKSRC}/conf/postfix-script-sgid \
+ ${PREFIX}/etc/postfix/postfix-script
+ @mkdir -p -m 0755 ${PREFIX}/libexec/postfix
+ @for f in bounce cleanup fsstone local master pickup pipe \
+ qmgr showq smtp smtp-sink smtp-source smtpd \
+ trivial-rewrite ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/libexec/postfix/$$f ;\
+ done
+ @for f in sendmail postalias postcat postconf postfix \
+ postkick postlock postlog postmap postsuper ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/sbin/$$f ;\
+ done
+ @install -C -o root -g wheel -m 0555 ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
+ @for f in ${MAN1} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
+ ${PREFIX}/man/man1/$$f ;\
+ done
+ @for f in ${MAN5} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man5/$$f \
+ ${PREFIX}/man/man5/$$f ;\
+ done
+ @for f in ${MAN8} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man8/$$f \
+ ${PREFIX}/man/man8/$$f ;\
+ done
+ @mkdir -p -m 0755 /var/spool/postfix
+ @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
+ ${PREFIX}/etc/postfix/main.cf; \
+ fi
+ @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
+ ${PREFIX}/etc/postfix/master.cf; \
+ fi
+ @echo "--------------------------------------------------"
+ @echo "- To replace your existing sendmail with postfix -"
+ @echo "- type \"make replace\" "
+ @echo "--------------------------------------------------"
+
+post-install:
+ @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
+replace:
+ @echo "===> Replacing sendmail"
+ @if [ -e /usr/sbin/sendmail ]; then \
+ ${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
+ chmod 0 /usr/sbin/sendmail.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
+ fi
+ @echo "===> Replacing mailq"
+ @if [ -e /usr/bin/mailq ]; then \
+ ${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
+ chmod 0 /usr/bin/mailq.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
+ fi
+ @echo "===> Replacing newaliases"
+ @if [ -e /usr/bin/newaliases ]; then \
+ ${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
+ chmod 0 /usr/bin/newaliases.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/mail/postfix24/distinfo b/mail/postfix24/distinfo
new file mode 100644
index 000000000000..0ff555aac014
--- /dev/null
+++ b/mail/postfix24/distinfo
@@ -0,0 +1 @@
+MD5 (postfix-19990317-pl03.tar.gz) = d40f5773f4886ecbff40908588f07406
diff --git a/mail/postfix24/files/patch-aa b/mail/postfix24/files/patch-aa
new file mode 100644
index 000000000000..3af6375f1959
--- /dev/null
+++ b/mail/postfix24/files/patch-aa
@@ -0,0 +1,36 @@
+*** global/mail_params.h.orig Sat Mar 20 15:09:46 1999
+--- global/mail_params.h Sat Mar 20 15:10:46 1999
+***************
+*** 127,133 ****
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "/usr/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+--- 127,133 ----
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "!!PREFIX!!/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+***************
+*** 161,167 ****
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
+--- 161,167 ----
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "!!PREFIX!!/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
diff --git a/mail/postfix24/files/patch-ab b/mail/postfix24/files/patch-ab
new file mode 100644
index 000000000000..6824371c251b
--- /dev/null
+++ b/mail/postfix24/files/patch-ab
@@ -0,0 +1,74 @@
+*** conf/main.cf.orig Mon Mar 29 22:10:14 1999
+--- conf/main.cf Mon Mar 29 22:13:09 1999
+***************
+*** 18,36 ****
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = /some/where/postfix/bin
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! #command_directory = /usr/sbin
+
+ # The daemon_directory parameter specifies the location of all Postfix
+ # daemon programs (i.e. programs listed in the master.cf file). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! #daemon_directory = /usr/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+--- 18,36 ----
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = !!PREFIX!!/pbexec/postfix
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! 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). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! daemon_directory = !!PREFIX!!/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+***************
+*** 40,53 ****
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! #mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! #default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
+--- 40,53 ----
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
diff --git a/mail/postfix24/files/patch-ba b/mail/postfix24/files/patch-ba
new file mode 100644
index 000000000000..73feeef81f27
--- /dev/null
+++ b/mail/postfix24/files/patch-ba
@@ -0,0 +1,19 @@
+*** man/man1/postdrop.1.orig Mon Mar 29 22:35:14 1999
+--- man/man1/postdrop.1 Mon Mar 29 22:35:25 1999
+***************
+*** 51,57 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 51,57 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix24/files/patch-bb b/mail/postfix24/files/patch-bb
new file mode 100644
index 000000000000..af024b23b3d9
--- /dev/null
+++ b/mail/postfix24/files/patch-bb
@@ -0,0 +1,36 @@
+*** man/man1/sendmail.1.orig Mon Mar 29 22:35:30 1999
+--- man/man1/sendmail.1 Mon Mar 29 22:35:44 1999
+***************
+*** 60,66 ****
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+--- 60,66 ----
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB!!PREFIX!!/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+***************
+*** 164,170 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 164,170 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix24/files/patch-bc b/mail/postfix24/files/patch-bc
new file mode 100644
index 000000000000..12a369684c8f
--- /dev/null
+++ b/mail/postfix24/files/patch-bc
@@ -0,0 +1,19 @@
+*** man/man5/access.5.orig Mon Mar 29 22:35:58 1999
+--- man/man5/access.5 Mon Mar 29 22:36:13 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix24/files/patch-bd b/mail/postfix24/files/patch-bd
new file mode 100644
index 000000000000..2b2f30f720f5
--- /dev/null
+++ b/mail/postfix24/files/patch-bd
@@ -0,0 +1,19 @@
+*** man/man5/canonical.5.orig Mon Mar 29 22:36:25 1999
+--- man/man5/canonical.5 Mon Mar 29 22:36:32 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix24/files/patch-be b/mail/postfix24/files/patch-be
new file mode 100644
index 000000000000..354737c7e68d
--- /dev/null
+++ b/mail/postfix24/files/patch-be
@@ -0,0 +1,19 @@
+*** man/man5/relocated.5.orig Mon Mar 29 22:36:36 1999
+--- man/man5/relocated.5 Mon Mar 29 22:36:47 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix24/files/patch-bf b/mail/postfix24/files/patch-bf
new file mode 100644
index 000000000000..4de817826469
--- /dev/null
+++ b/mail/postfix24/files/patch-bf
@@ -0,0 +1,19 @@
+*** man/man5/virtual.5.orig Mon Mar 29 22:36:55 1999
+--- man/man5/virtual.5 Mon Mar 29 22:37:02 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix24/files/patch-bg b/mail/postfix24/files/patch-bg
new file mode 100644
index 000000000000..fb2b093bff0f
--- /dev/null
+++ b/mail/postfix24/files/patch-bg
@@ -0,0 +1,19 @@
+*** man/man8/local.8.orig Mon Mar 29 22:37:14 1999
+--- man/man8/local.8 Mon Mar 29 22:37:44 1999
+***************
+*** 75,81 ****
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR or \fB/var/spool/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
+--- 75,81 ----
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
diff --git a/mail/postfix24/files/patch-bh b/mail/postfix24/files/patch-bh
new file mode 100644
index 000000000000..42b7373d3fb5
--- /dev/null
+++ b/mail/postfix24/files/patch-bh
@@ -0,0 +1,21 @@
+*** man/man8/cleanup.8.orig Mon Mar 29 22:37:59 1999
+--- man/man8/cleanup.8 Mon Mar 29 22:38:13 1999
+***************
+*** 118,125 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/canonical*, canonical mapping table
+! /etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
+--- 118,125 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/canonical*, canonical mapping table
+! !!PREFIX!!/etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
diff --git a/mail/postfix24/files/patch-bi b/mail/postfix24/files/patch-bi
new file mode 100644
index 000000000000..2b57467ed976
--- /dev/null
+++ b/mail/postfix24/files/patch-bi
@@ -0,0 +1,21 @@
+*** man/man8/master.8.orig Mon Mar 29 22:38:17 1999
+--- man/man8/master.8 Mon Mar 29 22:38:46 1999
+***************
+*** 116,123 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/main.cf: global configuration file.
+! /etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
+--- 116,123 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/main.cf: global configuration file.
+! !!PREFIX!!/etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
diff --git a/mail/postfix24/pkg-comment b/mail/postfix24/pkg-comment
new file mode 100644
index 000000000000..e9fea510ce32
--- /dev/null
+++ b/mail/postfix24/pkg-comment
@@ -0,0 +1 @@
+Postfix aims to be an alternative to sendmail
diff --git a/mail/postfix24/pkg-descr b/mail/postfix24/pkg-descr
new file mode 100644
index 000000000000..fa5e129bf08b
--- /dev/null
+++ b/mail/postfix24/pkg-descr
@@ -0,0 +1,6 @@
+Postfix aims to be an alternative to the widely-used sendmail
+program. Sendmail is responsible for 70% of all e-mail delivered
+on the Internet. With an estimated 100 million users, that's an
+estimated 10 billion (10^10) messages daily. A stunning number.
+
+See http://www.postfix.org/ for details
diff --git a/mail/postfix24/pkg-install b/mail/postfix24/pkg-install
new file mode 100644
index 000000000000..7b4849639b05
--- /dev/null
+++ b/mail/postfix24/pkg-install
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+user=postfix
+group=postfix
+group2=maildrop
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
+else
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+chown root:maildrop ${PREFIX}/sbin/postdrop
+chmod 2755 ${PREFIX}/sbin/postdrop
diff --git a/mail/postfix24/pkg-plist b/mail/postfix24/pkg-plist
new file mode 100644
index 000000000000..28bc453e2bc2
--- /dev/null
+++ b/mail/postfix24/pkg-plist
@@ -0,0 +1,49 @@
+etc/postfix/main.cf
+etc/postfix/LICENSE
+etc/postfix/sample-access
+etc/postfix/sample-main.cf
+etc/postfix/sample-master.cf
+etc/postfix/sample-aliases.cf
+etc/postfix/sample-canonical.cf
+etc/postfix/sample-debug.cf
+etc/postfix/sample-ldap.cf
+etc/postfix/sample-local.cf
+etc/postfix/sample-misc.cf
+etc/postfix/sample-pcre.cf
+etc/postfix/sample-rate.cf
+etc/postfix/sample-relocated.cf
+etc/postfix/sample-resource.cf
+etc/postfix/sample-rewrite.cf
+etc/postfix/sample-smtp.cf
+etc/postfix/sample-smtpd.cf
+etc/postfix/sample-transport.cf
+etc/postfix/sample-virtual.cf
+etc/postfix/postfix-script
+etc/postfix/master.cf
+libexec/postfix/bounce
+libexec/postfix/cleanup
+libexec/postfix/fsstone
+libexec/postfix/local
+libexec/postfix/master
+libexec/postfix/pickup
+libexec/postfix/pipe
+libexec/postfix/qmgr
+libexec/postfix/showq
+libexec/postfix/smtp
+libexec/postfix/smtp-sink
+libexec/postfix/smtp-source
+libexec/postfix/smtpd
+libexec/postfix/trivial-rewrite
+sbin/sendmail
+sbin/postalias
+sbin/postcat
+sbin/postconf
+sbin/postfix
+sbin/postkick
+sbin/postlock
+sbin/postlog
+sbin/postmap
+sbin/postsuper
+sbin/postdrop
+@exec mkdir -p -m 0755 /var/spool/postfix
+@exec chown root:wheel /var/spool/postfix
diff --git a/mail/postfix24/scripts/configure b/mail/postfix24/scripts/configure
new file mode 100644
index 000000000000..48d9220b478d
--- /dev/null
+++ b/mail/postfix24/scripts/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $Id$
+
+mv ${WRKSRC}/global/mail_params.h ${WRKSRC}/global/mail_params.h.bak
+sed <${WRKSRC}/global/mail_params.h.bak >${WRKSRC}/global/mail_params.h s+!!PREFIX!!+$PREFIX+g
+
+mv ${WRKSRC}/conf/main.cf ${WRKSRC}/conf/main.cf.bak
+sed <${WRKSRC}/conf/main.cf.bak >${WRKSRC}/conf/main.cf
+
+cd ${WRKSRC}/man
+
+for f in ${MAN1} ; do
+ mv man1/$f man1/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man1/$f.bak | soelim >man1/$f
+done
+
+for f in ${MAN5} ; do
+ mv man5/$f man5/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man5/$f.bak | soelim >man5/$f
+done
+
+for f in ${MAN8} ; do
+ mv man8/$f man8/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man8/$f.bak | soelim >man8/$f
+done
diff --git a/mail/postfix25/Makefile b/mail/postfix25/Makefile
new file mode 100644
index 000000000000..8c8e340a8706
--- /dev/null
+++ b/mail/postfix25/Makefile
@@ -0,0 +1,122 @@
+# New ports collection makefile for: postfix
+# Version required: postfix 19990317-pl03
+# Date created: 18 Mar 1999
+# Whom: torstenb
+#
+# $Id$
+#
+
+DISTNAME= postfix-19990317-pl03
+PKGNAME= postfix-alpha-19990317.03
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.merit.edu/postfix/ \
+ ftp://ftp.snoopy.net/pub/mirrors/postfix/ \
+ ftp://ftp.reverse.net/pub/postfix/ \
+ ftp://postfix.eu.org/pub/postfix/ \
+ ftp://ftp.sunet.se/pub/unix/mail/postfix/ \
+ ftp://ftp.cs.tu-berlin.de/pub/net/mail/postfix/ \
+ ftp://ftp.postfix.oaktree.co.uk/pub/postfix/
+
+MAINTAINER= torstenb@FreeBSD.ORG
+
+ALL_TARGET= default
+
+SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
+
+MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
+ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
+ sendmail.1
+MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
+MAN8= bounce.8 cleanup.8 defer.8 local.8 master.8 pickup.8 pipe.8 qmgr.8 \
+ showq.8 smtp.8 smtpd.8 trivial-rewrite.8
+
+do-install:
+ @mkdir -p -m 755 ${PREFIX}/etc/postfix
+ @chown root:wheel ${PREFIX}/etc/postfix
+ @install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
+ ${PREFIX}/etc/postfix/LICENSE
+ @for f in access main.cf master.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/sample-$$f ; \
+ done
+ @exit
+ @for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
+ sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
+ sample-rate.cf sample-relocated.cf sample-resource.cf \
+ sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
+ sample-transport.cf sample-virtual.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/$$f ;\
+ done
+ @install -C -o root -g wheel -m 755 ${WRKSRC}/conf/postfix-script-sgid \
+ ${PREFIX}/etc/postfix/postfix-script
+ @mkdir -p -m 0755 ${PREFIX}/libexec/postfix
+ @for f in bounce cleanup fsstone local master pickup pipe \
+ qmgr showq smtp smtp-sink smtp-source smtpd \
+ trivial-rewrite ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/libexec/postfix/$$f ;\
+ done
+ @for f in sendmail postalias postcat postconf postfix \
+ postkick postlock postlog postmap postsuper ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/sbin/$$f ;\
+ done
+ @install -C -o root -g wheel -m 0555 ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
+ @for f in ${MAN1} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
+ ${PREFIX}/man/man1/$$f ;\
+ done
+ @for f in ${MAN5} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man5/$$f \
+ ${PREFIX}/man/man5/$$f ;\
+ done
+ @for f in ${MAN8} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man8/$$f \
+ ${PREFIX}/man/man8/$$f ;\
+ done
+ @mkdir -p -m 0755 /var/spool/postfix
+ @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
+ ${PREFIX}/etc/postfix/main.cf; \
+ fi
+ @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
+ ${PREFIX}/etc/postfix/master.cf; \
+ fi
+ @echo "--------------------------------------------------"
+ @echo "- To replace your existing sendmail with postfix -"
+ @echo "- type \"make replace\" "
+ @echo "--------------------------------------------------"
+
+post-install:
+ @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
+replace:
+ @echo "===> Replacing sendmail"
+ @if [ -e /usr/sbin/sendmail ]; then \
+ ${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
+ chmod 0 /usr/sbin/sendmail.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
+ fi
+ @echo "===> Replacing mailq"
+ @if [ -e /usr/bin/mailq ]; then \
+ ${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
+ chmod 0 /usr/bin/mailq.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
+ fi
+ @echo "===> Replacing newaliases"
+ @if [ -e /usr/bin/newaliases ]; then \
+ ${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
+ chmod 0 /usr/bin/newaliases.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/mail/postfix25/distinfo b/mail/postfix25/distinfo
new file mode 100644
index 000000000000..0ff555aac014
--- /dev/null
+++ b/mail/postfix25/distinfo
@@ -0,0 +1 @@
+MD5 (postfix-19990317-pl03.tar.gz) = d40f5773f4886ecbff40908588f07406
diff --git a/mail/postfix25/files/patch-aa b/mail/postfix25/files/patch-aa
new file mode 100644
index 000000000000..3af6375f1959
--- /dev/null
+++ b/mail/postfix25/files/patch-aa
@@ -0,0 +1,36 @@
+*** global/mail_params.h.orig Sat Mar 20 15:09:46 1999
+--- global/mail_params.h Sat Mar 20 15:10:46 1999
+***************
+*** 127,133 ****
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "/usr/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+--- 127,133 ----
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "!!PREFIX!!/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+***************
+*** 161,167 ****
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
+--- 161,167 ----
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "!!PREFIX!!/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
diff --git a/mail/postfix25/files/patch-ab b/mail/postfix25/files/patch-ab
new file mode 100644
index 000000000000..6824371c251b
--- /dev/null
+++ b/mail/postfix25/files/patch-ab
@@ -0,0 +1,74 @@
+*** conf/main.cf.orig Mon Mar 29 22:10:14 1999
+--- conf/main.cf Mon Mar 29 22:13:09 1999
+***************
+*** 18,36 ****
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = /some/where/postfix/bin
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! #command_directory = /usr/sbin
+
+ # The daemon_directory parameter specifies the location of all Postfix
+ # daemon programs (i.e. programs listed in the master.cf file). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! #daemon_directory = /usr/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+--- 18,36 ----
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = !!PREFIX!!/pbexec/postfix
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! 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). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! daemon_directory = !!PREFIX!!/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+***************
+*** 40,53 ****
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! #mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! #default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
+--- 40,53 ----
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
diff --git a/mail/postfix25/files/patch-ba b/mail/postfix25/files/patch-ba
new file mode 100644
index 000000000000..73feeef81f27
--- /dev/null
+++ b/mail/postfix25/files/patch-ba
@@ -0,0 +1,19 @@
+*** man/man1/postdrop.1.orig Mon Mar 29 22:35:14 1999
+--- man/man1/postdrop.1 Mon Mar 29 22:35:25 1999
+***************
+*** 51,57 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 51,57 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix25/files/patch-bb b/mail/postfix25/files/patch-bb
new file mode 100644
index 000000000000..af024b23b3d9
--- /dev/null
+++ b/mail/postfix25/files/patch-bb
@@ -0,0 +1,36 @@
+*** man/man1/sendmail.1.orig Mon Mar 29 22:35:30 1999
+--- man/man1/sendmail.1 Mon Mar 29 22:35:44 1999
+***************
+*** 60,66 ****
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+--- 60,66 ----
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB!!PREFIX!!/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+***************
+*** 164,170 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 164,170 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix25/files/patch-bc b/mail/postfix25/files/patch-bc
new file mode 100644
index 000000000000..12a369684c8f
--- /dev/null
+++ b/mail/postfix25/files/patch-bc
@@ -0,0 +1,19 @@
+*** man/man5/access.5.orig Mon Mar 29 22:35:58 1999
+--- man/man5/access.5 Mon Mar 29 22:36:13 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix25/files/patch-bd b/mail/postfix25/files/patch-bd
new file mode 100644
index 000000000000..2b2f30f720f5
--- /dev/null
+++ b/mail/postfix25/files/patch-bd
@@ -0,0 +1,19 @@
+*** man/man5/canonical.5.orig Mon Mar 29 22:36:25 1999
+--- man/man5/canonical.5 Mon Mar 29 22:36:32 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix25/files/patch-be b/mail/postfix25/files/patch-be
new file mode 100644
index 000000000000..354737c7e68d
--- /dev/null
+++ b/mail/postfix25/files/patch-be
@@ -0,0 +1,19 @@
+*** man/man5/relocated.5.orig Mon Mar 29 22:36:36 1999
+--- man/man5/relocated.5 Mon Mar 29 22:36:47 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix25/files/patch-bf b/mail/postfix25/files/patch-bf
new file mode 100644
index 000000000000..4de817826469
--- /dev/null
+++ b/mail/postfix25/files/patch-bf
@@ -0,0 +1,19 @@
+*** man/man5/virtual.5.orig Mon Mar 29 22:36:55 1999
+--- man/man5/virtual.5 Mon Mar 29 22:37:02 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix25/files/patch-bg b/mail/postfix25/files/patch-bg
new file mode 100644
index 000000000000..fb2b093bff0f
--- /dev/null
+++ b/mail/postfix25/files/patch-bg
@@ -0,0 +1,19 @@
+*** man/man8/local.8.orig Mon Mar 29 22:37:14 1999
+--- man/man8/local.8 Mon Mar 29 22:37:44 1999
+***************
+*** 75,81 ****
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR or \fB/var/spool/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
+--- 75,81 ----
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
diff --git a/mail/postfix25/files/patch-bh b/mail/postfix25/files/patch-bh
new file mode 100644
index 000000000000..42b7373d3fb5
--- /dev/null
+++ b/mail/postfix25/files/patch-bh
@@ -0,0 +1,21 @@
+*** man/man8/cleanup.8.orig Mon Mar 29 22:37:59 1999
+--- man/man8/cleanup.8 Mon Mar 29 22:38:13 1999
+***************
+*** 118,125 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/canonical*, canonical mapping table
+! /etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
+--- 118,125 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/canonical*, canonical mapping table
+! !!PREFIX!!/etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
diff --git a/mail/postfix25/files/patch-bi b/mail/postfix25/files/patch-bi
new file mode 100644
index 000000000000..2b57467ed976
--- /dev/null
+++ b/mail/postfix25/files/patch-bi
@@ -0,0 +1,21 @@
+*** man/man8/master.8.orig Mon Mar 29 22:38:17 1999
+--- man/man8/master.8 Mon Mar 29 22:38:46 1999
+***************
+*** 116,123 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/main.cf: global configuration file.
+! /etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
+--- 116,123 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/main.cf: global configuration file.
+! !!PREFIX!!/etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
diff --git a/mail/postfix25/pkg-comment b/mail/postfix25/pkg-comment
new file mode 100644
index 000000000000..e9fea510ce32
--- /dev/null
+++ b/mail/postfix25/pkg-comment
@@ -0,0 +1 @@
+Postfix aims to be an alternative to sendmail
diff --git a/mail/postfix25/pkg-descr b/mail/postfix25/pkg-descr
new file mode 100644
index 000000000000..fa5e129bf08b
--- /dev/null
+++ b/mail/postfix25/pkg-descr
@@ -0,0 +1,6 @@
+Postfix aims to be an alternative to the widely-used sendmail
+program. Sendmail is responsible for 70% of all e-mail delivered
+on the Internet. With an estimated 100 million users, that's an
+estimated 10 billion (10^10) messages daily. A stunning number.
+
+See http://www.postfix.org/ for details
diff --git a/mail/postfix25/pkg-install b/mail/postfix25/pkg-install
new file mode 100644
index 000000000000..7b4849639b05
--- /dev/null
+++ b/mail/postfix25/pkg-install
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+user=postfix
+group=postfix
+group2=maildrop
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
+else
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+chown root:maildrop ${PREFIX}/sbin/postdrop
+chmod 2755 ${PREFIX}/sbin/postdrop
diff --git a/mail/postfix25/pkg-plist b/mail/postfix25/pkg-plist
new file mode 100644
index 000000000000..28bc453e2bc2
--- /dev/null
+++ b/mail/postfix25/pkg-plist
@@ -0,0 +1,49 @@
+etc/postfix/main.cf
+etc/postfix/LICENSE
+etc/postfix/sample-access
+etc/postfix/sample-main.cf
+etc/postfix/sample-master.cf
+etc/postfix/sample-aliases.cf
+etc/postfix/sample-canonical.cf
+etc/postfix/sample-debug.cf
+etc/postfix/sample-ldap.cf
+etc/postfix/sample-local.cf
+etc/postfix/sample-misc.cf
+etc/postfix/sample-pcre.cf
+etc/postfix/sample-rate.cf
+etc/postfix/sample-relocated.cf
+etc/postfix/sample-resource.cf
+etc/postfix/sample-rewrite.cf
+etc/postfix/sample-smtp.cf
+etc/postfix/sample-smtpd.cf
+etc/postfix/sample-transport.cf
+etc/postfix/sample-virtual.cf
+etc/postfix/postfix-script
+etc/postfix/master.cf
+libexec/postfix/bounce
+libexec/postfix/cleanup
+libexec/postfix/fsstone
+libexec/postfix/local
+libexec/postfix/master
+libexec/postfix/pickup
+libexec/postfix/pipe
+libexec/postfix/qmgr
+libexec/postfix/showq
+libexec/postfix/smtp
+libexec/postfix/smtp-sink
+libexec/postfix/smtp-source
+libexec/postfix/smtpd
+libexec/postfix/trivial-rewrite
+sbin/sendmail
+sbin/postalias
+sbin/postcat
+sbin/postconf
+sbin/postfix
+sbin/postkick
+sbin/postlock
+sbin/postlog
+sbin/postmap
+sbin/postsuper
+sbin/postdrop
+@exec mkdir -p -m 0755 /var/spool/postfix
+@exec chown root:wheel /var/spool/postfix
diff --git a/mail/postfix25/scripts/configure b/mail/postfix25/scripts/configure
new file mode 100644
index 000000000000..48d9220b478d
--- /dev/null
+++ b/mail/postfix25/scripts/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $Id$
+
+mv ${WRKSRC}/global/mail_params.h ${WRKSRC}/global/mail_params.h.bak
+sed <${WRKSRC}/global/mail_params.h.bak >${WRKSRC}/global/mail_params.h s+!!PREFIX!!+$PREFIX+g
+
+mv ${WRKSRC}/conf/main.cf ${WRKSRC}/conf/main.cf.bak
+sed <${WRKSRC}/conf/main.cf.bak >${WRKSRC}/conf/main.cf
+
+cd ${WRKSRC}/man
+
+for f in ${MAN1} ; do
+ mv man1/$f man1/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man1/$f.bak | soelim >man1/$f
+done
+
+for f in ${MAN5} ; do
+ mv man5/$f man5/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man5/$f.bak | soelim >man5/$f
+done
+
+for f in ${MAN8} ; do
+ mv man8/$f man8/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man8/$f.bak | soelim >man8/$f
+done
diff --git a/mail/postfix26/Makefile b/mail/postfix26/Makefile
new file mode 100644
index 000000000000..8c8e340a8706
--- /dev/null
+++ b/mail/postfix26/Makefile
@@ -0,0 +1,122 @@
+# New ports collection makefile for: postfix
+# Version required: postfix 19990317-pl03
+# Date created: 18 Mar 1999
+# Whom: torstenb
+#
+# $Id$
+#
+
+DISTNAME= postfix-19990317-pl03
+PKGNAME= postfix-alpha-19990317.03
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.merit.edu/postfix/ \
+ ftp://ftp.snoopy.net/pub/mirrors/postfix/ \
+ ftp://ftp.reverse.net/pub/postfix/ \
+ ftp://postfix.eu.org/pub/postfix/ \
+ ftp://ftp.sunet.se/pub/unix/mail/postfix/ \
+ ftp://ftp.cs.tu-berlin.de/pub/net/mail/postfix/ \
+ ftp://ftp.postfix.oaktree.co.uk/pub/postfix/
+
+MAINTAINER= torstenb@FreeBSD.ORG
+
+ALL_TARGET= default
+
+SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
+
+MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
+ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
+ sendmail.1
+MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
+MAN8= bounce.8 cleanup.8 defer.8 local.8 master.8 pickup.8 pipe.8 qmgr.8 \
+ showq.8 smtp.8 smtpd.8 trivial-rewrite.8
+
+do-install:
+ @mkdir -p -m 755 ${PREFIX}/etc/postfix
+ @chown root:wheel ${PREFIX}/etc/postfix
+ @install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
+ ${PREFIX}/etc/postfix/LICENSE
+ @for f in access main.cf master.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/sample-$$f ; \
+ done
+ @exit
+ @for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
+ sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
+ sample-rate.cf sample-relocated.cf sample-resource.cf \
+ sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
+ sample-transport.cf sample-virtual.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/$$f ;\
+ done
+ @install -C -o root -g wheel -m 755 ${WRKSRC}/conf/postfix-script-sgid \
+ ${PREFIX}/etc/postfix/postfix-script
+ @mkdir -p -m 0755 ${PREFIX}/libexec/postfix
+ @for f in bounce cleanup fsstone local master pickup pipe \
+ qmgr showq smtp smtp-sink smtp-source smtpd \
+ trivial-rewrite ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/libexec/postfix/$$f ;\
+ done
+ @for f in sendmail postalias postcat postconf postfix \
+ postkick postlock postlog postmap postsuper ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/sbin/$$f ;\
+ done
+ @install -C -o root -g wheel -m 0555 ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
+ @for f in ${MAN1} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
+ ${PREFIX}/man/man1/$$f ;\
+ done
+ @for f in ${MAN5} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man5/$$f \
+ ${PREFIX}/man/man5/$$f ;\
+ done
+ @for f in ${MAN8} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man8/$$f \
+ ${PREFIX}/man/man8/$$f ;\
+ done
+ @mkdir -p -m 0755 /var/spool/postfix
+ @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
+ ${PREFIX}/etc/postfix/main.cf; \
+ fi
+ @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
+ ${PREFIX}/etc/postfix/master.cf; \
+ fi
+ @echo "--------------------------------------------------"
+ @echo "- To replace your existing sendmail with postfix -"
+ @echo "- type \"make replace\" "
+ @echo "--------------------------------------------------"
+
+post-install:
+ @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
+replace:
+ @echo "===> Replacing sendmail"
+ @if [ -e /usr/sbin/sendmail ]; then \
+ ${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
+ chmod 0 /usr/sbin/sendmail.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
+ fi
+ @echo "===> Replacing mailq"
+ @if [ -e /usr/bin/mailq ]; then \
+ ${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
+ chmod 0 /usr/bin/mailq.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
+ fi
+ @echo "===> Replacing newaliases"
+ @if [ -e /usr/bin/newaliases ]; then \
+ ${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
+ chmod 0 /usr/bin/newaliases.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/mail/postfix26/distinfo b/mail/postfix26/distinfo
new file mode 100644
index 000000000000..0ff555aac014
--- /dev/null
+++ b/mail/postfix26/distinfo
@@ -0,0 +1 @@
+MD5 (postfix-19990317-pl03.tar.gz) = d40f5773f4886ecbff40908588f07406
diff --git a/mail/postfix26/files/patch-aa b/mail/postfix26/files/patch-aa
new file mode 100644
index 000000000000..3af6375f1959
--- /dev/null
+++ b/mail/postfix26/files/patch-aa
@@ -0,0 +1,36 @@
+*** global/mail_params.h.orig Sat Mar 20 15:09:46 1999
+--- global/mail_params.h Sat Mar 20 15:10:46 1999
+***************
+*** 127,133 ****
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "/usr/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+--- 127,133 ----
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "!!PREFIX!!/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+***************
+*** 161,167 ****
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
+--- 161,167 ----
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "!!PREFIX!!/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
diff --git a/mail/postfix26/files/patch-ab b/mail/postfix26/files/patch-ab
new file mode 100644
index 000000000000..6824371c251b
--- /dev/null
+++ b/mail/postfix26/files/patch-ab
@@ -0,0 +1,74 @@
+*** conf/main.cf.orig Mon Mar 29 22:10:14 1999
+--- conf/main.cf Mon Mar 29 22:13:09 1999
+***************
+*** 18,36 ****
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = /some/where/postfix/bin
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! #command_directory = /usr/sbin
+
+ # The daemon_directory parameter specifies the location of all Postfix
+ # daemon programs (i.e. programs listed in the master.cf file). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! #daemon_directory = /usr/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+--- 18,36 ----
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = !!PREFIX!!/pbexec/postfix
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! 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). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! daemon_directory = !!PREFIX!!/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+***************
+*** 40,53 ****
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! #mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! #default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
+--- 40,53 ----
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
diff --git a/mail/postfix26/files/patch-ba b/mail/postfix26/files/patch-ba
new file mode 100644
index 000000000000..73feeef81f27
--- /dev/null
+++ b/mail/postfix26/files/patch-ba
@@ -0,0 +1,19 @@
+*** man/man1/postdrop.1.orig Mon Mar 29 22:35:14 1999
+--- man/man1/postdrop.1 Mon Mar 29 22:35:25 1999
+***************
+*** 51,57 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 51,57 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix26/files/patch-bb b/mail/postfix26/files/patch-bb
new file mode 100644
index 000000000000..af024b23b3d9
--- /dev/null
+++ b/mail/postfix26/files/patch-bb
@@ -0,0 +1,36 @@
+*** man/man1/sendmail.1.orig Mon Mar 29 22:35:30 1999
+--- man/man1/sendmail.1 Mon Mar 29 22:35:44 1999
+***************
+*** 60,66 ****
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+--- 60,66 ----
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB!!PREFIX!!/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+***************
+*** 164,170 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 164,170 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix26/files/patch-bc b/mail/postfix26/files/patch-bc
new file mode 100644
index 000000000000..12a369684c8f
--- /dev/null
+++ b/mail/postfix26/files/patch-bc
@@ -0,0 +1,19 @@
+*** man/man5/access.5.orig Mon Mar 29 22:35:58 1999
+--- man/man5/access.5 Mon Mar 29 22:36:13 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix26/files/patch-bd b/mail/postfix26/files/patch-bd
new file mode 100644
index 000000000000..2b2f30f720f5
--- /dev/null
+++ b/mail/postfix26/files/patch-bd
@@ -0,0 +1,19 @@
+*** man/man5/canonical.5.orig Mon Mar 29 22:36:25 1999
+--- man/man5/canonical.5 Mon Mar 29 22:36:32 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix26/files/patch-be b/mail/postfix26/files/patch-be
new file mode 100644
index 000000000000..354737c7e68d
--- /dev/null
+++ b/mail/postfix26/files/patch-be
@@ -0,0 +1,19 @@
+*** man/man5/relocated.5.orig Mon Mar 29 22:36:36 1999
+--- man/man5/relocated.5 Mon Mar 29 22:36:47 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix26/files/patch-bf b/mail/postfix26/files/patch-bf
new file mode 100644
index 000000000000..4de817826469
--- /dev/null
+++ b/mail/postfix26/files/patch-bf
@@ -0,0 +1,19 @@
+*** man/man5/virtual.5.orig Mon Mar 29 22:36:55 1999
+--- man/man5/virtual.5 Mon Mar 29 22:37:02 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix26/files/patch-bg b/mail/postfix26/files/patch-bg
new file mode 100644
index 000000000000..fb2b093bff0f
--- /dev/null
+++ b/mail/postfix26/files/patch-bg
@@ -0,0 +1,19 @@
+*** man/man8/local.8.orig Mon Mar 29 22:37:14 1999
+--- man/man8/local.8 Mon Mar 29 22:37:44 1999
+***************
+*** 75,81 ****
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR or \fB/var/spool/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
+--- 75,81 ----
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
diff --git a/mail/postfix26/files/patch-bh b/mail/postfix26/files/patch-bh
new file mode 100644
index 000000000000..42b7373d3fb5
--- /dev/null
+++ b/mail/postfix26/files/patch-bh
@@ -0,0 +1,21 @@
+*** man/man8/cleanup.8.orig Mon Mar 29 22:37:59 1999
+--- man/man8/cleanup.8 Mon Mar 29 22:38:13 1999
+***************
+*** 118,125 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/canonical*, canonical mapping table
+! /etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
+--- 118,125 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/canonical*, canonical mapping table
+! !!PREFIX!!/etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
diff --git a/mail/postfix26/files/patch-bi b/mail/postfix26/files/patch-bi
new file mode 100644
index 000000000000..2b57467ed976
--- /dev/null
+++ b/mail/postfix26/files/patch-bi
@@ -0,0 +1,21 @@
+*** man/man8/master.8.orig Mon Mar 29 22:38:17 1999
+--- man/man8/master.8 Mon Mar 29 22:38:46 1999
+***************
+*** 116,123 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/main.cf: global configuration file.
+! /etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
+--- 116,123 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/main.cf: global configuration file.
+! !!PREFIX!!/etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
diff --git a/mail/postfix26/pkg-comment b/mail/postfix26/pkg-comment
new file mode 100644
index 000000000000..e9fea510ce32
--- /dev/null
+++ b/mail/postfix26/pkg-comment
@@ -0,0 +1 @@
+Postfix aims to be an alternative to sendmail
diff --git a/mail/postfix26/pkg-descr b/mail/postfix26/pkg-descr
new file mode 100644
index 000000000000..fa5e129bf08b
--- /dev/null
+++ b/mail/postfix26/pkg-descr
@@ -0,0 +1,6 @@
+Postfix aims to be an alternative to the widely-used sendmail
+program. Sendmail is responsible for 70% of all e-mail delivered
+on the Internet. With an estimated 100 million users, that's an
+estimated 10 billion (10^10) messages daily. A stunning number.
+
+See http://www.postfix.org/ for details
diff --git a/mail/postfix26/pkg-install b/mail/postfix26/pkg-install
new file mode 100644
index 000000000000..7b4849639b05
--- /dev/null
+++ b/mail/postfix26/pkg-install
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+user=postfix
+group=postfix
+group2=maildrop
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
+else
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+chown root:maildrop ${PREFIX}/sbin/postdrop
+chmod 2755 ${PREFIX}/sbin/postdrop
diff --git a/mail/postfix26/pkg-plist b/mail/postfix26/pkg-plist
new file mode 100644
index 000000000000..28bc453e2bc2
--- /dev/null
+++ b/mail/postfix26/pkg-plist
@@ -0,0 +1,49 @@
+etc/postfix/main.cf
+etc/postfix/LICENSE
+etc/postfix/sample-access
+etc/postfix/sample-main.cf
+etc/postfix/sample-master.cf
+etc/postfix/sample-aliases.cf
+etc/postfix/sample-canonical.cf
+etc/postfix/sample-debug.cf
+etc/postfix/sample-ldap.cf
+etc/postfix/sample-local.cf
+etc/postfix/sample-misc.cf
+etc/postfix/sample-pcre.cf
+etc/postfix/sample-rate.cf
+etc/postfix/sample-relocated.cf
+etc/postfix/sample-resource.cf
+etc/postfix/sample-rewrite.cf
+etc/postfix/sample-smtp.cf
+etc/postfix/sample-smtpd.cf
+etc/postfix/sample-transport.cf
+etc/postfix/sample-virtual.cf
+etc/postfix/postfix-script
+etc/postfix/master.cf
+libexec/postfix/bounce
+libexec/postfix/cleanup
+libexec/postfix/fsstone
+libexec/postfix/local
+libexec/postfix/master
+libexec/postfix/pickup
+libexec/postfix/pipe
+libexec/postfix/qmgr
+libexec/postfix/showq
+libexec/postfix/smtp
+libexec/postfix/smtp-sink
+libexec/postfix/smtp-source
+libexec/postfix/smtpd
+libexec/postfix/trivial-rewrite
+sbin/sendmail
+sbin/postalias
+sbin/postcat
+sbin/postconf
+sbin/postfix
+sbin/postkick
+sbin/postlock
+sbin/postlog
+sbin/postmap
+sbin/postsuper
+sbin/postdrop
+@exec mkdir -p -m 0755 /var/spool/postfix
+@exec chown root:wheel /var/spool/postfix
diff --git a/mail/postfix26/scripts/configure b/mail/postfix26/scripts/configure
new file mode 100644
index 000000000000..48d9220b478d
--- /dev/null
+++ b/mail/postfix26/scripts/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $Id$
+
+mv ${WRKSRC}/global/mail_params.h ${WRKSRC}/global/mail_params.h.bak
+sed <${WRKSRC}/global/mail_params.h.bak >${WRKSRC}/global/mail_params.h s+!!PREFIX!!+$PREFIX+g
+
+mv ${WRKSRC}/conf/main.cf ${WRKSRC}/conf/main.cf.bak
+sed <${WRKSRC}/conf/main.cf.bak >${WRKSRC}/conf/main.cf
+
+cd ${WRKSRC}/man
+
+for f in ${MAN1} ; do
+ mv man1/$f man1/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man1/$f.bak | soelim >man1/$f
+done
+
+for f in ${MAN5} ; do
+ mv man5/$f man5/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man5/$f.bak | soelim >man5/$f
+done
+
+for f in ${MAN8} ; do
+ mv man8/$f man8/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man8/$f.bak | soelim >man8/$f
+done
diff --git a/mail/postfix27/Makefile b/mail/postfix27/Makefile
new file mode 100644
index 000000000000..8c8e340a8706
--- /dev/null
+++ b/mail/postfix27/Makefile
@@ -0,0 +1,122 @@
+# New ports collection makefile for: postfix
+# Version required: postfix 19990317-pl03
+# Date created: 18 Mar 1999
+# Whom: torstenb
+#
+# $Id$
+#
+
+DISTNAME= postfix-19990317-pl03
+PKGNAME= postfix-alpha-19990317.03
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.merit.edu/postfix/ \
+ ftp://ftp.snoopy.net/pub/mirrors/postfix/ \
+ ftp://ftp.reverse.net/pub/postfix/ \
+ ftp://postfix.eu.org/pub/postfix/ \
+ ftp://ftp.sunet.se/pub/unix/mail/postfix/ \
+ ftp://ftp.cs.tu-berlin.de/pub/net/mail/postfix/ \
+ ftp://ftp.postfix.oaktree.co.uk/pub/postfix/
+
+MAINTAINER= torstenb@FreeBSD.ORG
+
+ALL_TARGET= default
+
+SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
+
+MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
+ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
+ sendmail.1
+MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
+MAN8= bounce.8 cleanup.8 defer.8 local.8 master.8 pickup.8 pipe.8 qmgr.8 \
+ showq.8 smtp.8 smtpd.8 trivial-rewrite.8
+
+do-install:
+ @mkdir -p -m 755 ${PREFIX}/etc/postfix
+ @chown root:wheel ${PREFIX}/etc/postfix
+ @install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
+ ${PREFIX}/etc/postfix/LICENSE
+ @for f in access main.cf master.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/sample-$$f ; \
+ done
+ @exit
+ @for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
+ sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
+ sample-rate.cf sample-relocated.cf sample-resource.cf \
+ sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
+ sample-transport.cf sample-virtual.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/$$f ;\
+ done
+ @install -C -o root -g wheel -m 755 ${WRKSRC}/conf/postfix-script-sgid \
+ ${PREFIX}/etc/postfix/postfix-script
+ @mkdir -p -m 0755 ${PREFIX}/libexec/postfix
+ @for f in bounce cleanup fsstone local master pickup pipe \
+ qmgr showq smtp smtp-sink smtp-source smtpd \
+ trivial-rewrite ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/libexec/postfix/$$f ;\
+ done
+ @for f in sendmail postalias postcat postconf postfix \
+ postkick postlock postlog postmap postsuper ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/sbin/$$f ;\
+ done
+ @install -C -o root -g wheel -m 0555 ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
+ @for f in ${MAN1} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
+ ${PREFIX}/man/man1/$$f ;\
+ done
+ @for f in ${MAN5} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man5/$$f \
+ ${PREFIX}/man/man5/$$f ;\
+ done
+ @for f in ${MAN8} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man8/$$f \
+ ${PREFIX}/man/man8/$$f ;\
+ done
+ @mkdir -p -m 0755 /var/spool/postfix
+ @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
+ ${PREFIX}/etc/postfix/main.cf; \
+ fi
+ @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
+ ${PREFIX}/etc/postfix/master.cf; \
+ fi
+ @echo "--------------------------------------------------"
+ @echo "- To replace your existing sendmail with postfix -"
+ @echo "- type \"make replace\" "
+ @echo "--------------------------------------------------"
+
+post-install:
+ @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
+replace:
+ @echo "===> Replacing sendmail"
+ @if [ -e /usr/sbin/sendmail ]; then \
+ ${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
+ chmod 0 /usr/sbin/sendmail.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
+ fi
+ @echo "===> Replacing mailq"
+ @if [ -e /usr/bin/mailq ]; then \
+ ${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
+ chmod 0 /usr/bin/mailq.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
+ fi
+ @echo "===> Replacing newaliases"
+ @if [ -e /usr/bin/newaliases ]; then \
+ ${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
+ chmod 0 /usr/bin/newaliases.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/mail/postfix27/distinfo b/mail/postfix27/distinfo
new file mode 100644
index 000000000000..0ff555aac014
--- /dev/null
+++ b/mail/postfix27/distinfo
@@ -0,0 +1 @@
+MD5 (postfix-19990317-pl03.tar.gz) = d40f5773f4886ecbff40908588f07406
diff --git a/mail/postfix27/files/patch-aa b/mail/postfix27/files/patch-aa
new file mode 100644
index 000000000000..3af6375f1959
--- /dev/null
+++ b/mail/postfix27/files/patch-aa
@@ -0,0 +1,36 @@
+*** global/mail_params.h.orig Sat Mar 20 15:09:46 1999
+--- global/mail_params.h Sat Mar 20 15:10:46 1999
+***************
+*** 127,133 ****
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "/usr/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+--- 127,133 ----
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "!!PREFIX!!/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+***************
+*** 161,167 ****
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
+--- 161,167 ----
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "!!PREFIX!!/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
diff --git a/mail/postfix27/files/patch-ab b/mail/postfix27/files/patch-ab
new file mode 100644
index 000000000000..6824371c251b
--- /dev/null
+++ b/mail/postfix27/files/patch-ab
@@ -0,0 +1,74 @@
+*** conf/main.cf.orig Mon Mar 29 22:10:14 1999
+--- conf/main.cf Mon Mar 29 22:13:09 1999
+***************
+*** 18,36 ****
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = /some/where/postfix/bin
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! #command_directory = /usr/sbin
+
+ # The daemon_directory parameter specifies the location of all Postfix
+ # daemon programs (i.e. programs listed in the master.cf file). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! #daemon_directory = /usr/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+--- 18,36 ----
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = !!PREFIX!!/pbexec/postfix
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! 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). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! daemon_directory = !!PREFIX!!/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+***************
+*** 40,53 ****
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! #mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! #default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
+--- 40,53 ----
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
diff --git a/mail/postfix27/files/patch-ba b/mail/postfix27/files/patch-ba
new file mode 100644
index 000000000000..73feeef81f27
--- /dev/null
+++ b/mail/postfix27/files/patch-ba
@@ -0,0 +1,19 @@
+*** man/man1/postdrop.1.orig Mon Mar 29 22:35:14 1999
+--- man/man1/postdrop.1 Mon Mar 29 22:35:25 1999
+***************
+*** 51,57 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 51,57 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix27/files/patch-bb b/mail/postfix27/files/patch-bb
new file mode 100644
index 000000000000..af024b23b3d9
--- /dev/null
+++ b/mail/postfix27/files/patch-bb
@@ -0,0 +1,36 @@
+*** man/man1/sendmail.1.orig Mon Mar 29 22:35:30 1999
+--- man/man1/sendmail.1 Mon Mar 29 22:35:44 1999
+***************
+*** 60,66 ****
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+--- 60,66 ----
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB!!PREFIX!!/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+***************
+*** 164,170 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 164,170 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix27/files/patch-bc b/mail/postfix27/files/patch-bc
new file mode 100644
index 000000000000..12a369684c8f
--- /dev/null
+++ b/mail/postfix27/files/patch-bc
@@ -0,0 +1,19 @@
+*** man/man5/access.5.orig Mon Mar 29 22:35:58 1999
+--- man/man5/access.5 Mon Mar 29 22:36:13 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix27/files/patch-bd b/mail/postfix27/files/patch-bd
new file mode 100644
index 000000000000..2b2f30f720f5
--- /dev/null
+++ b/mail/postfix27/files/patch-bd
@@ -0,0 +1,19 @@
+*** man/man5/canonical.5.orig Mon Mar 29 22:36:25 1999
+--- man/man5/canonical.5 Mon Mar 29 22:36:32 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix27/files/patch-be b/mail/postfix27/files/patch-be
new file mode 100644
index 000000000000..354737c7e68d
--- /dev/null
+++ b/mail/postfix27/files/patch-be
@@ -0,0 +1,19 @@
+*** man/man5/relocated.5.orig Mon Mar 29 22:36:36 1999
+--- man/man5/relocated.5 Mon Mar 29 22:36:47 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix27/files/patch-bf b/mail/postfix27/files/patch-bf
new file mode 100644
index 000000000000..4de817826469
--- /dev/null
+++ b/mail/postfix27/files/patch-bf
@@ -0,0 +1,19 @@
+*** man/man5/virtual.5.orig Mon Mar 29 22:36:55 1999
+--- man/man5/virtual.5 Mon Mar 29 22:37:02 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix27/files/patch-bg b/mail/postfix27/files/patch-bg
new file mode 100644
index 000000000000..fb2b093bff0f
--- /dev/null
+++ b/mail/postfix27/files/patch-bg
@@ -0,0 +1,19 @@
+*** man/man8/local.8.orig Mon Mar 29 22:37:14 1999
+--- man/man8/local.8 Mon Mar 29 22:37:44 1999
+***************
+*** 75,81 ****
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR or \fB/var/spool/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
+--- 75,81 ----
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
diff --git a/mail/postfix27/files/patch-bh b/mail/postfix27/files/patch-bh
new file mode 100644
index 000000000000..42b7373d3fb5
--- /dev/null
+++ b/mail/postfix27/files/patch-bh
@@ -0,0 +1,21 @@
+*** man/man8/cleanup.8.orig Mon Mar 29 22:37:59 1999
+--- man/man8/cleanup.8 Mon Mar 29 22:38:13 1999
+***************
+*** 118,125 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/canonical*, canonical mapping table
+! /etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
+--- 118,125 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/canonical*, canonical mapping table
+! !!PREFIX!!/etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
diff --git a/mail/postfix27/files/patch-bi b/mail/postfix27/files/patch-bi
new file mode 100644
index 000000000000..2b57467ed976
--- /dev/null
+++ b/mail/postfix27/files/patch-bi
@@ -0,0 +1,21 @@
+*** man/man8/master.8.orig Mon Mar 29 22:38:17 1999
+--- man/man8/master.8 Mon Mar 29 22:38:46 1999
+***************
+*** 116,123 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/main.cf: global configuration file.
+! /etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
+--- 116,123 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/main.cf: global configuration file.
+! !!PREFIX!!/etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
diff --git a/mail/postfix27/pkg-comment b/mail/postfix27/pkg-comment
new file mode 100644
index 000000000000..e9fea510ce32
--- /dev/null
+++ b/mail/postfix27/pkg-comment
@@ -0,0 +1 @@
+Postfix aims to be an alternative to sendmail
diff --git a/mail/postfix27/pkg-descr b/mail/postfix27/pkg-descr
new file mode 100644
index 000000000000..fa5e129bf08b
--- /dev/null
+++ b/mail/postfix27/pkg-descr
@@ -0,0 +1,6 @@
+Postfix aims to be an alternative to the widely-used sendmail
+program. Sendmail is responsible for 70% of all e-mail delivered
+on the Internet. With an estimated 100 million users, that's an
+estimated 10 billion (10^10) messages daily. A stunning number.
+
+See http://www.postfix.org/ for details
diff --git a/mail/postfix27/pkg-install b/mail/postfix27/pkg-install
new file mode 100644
index 000000000000..7b4849639b05
--- /dev/null
+++ b/mail/postfix27/pkg-install
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+user=postfix
+group=postfix
+group2=maildrop
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
+else
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+chown root:maildrop ${PREFIX}/sbin/postdrop
+chmod 2755 ${PREFIX}/sbin/postdrop
diff --git a/mail/postfix27/pkg-plist b/mail/postfix27/pkg-plist
new file mode 100644
index 000000000000..28bc453e2bc2
--- /dev/null
+++ b/mail/postfix27/pkg-plist
@@ -0,0 +1,49 @@
+etc/postfix/main.cf
+etc/postfix/LICENSE
+etc/postfix/sample-access
+etc/postfix/sample-main.cf
+etc/postfix/sample-master.cf
+etc/postfix/sample-aliases.cf
+etc/postfix/sample-canonical.cf
+etc/postfix/sample-debug.cf
+etc/postfix/sample-ldap.cf
+etc/postfix/sample-local.cf
+etc/postfix/sample-misc.cf
+etc/postfix/sample-pcre.cf
+etc/postfix/sample-rate.cf
+etc/postfix/sample-relocated.cf
+etc/postfix/sample-resource.cf
+etc/postfix/sample-rewrite.cf
+etc/postfix/sample-smtp.cf
+etc/postfix/sample-smtpd.cf
+etc/postfix/sample-transport.cf
+etc/postfix/sample-virtual.cf
+etc/postfix/postfix-script
+etc/postfix/master.cf
+libexec/postfix/bounce
+libexec/postfix/cleanup
+libexec/postfix/fsstone
+libexec/postfix/local
+libexec/postfix/master
+libexec/postfix/pickup
+libexec/postfix/pipe
+libexec/postfix/qmgr
+libexec/postfix/showq
+libexec/postfix/smtp
+libexec/postfix/smtp-sink
+libexec/postfix/smtp-source
+libexec/postfix/smtpd
+libexec/postfix/trivial-rewrite
+sbin/sendmail
+sbin/postalias
+sbin/postcat
+sbin/postconf
+sbin/postfix
+sbin/postkick
+sbin/postlock
+sbin/postlog
+sbin/postmap
+sbin/postsuper
+sbin/postdrop
+@exec mkdir -p -m 0755 /var/spool/postfix
+@exec chown root:wheel /var/spool/postfix
diff --git a/mail/postfix27/scripts/configure b/mail/postfix27/scripts/configure
new file mode 100644
index 000000000000..48d9220b478d
--- /dev/null
+++ b/mail/postfix27/scripts/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $Id$
+
+mv ${WRKSRC}/global/mail_params.h ${WRKSRC}/global/mail_params.h.bak
+sed <${WRKSRC}/global/mail_params.h.bak >${WRKSRC}/global/mail_params.h s+!!PREFIX!!+$PREFIX+g
+
+mv ${WRKSRC}/conf/main.cf ${WRKSRC}/conf/main.cf.bak
+sed <${WRKSRC}/conf/main.cf.bak >${WRKSRC}/conf/main.cf
+
+cd ${WRKSRC}/man
+
+for f in ${MAN1} ; do
+ mv man1/$f man1/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man1/$f.bak | soelim >man1/$f
+done
+
+for f in ${MAN5} ; do
+ mv man5/$f man5/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man5/$f.bak | soelim >man5/$f
+done
+
+for f in ${MAN8} ; do
+ mv man8/$f man8/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man8/$f.bak | soelim >man8/$f
+done
diff --git a/mail/postfix28/Makefile b/mail/postfix28/Makefile
new file mode 100644
index 000000000000..8c8e340a8706
--- /dev/null
+++ b/mail/postfix28/Makefile
@@ -0,0 +1,122 @@
+# New ports collection makefile for: postfix
+# Version required: postfix 19990317-pl03
+# Date created: 18 Mar 1999
+# Whom: torstenb
+#
+# $Id$
+#
+
+DISTNAME= postfix-19990317-pl03
+PKGNAME= postfix-alpha-19990317.03
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.merit.edu/postfix/ \
+ ftp://ftp.snoopy.net/pub/mirrors/postfix/ \
+ ftp://ftp.reverse.net/pub/postfix/ \
+ ftp://postfix.eu.org/pub/postfix/ \
+ ftp://ftp.sunet.se/pub/unix/mail/postfix/ \
+ ftp://ftp.cs.tu-berlin.de/pub/net/mail/postfix/ \
+ ftp://ftp.postfix.oaktree.co.uk/pub/postfix/
+
+MAINTAINER= torstenb@FreeBSD.ORG
+
+ALL_TARGET= default
+
+SCRIPTS_ENV+= MAN1="${MAN1}" MAN5="${MAN5}" MAN8="${MAN8}"
+
+MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
+ postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postsuper.1 \
+ sendmail.1
+MAN5= access.5 aliases.5 canonical.5 relocated.5 transport.5 virtual.5
+MAN8= bounce.8 cleanup.8 defer.8 local.8 master.8 pickup.8 pipe.8 qmgr.8 \
+ showq.8 smtp.8 smtpd.8 trivial-rewrite.8
+
+do-install:
+ @mkdir -p -m 755 ${PREFIX}/etc/postfix
+ @chown root:wheel ${PREFIX}/etc/postfix
+ @install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/LICENSE \
+ ${PREFIX}/etc/postfix/LICENSE
+ @for f in access main.cf master.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/sample-$$f ; \
+ done
+ @exit
+ @for f in sample-aliases.cf sample-canonical.cf sample-debug.cf \
+ sample-ldap.cf sample-local.cf sample-misc.cf sample-pcre.cf \
+ sample-rate.cf sample-relocated.cf sample-resource.cf \
+ sample-rewrite.cf sample-smtp.cf sample-smtpd.cf \
+ sample-transport.cf sample-virtual.cf ; do \
+ install -C -o root -g wheel -m 0644 ${WRKSRC}/conf/$$f \
+ ${PREFIX}/etc/postfix/$$f ;\
+ done
+ @install -C -o root -g wheel -m 755 ${WRKSRC}/conf/postfix-script-sgid \
+ ${PREFIX}/etc/postfix/postfix-script
+ @mkdir -p -m 0755 ${PREFIX}/libexec/postfix
+ @for f in bounce cleanup fsstone local master pickup pipe \
+ qmgr showq smtp smtp-sink smtp-source smtpd \
+ trivial-rewrite ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/libexec/postfix/$$f ;\
+ done
+ @for f in sendmail postalias postcat postconf postfix \
+ postkick postlock postlog postmap postsuper ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/bin/$$f \
+ ${PREFIX}/sbin/$$f ;\
+ done
+ @install -C -o root -g wheel -m 0555 ${WRKSRC}/bin/postdrop \
+ ${PREFIX}/sbin/postdrop
+ @for f in ${MAN1} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man1/$$f \
+ ${PREFIX}/man/man1/$$f ;\
+ done
+ @for f in ${MAN5} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man5/$$f \
+ ${PREFIX}/man/man5/$$f ;\
+ done
+ @for f in ${MAN8} ; do \
+ install -C -o root -g wheel -m 0755 ${WRKSRC}/man/man8/$$f \
+ ${PREFIX}/man/man8/$$f ;\
+ done
+ @mkdir -p -m 0755 /var/spool/postfix
+ @if [ ! -e ${PREFIX}/etc/postfix/main.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-main.cf \
+ ${PREFIX}/etc/postfix/main.cf; \
+ fi
+ @if [ ! -e ${PREFIX}/etc/postfix/master.cf ]; then \
+ ${CP} -p ${PREFIX}/etc/postfix/sample-master.cf \
+ ${PREFIX}/etc/postfix/master.cf; \
+ fi
+ @echo "--------------------------------------------------"
+ @echo "- To replace your existing sendmail with postfix -"
+ @echo "- type \"make replace\" "
+ @echo "--------------------------------------------------"
+
+post-install:
+ @PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+
+replace:
+ @echo "===> Replacing sendmail"
+ @if [ -e /usr/sbin/sendmail ]; then \
+ ${MV} -f /usr/sbin/sendmail /usr/sbin/sendmail.OFF; \
+ chmod 0 /usr/sbin/sendmail.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/sbin/sendmail; \
+ fi
+ @echo "===> Replacing mailq"
+ @if [ -e /usr/bin/mailq ]; then \
+ ${MV} -f /usr/bin/mailq /usr/bin/mailq.OFF; \
+ chmod 0 /usr/bin/mailq.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/mailq; \
+ fi
+ @echo "===> Replacing newaliases"
+ @if [ -e /usr/bin/newaliases ]; then \
+ ${MV} -f /usr/bin/newaliases /usr/bin/newaliases.OFF; \
+ chmod 0 /usr/bin/newaliases.OFF; \
+ fi
+ @if [ -e ${PREFIX}/sbin/sendmail ]; then \
+ ln -s ${PREFIX}/sbin/sendmail /usr/bin/newaliases; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/mail/postfix28/distinfo b/mail/postfix28/distinfo
new file mode 100644
index 000000000000..0ff555aac014
--- /dev/null
+++ b/mail/postfix28/distinfo
@@ -0,0 +1 @@
+MD5 (postfix-19990317-pl03.tar.gz) = d40f5773f4886ecbff40908588f07406
diff --git a/mail/postfix28/files/patch-aa b/mail/postfix28/files/patch-aa
new file mode 100644
index 000000000000..3af6375f1959
--- /dev/null
+++ b/mail/postfix28/files/patch-aa
@@ -0,0 +1,36 @@
+*** global/mail_params.h.orig Sat Mar 20 15:09:46 1999
+--- global/mail_params.h Sat Mar 20 15:10:46 1999
+***************
+*** 127,133 ****
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "/usr/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+--- 127,133 ----
+ */
+ #define VAR_PROGRAM_DIR "program_directory"
+ #ifndef DEF_PROGRAM_DIR
+! #define DEF_PROGRAM_DIR "!!PREFIX!!/libexec/postfix"
+ #endif
+
+ #define VAR_DAEMON_DIR "daemon_directory"
+***************
+*** 161,167 ****
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
+--- 161,167 ----
+ */
+ #define VAR_CONFIG_DIR "config_directory"
+ #ifndef DEF_CONFIG_DIR
+! #define DEF_CONFIG_DIR "!!PREFIX!!/etc/postfix"
+ #endif
+ extern char *var_config_dir;
+
diff --git a/mail/postfix28/files/patch-ab b/mail/postfix28/files/patch-ab
new file mode 100644
index 000000000000..6824371c251b
--- /dev/null
+++ b/mail/postfix28/files/patch-ab
@@ -0,0 +1,74 @@
+*** conf/main.cf.orig Mon Mar 29 22:10:14 1999
+--- conf/main.cf Mon Mar 29 22:13:09 1999
+***************
+*** 18,36 ****
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = /some/where/postfix/bin
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! #command_directory = /usr/sbin
+
+ # The daemon_directory parameter specifies the location of all Postfix
+ # daemon programs (i.e. programs listed in the master.cf file). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! #daemon_directory = /usr/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+--- 18,36 ----
+ # Postfix support programs and daemons. This setting can be overruled
+ # with the command_directory and daemon_directory parameters.
+ #
+! program_directory = !!PREFIX!!/pbexec/postfix
+
+ # The command_directory parameter specifies the location of all
+ # postXXX commands. The default value is $program_directory.
+ #
+! 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). The
+ # default value is $program_directory. This directory must be owned
+ # by root.
+ #
+! daemon_directory = !!PREFIX!!/libexec/postfix
+
+ # QUEUE AND PROCESS OWNERSHIP
+ #
+***************
+*** 40,53 ****
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! #mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! #default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
+--- 40,53 ----
+ # OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In particular,
+ # don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
+ #
+! mail_owner = postfix
+
+ # The default_privs parameter specifies the default rights used by
+ # the local delivery agent for delivery to external file or command.
+ # These rights are used in the absence of a recipient user context.
+ # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
+ #
+! default_privs = nobody
+
+ # INTERNET HOST AND DOMAIN NAMES
+ #
diff --git a/mail/postfix28/files/patch-ba b/mail/postfix28/files/patch-ba
new file mode 100644
index 000000000000..73feeef81f27
--- /dev/null
+++ b/mail/postfix28/files/patch-ba
@@ -0,0 +1,19 @@
+*** man/man1/postdrop.1.orig Mon Mar 29 22:35:14 1999
+--- man/man1/postdrop.1 Mon Mar 29 22:35:25 1999
+***************
+*** 51,57 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 51,57 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix28/files/patch-bb b/mail/postfix28/files/patch-bb
new file mode 100644
index 000000000000..af024b23b3d9
--- /dev/null
+++ b/mail/postfix28/files/patch-bb
@@ -0,0 +1,36 @@
+*** man/man1/sendmail.1.orig Mon Mar 29 22:35:30 1999
+--- man/man1/sendmail.1 Mon Mar 29 22:35:44 1999
+***************
+*** 60,66 ****
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+--- 60,66 ----
+ \fBjust-send-eight\fR.
+ .IP "\fB-C \fIconfig_file\fR (ignored :-)"
+ The path name of the \fBsendmail.cf\fR file. Postfix configuration
+! files are kept in \fB!!PREFIX!!/etc/postfix\fR.
+ .IP "\fB-F \fIfull_name\fR
+ Set the sender full name. This is used only with messages that
+ have no \fBFrom:\fR message header.
+***************
+*** 164,170 ****
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! /etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
+--- 164,170 ----
+ .na
+ .nf
+ /var/spool/postfix, mail queue
+! !!PREFIX!!/etc/postfix, configuration files
+ .SH CONFIGURATION PARAMETERS
+ .na
+ .nf
diff --git a/mail/postfix28/files/patch-bc b/mail/postfix28/files/patch-bc
new file mode 100644
index 000000000000..12a369684c8f
--- /dev/null
+++ b/mail/postfix28/files/patch-bc
@@ -0,0 +1,19 @@
+*** man/man5/access.5.orig Mon Mar 29 22:35:58 1999
+--- man/man5/access.5 Mon Mar 29 22:36:13 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/access\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix28/files/patch-bd b/mail/postfix28/files/patch-bd
new file mode 100644
index 000000000000..2b2f30f720f5
--- /dev/null
+++ b/mail/postfix28/files/patch-bd
@@ -0,0 +1,19 @@
+*** man/man5/canonical.5.orig Mon Mar 29 22:36:25 1999
+--- man/man5/canonical.5 Mon Mar 29 22:36:32 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/canonical\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix28/files/patch-be b/mail/postfix28/files/patch-be
new file mode 100644
index 000000000000..354737c7e68d
--- /dev/null
+++ b/mail/postfix28/files/patch-be
@@ -0,0 +1,19 @@
+*** man/man5/relocated.5.orig Mon Mar 29 22:36:36 1999
+--- man/man5/relocated.5 Mon Mar 29 22:36:47 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/relocated\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix28/files/patch-bf b/mail/postfix28/files/patch-bf
new file mode 100644
index 000000000000..4de817826469
--- /dev/null
+++ b/mail/postfix28/files/patch-bf
@@ -0,0 +1,19 @@
+*** man/man5/virtual.5.orig Mon Mar 29 22:36:55 1999
+--- man/man5/virtual.5 Mon Mar 29 22:37:02 1999
+***************
+*** 8,14 ****
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap /etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
+--- 8,14 ----
+ .SH SYNOPSIS
+ .na
+ .nf
+! \fBpostmap !!PREFIX!!/etc/postfix/virtual\fR
+ .SH DESCRIPTION
+ .ad
+ .fi
diff --git a/mail/postfix28/files/patch-bg b/mail/postfix28/files/patch-bg
new file mode 100644
index 000000000000..fb2b093bff0f
--- /dev/null
+++ b/mail/postfix28/files/patch-bg
@@ -0,0 +1,19 @@
+*** man/man8/local.8.orig Mon Mar 29 22:37:14 1999
+--- man/man8/local.8 Mon Mar 29 22:37:44 1999
+***************
+*** 75,81 ****
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR or \fB/var/spool/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
+--- 75,81 ----
+ .ad
+ .fi
+ The default per-user mailbox is a file in the UNIX mail spool
+! directory (\fB/var/mail/\fIuser\fR);
+ the location can be specified with the \fBmail_spool_directory\fR
+ configuration parameter.
+
diff --git a/mail/postfix28/files/patch-bh b/mail/postfix28/files/patch-bh
new file mode 100644
index 000000000000..42b7373d3fb5
--- /dev/null
+++ b/mail/postfix28/files/patch-bh
@@ -0,0 +1,21 @@
+*** man/man8/cleanup.8.orig Mon Mar 29 22:37:59 1999
+--- man/man8/cleanup.8 Mon Mar 29 22:38:13 1999
+***************
+*** 118,125 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/canonical*, canonical mapping table
+! /etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
+--- 118,125 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/canonical*, canonical mapping table
+! !!PREFIX!!/etc/postfix/virtual*, virtual mapping table
+ .SH LICENSE
+ .na
+ .nf
diff --git a/mail/postfix28/files/patch-bi b/mail/postfix28/files/patch-bi
new file mode 100644
index 000000000000..2b57467ed976
--- /dev/null
+++ b/mail/postfix28/files/patch-bi
@@ -0,0 +1,21 @@
+*** man/man8/master.8.orig Mon Mar 29 22:38:17 1999
+--- man/man8/master.8 Mon Mar 29 22:38:46 1999
+***************
+*** 116,123 ****
+ .SH FILES
+ .na
+ .nf
+! /etc/postfix/main.cf: global configuration file.
+! /etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
+--- 116,123 ----
+ .SH FILES
+ .na
+ .nf
+! !!PREFIX!!/etc/postfix/main.cf: global configuration file.
+! !!PREFIX!!/etc/postfix/master.cf: master process configuration file.
+ /var/spool/postfix/pid/master.pid: master lock file.
+ .SH SEE ALSO
+ .na
diff --git a/mail/postfix28/pkg-comment b/mail/postfix28/pkg-comment
new file mode 100644
index 000000000000..e9fea510ce32
--- /dev/null
+++ b/mail/postfix28/pkg-comment
@@ -0,0 +1 @@
+Postfix aims to be an alternative to sendmail
diff --git a/mail/postfix28/pkg-descr b/mail/postfix28/pkg-descr
new file mode 100644
index 000000000000..fa5e129bf08b
--- /dev/null
+++ b/mail/postfix28/pkg-descr
@@ -0,0 +1,6 @@
+Postfix aims to be an alternative to the widely-used sendmail
+program. Sendmail is responsible for 70% of all e-mail delivered
+on the Internet. With an estimated 100 million users, that's an
+estimated 10 billion (10^10) messages daily. A stunning number.
+
+See http://www.postfix.org/ for details
diff --git a/mail/postfix28/pkg-install b/mail/postfix28/pkg-install
new file mode 100644
index 000000000000..7b4849639b05
--- /dev/null
+++ b/mail/postfix28/pkg-install
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+user=postfix
+group=postfix
+group2=maildrop
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw groupshow "${group2}" 2>/dev/null; then
+ echo "You already have a group \"${group2}\", so I will use it."
+else
+ echo "You need a group \"${group2}\"."
+ if yesno "Would you like me to create it" y; then
+ pw groupadd ${group2} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+if pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ pw useradd ${user} -g ${group} -h - -d /nonexistent \
+ -s /nonexistent -c "Postfix Mail System" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+fi
+
+chown root:maildrop ${PREFIX}/sbin/postdrop
+chmod 2755 ${PREFIX}/sbin/postdrop
diff --git a/mail/postfix28/pkg-plist b/mail/postfix28/pkg-plist
new file mode 100644
index 000000000000..28bc453e2bc2
--- /dev/null
+++ b/mail/postfix28/pkg-plist
@@ -0,0 +1,49 @@
+etc/postfix/main.cf
+etc/postfix/LICENSE
+etc/postfix/sample-access
+etc/postfix/sample-main.cf
+etc/postfix/sample-master.cf
+etc/postfix/sample-aliases.cf
+etc/postfix/sample-canonical.cf
+etc/postfix/sample-debug.cf
+etc/postfix/sample-ldap.cf
+etc/postfix/sample-local.cf
+etc/postfix/sample-misc.cf
+etc/postfix/sample-pcre.cf
+etc/postfix/sample-rate.cf
+etc/postfix/sample-relocated.cf
+etc/postfix/sample-resource.cf
+etc/postfix/sample-rewrite.cf
+etc/postfix/sample-smtp.cf
+etc/postfix/sample-smtpd.cf
+etc/postfix/sample-transport.cf
+etc/postfix/sample-virtual.cf
+etc/postfix/postfix-script
+etc/postfix/master.cf
+libexec/postfix/bounce
+libexec/postfix/cleanup
+libexec/postfix/fsstone
+libexec/postfix/local
+libexec/postfix/master
+libexec/postfix/pickup
+libexec/postfix/pipe
+libexec/postfix/qmgr
+libexec/postfix/showq
+libexec/postfix/smtp
+libexec/postfix/smtp-sink
+libexec/postfix/smtp-source
+libexec/postfix/smtpd
+libexec/postfix/trivial-rewrite
+sbin/sendmail
+sbin/postalias
+sbin/postcat
+sbin/postconf
+sbin/postfix
+sbin/postkick
+sbin/postlock
+sbin/postlog
+sbin/postmap
+sbin/postsuper
+sbin/postdrop
+@exec mkdir -p -m 0755 /var/spool/postfix
+@exec chown root:wheel /var/spool/postfix
diff --git a/mail/postfix28/scripts/configure b/mail/postfix28/scripts/configure
new file mode 100644
index 000000000000..48d9220b478d
--- /dev/null
+++ b/mail/postfix28/scripts/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $Id$
+
+mv ${WRKSRC}/global/mail_params.h ${WRKSRC}/global/mail_params.h.bak
+sed <${WRKSRC}/global/mail_params.h.bak >${WRKSRC}/global/mail_params.h s+!!PREFIX!!+$PREFIX+g
+
+mv ${WRKSRC}/conf/main.cf ${WRKSRC}/conf/main.cf.bak
+sed <${WRKSRC}/conf/main.cf.bak >${WRKSRC}/conf/main.cf
+
+cd ${WRKSRC}/man
+
+for f in ${MAN1} ; do
+ mv man1/$f man1/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man1/$f.bak | soelim >man1/$f
+done
+
+for f in ${MAN5} ; do
+ mv man5/$f man5/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man5/$f.bak | soelim >man5/$f
+done
+
+for f in ${MAN8} ; do
+ mv man8/$f man8/$f.bak && \
+ sed s+!!PREFIX!!+$PREFIX+g <man8/$f.bak | soelim >man8/$f
+done