- Downgrade to 2.5.7 after repocopy

PR:		134711
Submitted by:	ohauer@gmx.de
This commit is contained in:
Martin Wilke 2009-09-30 12:50:04 +00:00
parent b35329bd12
commit c73395b1d7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=242262
9 changed files with 286 additions and 290 deletions

View file

@ -6,8 +6,8 @@
#
PORTNAME= postfix
PORTVERSION= 2.6.5
PORTEPOCH= 1
PORTVERSION= 2.5.7
PORTEPOCH= 2
CATEGORIES= mail ipv6
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \
ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/%SUBDIR%/ \
@ -22,14 +22,12 @@ DIST_SUBDIR= ${PORTNAME}
MAINTAINER= sahil@tandon.net
COMMENT= A secure alternative to widely-used Sendmail
VDAVERSION= 2.6.5
CONFLICTS= courier-0.* postfix-1.* postfix-2.[0-57-9].* postfix-current-2.* \
CONFLICTS= courier-0.* postfix-1.* postfix-2.[0-46-9].* postfix-current-2.* \
sendmail-8.* sendmail-*-8.* smail-3.* zmailer-2.*
USE_SUBMAKE= yes
USE_PERL5_BUILD=yes
USE_RC_SUBR= postfix.sh
SCRIPTS_ENV+= POSTFIX_DEFAULT_MTA="${POSTFIX_DEFAULT_MTA}"
# back compat pull in settings from POSTFIX_OPTIONS for convenience when
# make config is run (happens first time port is built, too)
@ -55,19 +53,17 @@ OPTIONS= PCRE "Perl Compatible Regular Expressions" on \
OPENLDAP "OpenLDAP maps (choose ver. with WITH_OPENLDAP_VER)" ${STATUS_OpenLDAP} \
CDB "CDB maps lookups" ${STATUS_CDB} \
NIS "NIS maps lookups" ${STATUS_NIS} \
VDA "VDA (Virtual Delivery Agent 32Bit)" ${STATUS_VDA} \
VDA "VDA (Virtual Delivery Agent)" ${STATUS_VDA} \
TEST "SMTP/LMTP test server and generator" ${STATUS_Test}
.include <bsd.port.options.mk>
MAN1= postalias.1 postcat.1 postconf.1 postdrop.1 postfix.1 postkick.1 \
postlock.1 postlog.1 postmap.1 postmulti.1 postqueue.1 postsuper.1 \
sendmail.1 qshape.1
postlock.1 postlog.1 postmap.1 postqueue.1 postsuper.1 sendmail.1 \
qshape.1
MAN5= access.5 aliases.5 bounce.5 canonical.5 cidr_table.5 generic.5 \
header_checks.5 ldap_table.5 master.5 mysql_table.5 nisplus_table.5 \
pcre_table.5 pgsql_table.5 postconf.5 postfix-wrapper.5 regexp_table.5 \
relocated.5 tcp_table.5 transport.5 virtual.5
pcre_table.5 pgsql_table.5 postconf.5 regexp_table.5 relocated.5 \
tcp_table.5 transport.5 virtual.5
MAN8= anvil.8 bounce.8 cleanup.8 discard.8 error.8 flush.8 local.8 master.8 \
oqmgr.8 pickup.8 pipe.8 proxymap.8 qmgr.8 qmqpd.8 scache.8 showq.8 \
@ -80,8 +76,8 @@ MLINKS= sendmail.1 mailq.1 \
bounce.8 trace.8 \
smtp.8 lmtp.8
HTML1= SOHO_README.html body_checks.5.html bounce.5.html postfix-power.png \
scache.8.html tlsmgr.8.html
CONF1= access aliases canonical generic header_checks main.cf master.cf \
relocated transport virtual
.if !defined(DEBUG)
MAKEFILEFLAGS+= DEBUG=
@ -89,19 +85,11 @@ MAKEFILEFLAGS+= DEBUG=
MAKEFILEFLAGS+= CC="${CC}" OPT="${CFLAGS}"
POSTFIX_CCARGS+= -DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \
-DDEF_DAEMON_DIR=\\\"${DAEMONDIR}\\\" \
-DDEF_COMMAND_DIR=\\\"${PREFIX}/sbin\\\" \
-DDEF_SENDMAIL_PATH=\\\"${PREFIX}/sbin/sendmail\\\" \
-DDEF_NEWALIAS_PATH=\\\"${PREFIX}/bin/newaliases\\\" \
-DDEF_MAILQ_PATH=\\\"${PREFIX}/bin/mailq\\\" \
-DDEF_MANPAGE_DIR=\\\"${MANPREFIX}/man\\\" \
-DDEF_README_DIR=\\\"${READMEDIR}\\\" \
-DDEF_HTML_DIR=\\\"${READMEDIR}\\\" \
-DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\" \
-DDEF_DATA_DIR=\\\"/var/db/postfix\\\" \
-DDEF_MAIL_OWNER=\\\"postfix\\\" \
-DDEF_SGID_GROUP=\\\"maildrop\\\" \
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
TOUCH="${TOUCH}" \
MKDIR="${MKDIR}"
.include <bsd.port.pre.mk>
# Default requirement for postfix rc script
_REQUIRE= LOGIN cleanvar
@ -123,7 +111,6 @@ POSTFIX_AUXLIBS+= -L${LOCALBASE}/lib -lsasl2 -lpam -lcrypt
.if defined(WITH_DOVECOT)
RUN_DEPENDS+= dovecot:${PORTSDIR}/mail/dovecot
POSTFIX_CCARGS+= -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"
_REQUIRE+= dovecot
.endif
.if defined(WITH_SASLKRB)
@ -195,52 +182,28 @@ POSTFIX_CCARGS+= -DHAS_NIS
_REQUIRE+= ypserv
.endif
# 32Bit VDA patch (64Bit has different patch)
.if defined(WITH_VDA)
PATCH_SITES+= http://vda.sourceforge.net/VDA/
PATCHFILES+= postfix-${VDAVERSION}-vda-ng.patch.gz
PATCHFILES+= postfix-2.5.6-vda-ng.patch.gz
PATCH_DIST_STRIP= -p1
PLIST_SUB+= VDA=""
.else
PLIST_SUB+= VDA="@comment "
.endif
.if defined(WITH_TEST)
BINTEST= qmqp-sink qmqp-source smtp-sink smtp-source
MANTEST= qmqp-sink.1 qmqp-source.1 smtp-sink.1 smtp-source.1
MAN1+= ${MANTEST}
PLIST_SUB+= TEST=""
PLIST_SUB+= SUB_TEST=""
.else
PLIST_SUB+= TEST="@comment "
PLIST_SUB+= SUB_TEST="@comment "
.endif
.if defined(NOPORTDOCS)
READMEDIR= no
READMEDIR=no
.else
READMEDIR= ${DOCSDIR}
READMEDIR=${PREFIX}/share/doc/postfix
.endif
DAEMONDIR= ${PREFIX}/libexec/postfix
SUB_LIST+= REQUIRE="${_REQUIRE}" READMEDIR="${READMEDIR}" DAEMONDIR="${DAEMONDIR}"
SUB_FILES+= pkg-install pkg-message
# sed script for files in ${WRKSRC}/README_FILES ${WRKSRC}/conf ${WRKSRC}/man
REINPLACE= s!^PATH=.*!PATH=/bin:/sbin:/usr/bin:/usr/sbin:${PREFIX}/bin:${PREFIX}/sbin!;\
s!(_directory = )/usr/!\1${PREFIX}/!g;\
s!^(data_directory = /var/)lib/!\1db/!g;\
s!^\#(mynetworks_style = host)!\1!g;\
s!^(sendmail_path =)!\1 ${PREFIX}/sbin/sendmail!g;\
s!^(newaliases_path =)!\1 ${PREFIX}/bin/newaliases!g;\
s!^(mailq_path =)!\1 ${PREFIX}/bin/mailq!g;\
s!^(setgid_group =)!\1 maildrop!g;\
s!^(manpage_directory =)!\1 ${PREFIX}/man!g;\
s!^((html|readme)_directory =)!\1 ${READMEDIR}!g;\
\!^\#alias_database = dbm:/etc/mail/aliases$$!d;\
s!(:|= )/etc/postfix!\1$$config_directory!g;\
s!/etc/postfix!${ETCDIR}!g;\
s!^(sample_directory =)!\1 ${ETCDIR}!g;\
s!($config_directory/(access|aliases|canonical|generic|header_checks|relocated|transport|virtual):f:root:-:644:)p1!\1o!;
SUB_LIST+= REQUIRE="${_REQUIRE}"
pre-patch:
.if defined(POSTFIX_OPTIONS)
@ -269,29 +232,20 @@ pre-patch:
fi
.endif
@${ECHO} '<HTML><BODY>See <A HREF="header_checks.5.html">header_checks.5.html</A></BODY></HTML>' \
@${ECHO} "<HTML><BODY>See <A HREF="header_checks.5.html">header_checks.5.html</A></BODY></HTML>" \
> ${WRKSRC}/html/body_checks.5.html
@${REINPLACE_CMD} -E -e 's![[:<:]]perl[[:>:]]!${PERL}!' \
${WRKSRC}/src/bounce/Makefile.in
@${REINPLACE_CMD} -E -e 's!^(#define DEF_SGID_GROUP[^"]+)"postdrop"$$!\1"maildrop"!' \
${WRKSRC}/src/global/mail_params.h
@${FIND} -X ${WRKSRC}/README_FILES ${WRKSRC}/conf ${WRKSRC}/man \
-type f -a ! \( -name INSTALL -o -name aliases \) | ${XARGS} \
${REINPLACE_CMD} -E -e '${REINPLACE}'
@${FIND} -P ${WRKSRC}/man -type f | ${XARGS} \
${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g"
@${FIND} -P ${WRKSRC}/README_FILES -type f | ${XARGS} \
${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g"
@${FIND} -P ${WRKSRC}/conf -type f | ${XARGS} \
${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g"
post-patch:
@${ECHO} '$$readme_directory/SOHO_README:f:root:-:644' \
>> ${WRKSRC}/conf/postfix-files
.for f in ${HTML1}
@${ECHO} '$$html_directory/$f:f:root:-:644' \
>> ${WRKSRC}/conf/postfix-files
.endfor
.if defined(WITH_VDA)
@${ECHO} '$$readme_directory/VDA_README:f:root:-:644' \
>> ${WRKSRC}/conf/postfix-files
@${REINPLACE_CMD} -E -e '${REINPLACE}' \
${WRKSRC}/README_FILES/VDA_README
.endif
# All files modified with ${FILESDIR}/patch-* to use !!PREFIX!! need REINPLACE. Put below.
@${REINPLACE_CMD} -e "s,!!PREFIX!!,${PREFIX},g" \
${WRKSRC}/conf/main.cf ${WRKSRC}/src/global/mail_params.h
@${REINPLACE_CMD} -e "s|perl|${PERL}|" ${WRKSRC}/src/bounce/Makefile.in
do-configure:
(cd ${WRKSRC} && ${MAKE} -f Makefile.init makefiles ${MAKEFILEFLAGS} \
@ -302,13 +256,26 @@ pre-su-install:
@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
@cd ${WRKSRC} && ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp \
daemon_directory=${DAEMONDIR} \
html_directory=${READMEDIR} \
cd ${WRKSRC}; ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp \
config_directory=${PREFIX}/etc/postfix \
data_directory=/var/db/postfix \
daemon_directory=${PREFIX}/libexec/postfix \
command_directory=${PREFIX}/sbin \
queue_directory=/var/spool/postfix \
sendmail_path=${PREFIX}/sbin/sendmail \
newaliases_path=${PREFIX}/bin/newaliases \
mailq_path=${PREFIX}/bin/mailq \
mail_owner=postfix \
setgid_group=maildrop \
manpage_directory=${MANPREFIX}/man \
sample_directory=${PREFIX}/etc/postfix \
readme_directory=${READMEDIR}
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${PREFIX}/bin/rmail
${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl ${PREFIX}/bin/qshape
${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 ${MANPREFIX}/man/man1
.for f in ${BINTEST}
${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${PREFIX}/bin
.endfor
@ -316,10 +283,22 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/man/man1/${f} ${MANPREFIX}/man/man1
.endfor
@${MKDIR} ${PREFIX}/etc/postfix/dist
.for f in ${CONF1}
${INSTALL_DATA} ${WRKSRC}/conf/${f} ${PREFIX}/etc/postfix/dist
.endfor
.if !defined(NOPORTDOCS)
${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} -m 555 ${DOCSDIR}
@cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.jpg *.png ${DOCSDIR} && \
${ECHO_MSG} "Installed HTML documentation in ${DOCSDIR}"
.endif
post-install:
@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
# Fix compressed man pages
@${REINPLACE_CMD} -i '' -E -e "s|(man[158]/.*.[158]):|\1.gz:|g" ${DAEMONDIR}/postfix-files
# Fix compressed man pages
@${REINPLACE_CMD} -E -e "s|(man[158]/.*.[158]):|\1.gz:|g" ${PREFIX}/etc/postfix/postfix-files
@${RM} -f ${PREFIX}/etc/postfix/postfix-files.bak
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View file

@ -1,6 +1,6 @@
MD5 (postfix/postfix-2.6.5.tar.gz) = 6b954cfb3eb6141dac1e773281211717
SHA256 (postfix/postfix-2.6.5.tar.gz) = 5b5c8d3c98d7dffece1d30ed4dc1cfbd3220842fd626a324ce038d7d795e4102
SIZE (postfix/postfix-2.6.5.tar.gz) = 3325444
MD5 (postfix/postfix-2.6.5-vda-ng.patch.gz) = 43e54d0a1a016b90d15a1bd231e6fa38
SHA256 (postfix/postfix-2.6.5-vda-ng.patch.gz) = e1c04e9d268dc84832334997e1f593af9877dbd5030708280427a0dc4452e797
SIZE (postfix/postfix-2.6.5-vda-ng.patch.gz) = 12435
MD5 (postfix/postfix-2.5.7.tar.gz) = 52a49d11555571fe7c3b0d3768f45092
SHA256 (postfix/postfix-2.5.7.tar.gz) = b758684dadbf01fcfe964400151788cf54cb1f4b90d2e8ede87f81f9fbc635c4
SIZE (postfix/postfix-2.5.7.tar.gz) = 3159263
MD5 (postfix/postfix-2.5.6-vda-ng.patch.gz) = 83e483795c616abb27fdee5d9886019c
SHA256 (postfix/postfix-2.5.6-vda-ng.patch.gz) = c4e4ff3da5b6bfa2648dc41bbf7ee56c1ba2f62e2c77a7885bc8044a1131f531
SIZE (postfix/postfix-2.5.6-vda-ng.patch.gz) = 12388

View file

@ -1,6 +1,6 @@
--- makedefs.orig 2009-07-17 18:21:25.000000000 -0400
+++ makedefs 2009-07-17 18:23:12.000000000 -0400
@@ -144,6 +144,10 @@
--- makedefs.orig 2009-09-27 22:18:56.000000000 -0400
+++ makedefs 2009-09-27 22:20:51.000000000 -0400
@@ -132,6 +132,10 @@
;;
FreeBSD.7*) SYSTYPE=FREEBSD7
;;

View file

@ -1,5 +1,5 @@
--- src/util/sys_defs.h.orig 2009-05-11 03:45:27.000000000 +0300
+++ src/util/sys_defs.h 2009-07-22 21:26:44.208909929 +0300
--- src/util/sys_defs.h.orig 2009-09-27 22:22:10.000000000 -0400
+++ src/util/sys_defs.h 2009-09-27 22:24:08.000000000 -0400
@@ -25,6 +25,7 @@
*/
#if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \

View file

@ -1,158 +0,0 @@
#!/bin/sh
#
# $FreeBSD: /tmp/pcvs/ports/mail/postfix25/files/Attic/pkg-install.in,v 1.3 2009-06-11 01:42:24 wxs Exp $
#
# If the POSTFIX_DEFAULT_MTA environment variable is set to YES, it
# will make the port/package use defaults which make postfix replace
# sendmail as much as possible.
PREFIX=${PKG_PREFIX:=%%PREFIX%%}
ETCDIR=${ETCDIR:=%%ETCDIR%%}
DAEMONDIR=${DAEMONDIR:=%%DAEMONDIR%%}
READMEDIR=${READMEDIR:=%%READMEDIR%%}
BATCH=${BATCH:=no}
POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no}
if [ "${POSTFIX_DEFAULT_MTA}" = "no" ]; then
DEFAULT_REPLACE_MAILERCONF=n
else
DEFAULT_REPLACE_MAILERCONF=y
fi
if [ -x /usr/sbin/nologin ]; then
NOLOGIN=/usr/sbin/nologin
else
NOLOGIN=/sbin/nologin
fi
ask() {
local question default answer
question=$1
default=$2
if [ -z "${PACKAGE_BUILDING}" -a "${BATCH}" = "no" ]; then
read -p "${question} [${default}]? " answer
fi
if [ -z "${answer}" ]; then
answer=${default}
fi
echo ${answer}
}
yesno() {
local question default answer
question=$1
default=$2
while :; do
answer=$(ask "${question}" "${default}")
case "${answer}" in
[Yy]*) return 0;;
[Nn]*) return 1;;
esac
echo "Please answer yes or no."
done
}
if [ "$2" = "PRE-INSTALL" ]; then
USER=postfix
UID=125
GROUP=postfix
GID=125
GROUP2=maildrop
GID2=126
if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if /usr/sbin/pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
echo "Please create it, and try again."
exit 1
fi
fi
if /usr/sbin/pw groupshow "${GROUP2}" 2>/dev/null; then
echo "You already have a group \"${GROUP2}\", so I will use it."
else
if /usr/sbin/pw groupadd ${GROUP2} -g ${GID2}; then
echo "Added group \"${GROUP2}\"."
else
echo "Adding group \"${GROUP2}\" failed..."
echo "Please create it, and try again."
exit 1
fi
fi
if /usr/sbin/pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
else
if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - -d /var/spool/postfix -s ${NOLOGIN} -c "Postfix Mail System"; then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
echo "Please create it, and try again."
exit 1
fi
fi
if /usr/sbin/pw show group mail | grep -q "${USER}" 2>/dev/null; then
echo "You already have user \"${USER}\" in group \"mail\", so I will use it."
else
echo "You need user \"${USER}\" added to group \"mail\"."
if yesno "Would you like me to add it" y; then
/usr/sbin/pw groupmod mail -m ${USER} || exit
echo "Done."
else
echo "Please create it, and try again."
exit 1
fi
fi
fi
if [ "$2" = "POST-INSTALL" ]; then
SAMPLES="main.cf master.cf"
for file in $SAMPLES
do
if [ ! -f ${ETCDIR}/$file ]; then
cp ${DAEMONDIR}/$file ${ETCDIR}/
fi
done
/bin/sh ${DAEMONDIR}/post-install tempdir=/tmp \
daemon_directory=${DAEMONDIR} \
html_directory=${READMEDIR} \
readme_directory=${READMEDIR} \
upgrade-package
fi
replace() {
local orig repl
orig=$1
repl=$2
if [ -e ${orig} ]; then
/bin/mv -f ${orig} ${orig}.OFF
/bin/chmod 0 ${orig}.OFF
fi
if [ -e ${repl} ]; then
/bin/ln -s ${repl} ${orig}
fi
}
if [ "$2" = "POST-INSTALL" -a -z "${PACKAGE_BUILDING}" ]; then
if yesno "Would you like to activate Postfix in /etc/mail/mailer.conf" ${DEFAULT_REPLACE_MAILERCONF}; then
/bin/mv -f /etc/mail/mailer.conf /etc/mail/mailer.conf.old
echo "#" > /etc/mail/mailer.conf
echo -n "# Execute the Postfix sendmail program" >> /etc/mail/mailer.conf
echo ", named ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
echo "#" >> /etc/mail/mailer.conf
echo "sendmail ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
echo "send-mail ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
echo "mailq ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
echo "newaliases ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
fi
fi

View file

@ -25,10 +25,10 @@ rcvar=${name}_enable
load_rc_config $name
: ${postfix_enable:="NO"}
: ${postfix_pidfile:="/var/spool/postfix/pid/master.pid"}
: ${postfix_procname:="%%PREFIX%%/libexec/postfix/master"}
: ${postfix_flags:=""}
: ${postfix_enable="NO"}
: ${postfix_pidfile="/var/spool/postfix/pid/master.pid"}
: ${postfix_procname="%%PREFIX%%/libexec/postfix/master"}
: ${postfix_flags=""}
start_cmd=${name}_start
stop_cmd=${name}_stop

167
mail/postfix25/pkg-install Normal file
View file

@ -0,0 +1,167 @@
#!/bin/sh
#
# $FreeBSD$
#
# If the POSTFIX_DEFAULT_MTA environment variable is set to YES, it
# will make the port/package use defaults which make postfix replace
# sendmail as much as possible.
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
BATCH=${BATCH:=no}
POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no}
if [ x${POSTFIX_DEFAULT_MTA} = xno ]; then
DEFAULT_REPLACE_MAILERCONF=n
else
DEFAULT_REPLACE_MAILERCONF=y
fi
if [ -x /usr/sbin/nologin ]; then
NOLOGIN=/usr/sbin/nologin
else
NOLOGIN=/sbin/nologin
fi
ask() {
local question default answer
question=$1
default=$2
if [ -z "${PACKAGE_BUILDING}" -a x${BATCH} = xno ]; then
read -p "${question} [${default}]? " answer
fi
if [ x${answer} = x ]; then
answer=${default}
fi
echo ${answer}
}
yesno() {
local question default answer
question=$1
default=$2
while :; do
answer=$(ask "${question}" "${default}")
case "${answer}" in
[Yy]*) return 0;;
[Nn]*) return 1;;
esac
echo "Please answer yes or no."
done
}
if [ x"$2" = xPRE-INSTALL ]; then
USER=postfix
UID=125
GROUP=postfix
GID=125
GROUP2=maildrop
GID2=126
if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if /usr/sbin/pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
echo "Please create it, and try again."
exit 1
fi
fi
if /usr/sbin/pw groupshow "${GROUP2}" 2>/dev/null; then
echo "You already have a group \"${GROUP2}\", so I will use it."
else
if /usr/sbin/pw groupadd ${GROUP2} -g ${GID2}; then
echo "Added group \"${GROUP2}\"."
else
echo "Adding group \"${GROUP2}\" failed..."
echo "Please create it, and try again."
exit 1
fi
fi
if /usr/sbin/pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
else
if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - -d /var/spool/postfix -s ${NOLOGIN} -c "Postfix Mail System"; then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
echo "Please create it, and try again."
exit 1
fi
fi
if /usr/sbin/pw show group mail | grep -q "${USER}" 2>/dev/null; then
echo "You already have user \"${USER}\" in group \"mail\", so I will use it."
else
echo "You need user \"${USER}\" added to group \"mail\"."
if yesno "Would you like me to add it" y; then
/usr/sbin/pw groupmod mail -m ${USER} || exit
echo "Done."
else
echo "Please create it, and try again."
exit 1
fi
fi
fi
if [ x"$2" = xPOST-INSTALL ]; then
if [ -d ${PKG_PREFIX}/etc/postfix/dist ]; then
for file in ${PKG_PREFIX}/etc/postfix/dist/*; do
if [ ! -f ${PKG_PREFIX}/etc/postfix/${file#${PKG_PREFIX}/etc/postfix/dist} ]; then
cp $file ${PKG_PREFIX}/etc/postfix/
fi
done
fi
/bin/sh ${PKG_PREFIX}/etc/postfix/post-install tempdir=/tmp \
config_directory=${PKG_PREFIX}/etc/postfix \
data_directory=/var/db/postfix \
daemon_directory=${PKG_PREFIX}/libexec/postfix \
command_directory=${PKG_PREFIX}/sbin \
queue_directory=/var/spool/postfix \
sendmail_path=${PKG_PREFIX}/sbin/sendmail \
newaliases_path=${PKG_PREFIX}/bin/newaliases \
mailq_path=${PKG_PREFIX}/bin/mailq \
mail_owner=postfix \
setgid_group=maildrop \
manpage_directory=${PKG_PREFIX}/man \
sample_directory=${PKG_PREFIX}/etc/postfix \
readme_directory=no \
upgrade-package
fi
# readme_directory is "no" above since the package will have correct perms
# already, and we don't know if they had PORTDOCS.
replace() {
local orig repl
orig=$1
repl=$2
if [ -e ${orig} ]; then
/bin/mv -f ${orig} ${orig}.OFF
/bin/chmod 0 ${orig}.OFF
fi
if [ -e ${repl} ]; then
/bin/ln -s ${repl} ${orig}
fi
}
if [ x"$2" = xPOST-INSTALL -a -z "${PACKAGE_BUILDING}" ]; then
if yesno "Would you like to activate Postfix in /etc/mail/mailer.conf" ${DEFAULT_REPLACE_MAILERCONF}; then
/bin/mv -f /etc/mail/mailer.conf /etc/mail/mailer.conf.old
echo "#" > /etc/mail/mailer.conf
echo -n "# Execute the Postfix sendmail program" >> /etc/mail/mailer.conf
echo ", named ${PKG_PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
echo "#" >> /etc/mail/mailer.conf
echo "sendmail ${PKG_PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
echo "send-mail ${PKG_PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
echo "mailq ${PKG_PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
echo "newaliases ${PKG_PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf
fi
fi

View file

@ -18,7 +18,7 @@ daily_submit_queuerun="NO"
If you are using SASL, you need to make sure that postfix has access to read
the sasldb file. This is accomplished by adding postfix to group mail and
making the %%PREFIX%%/etc/sasldb* file(s) readable by group mail (this should
making the /usr/local/etc/sasldb* file(s) readable by group mail (this should
be the default for new installs).
If you are upgrading from postfix version prior to 2.0, please see the README

View file

@ -1,11 +1,31 @@
@unexec if cmp -s %D/libexec/postfix/main.cf %D/%%ETCDIR%%/main.cf; then rm -f %D/%%ETCDIR%%/main.cf; fi
@unexec if cmp -s %D/libexec/postfix/master.cf %D/%%ETCDIR%%/master.cf; then rm -f %D/%%ETCDIR%%/master.cf; fi
%%ETCDIR%%/LICENSE
%%ETCDIR%%/TLS_LICENSE
%%ETCDIR%%/bounce.cf.default
%%ETCDIR%%/main.cf.default
%%ETCDIR%%/makedefs.out
@dirrmtry %%ETCDIR%%
@unexec if cmp -s %D/etc/postfix/main.cf %D/etc/postfix/dist/main.cf; then rm -f %D/etc/postfix/main.cf; fi
@unexec if cmp -s %D/etc/postfix/master.cf %D/etc/postfix/dist/master.cf; then rm -f %D/etc/postfix/master.cf; fi
@unexec if cmp -s %D/etc/postfix/access %D/etc/postfix/dist/access; then rm -f %D/etc/postfix/access; fi
@unexec if cmp -s %D/etc/postfix/aliases %D/etc/postfix/dist/aliases; then rm -f %D/etc/postfix/aliases; fi
@unexec if cmp -s %D/etc/postfix/canonical %D/etc/postfix/dist/canonical; then rm -f %D/etc/postfix/canonical; fi
@unexec if cmp -s %D/etc/postfix/header_checks %D/etc/postfix/dist/header_checks; then rm -f %D/etc/postfix/header_checks; fi
@unexec if cmp -s %D/etc/postfix/relocated %D/etc/postfix/dist/relocated; then rm -f %D/etc/postfix/relocated; fi
@unexec if cmp -s %D/etc/postfix/transport %D/etc/postfix/dist/transport; then rm -f %D/etc/postfix/transport; fi
@unexec if cmp -s %D/etc/postfix/virtual %D/etc/postfix/dist/virtual; then rm -f %D/etc/postfix/virtual; fi
@unexec if cmp -s %D/etc/postfix/generic %D/etc/postfix/dist/generic; then rm -f %D/etc/postfix/generic; fi
etc/postfix/LICENSE
etc/postfix/TLS_LICENSE
etc/postfix/bounce.cf.default
etc/postfix/main.cf.default
etc/postfix/makedefs.out
etc/postfix/post-install
etc/postfix/postfix-files
etc/postfix/postfix-script
etc/postfix/dist/main.cf
etc/postfix/dist/master.cf
etc/postfix/dist/access
etc/postfix/dist/aliases
etc/postfix/dist/canonical
etc/postfix/dist/header_checks
etc/postfix/dist/relocated
etc/postfix/dist/transport
etc/postfix/dist/virtual
etc/postfix/dist/generic
libexec/postfix/anvil
libexec/postfix/bounce
libexec/postfix/cleanup
@ -14,18 +34,11 @@ libexec/postfix/error
libexec/postfix/flush
libexec/postfix/lmtp
libexec/postfix/local
libexec/postfix/main.cf
libexec/postfix/master
libexec/postfix/master.cf
libexec/postfix/nqmgr
libexec/postfix/oqmgr
libexec/postfix/pickup
libexec/postfix/pipe
libexec/postfix/post-install
libexec/postfix/postfix-files
libexec/postfix/postfix-script
libexec/postfix/postfix-wrapper
libexec/postfix/postmulti-script
libexec/postfix/proxymap
libexec/postfix/qmgr
libexec/postfix/qmqpd
@ -38,15 +51,6 @@ libexec/postfix/trivial-rewrite
libexec/postfix/verify
libexec/postfix/virtual
libexec/postfix/tlsmgr
@dirrm libexec/postfix
bin/mailq
bin/newaliases
bin/qshape
bin/rmail
%%TEST%%bin/qmqp-sink
%%TEST%%bin/qmqp-source
%%TEST%%bin/smtp-sink
%%TEST%%bin/smtp-source
sbin/postalias
sbin/postcat
sbin/postconf
@ -56,10 +60,17 @@ sbin/postkick
sbin/postlock
sbin/postlog
sbin/postmap
sbin/postmulti
sbin/postqueue
sbin/postsuper
sbin/sendmail
%%SUB_TEST%%bin/qmqp-sink
%%SUB_TEST%%bin/qmqp-source
%%SUB_TEST%%bin/smtp-sink
%%SUB_TEST%%bin/smtp-source
bin/rmail
bin/qshape
bin/newaliases
bin/mailq
%%PORTDOCS%%%%DOCSDIR%%/AAAREADME
%%PORTDOCS%%%%DOCSDIR%%/ADDRESS_CLASS_README
%%PORTDOCS%%%%DOCSDIR%%/ADDRESS_CLASS_README.html
@ -107,8 +118,6 @@ sbin/sendmail
%%PORTDOCS%%%%DOCSDIR%%/MAILDROP_README.html
%%PORTDOCS%%%%DOCSDIR%%/MILTER_README
%%PORTDOCS%%%%DOCSDIR%%/MILTER_README.html
%%PORTDOCS%%%%DOCSDIR%%/MULTI_INSTANCE_README
%%PORTDOCS%%%%DOCSDIR%%/MULTI_INSTANCE_README.html
%%PORTDOCS%%%%DOCSDIR%%/MYSQL_README
%%PORTDOCS%%%%DOCSDIR%%/MYSQL_README.html
%%PORTDOCS%%%%DOCSDIR%%/NFS_README
@ -136,7 +145,6 @@ sbin/sendmail
%%PORTDOCS%%%%DOCSDIR%%/SMTPD_POLICY_README.html
%%PORTDOCS%%%%DOCSDIR%%/SMTPD_PROXY_README
%%PORTDOCS%%%%DOCSDIR%%/SMTPD_PROXY_README.html
%%PORTDOCS%%%%DOCSDIR%%/SOHO_README
%%PORTDOCS%%%%DOCSDIR%%/SOHO_README.html
%%PORTDOCS%%%%DOCSDIR%%/STANDARD_CONFIGURATION_README
%%PORTDOCS%%%%DOCSDIR%%/STANDARD_CONFIGURATION_README.html
@ -149,7 +157,6 @@ sbin/sendmail
%%PORTDOCS%%%%DOCSDIR%%/ULTRIX_README
%%PORTDOCS%%%%DOCSDIR%%/UUCP_README
%%PORTDOCS%%%%DOCSDIR%%/UUCP_README.html
%%VDA%%%%PORTDOCS%%%%DOCSDIR%%/VDA_README
%%PORTDOCS%%%%DOCSDIR%%/VERP_README
%%PORTDOCS%%%%DOCSDIR%%/VERP_README.html
%%PORTDOCS%%%%DOCSDIR%%/VIRTUAL_README
@ -195,13 +202,11 @@ sbin/sendmail
%%PORTDOCS%%%%DOCSDIR%%/postfix-logo.jpg
%%PORTDOCS%%%%DOCSDIR%%/postfix-manuals.html
%%PORTDOCS%%%%DOCSDIR%%/postfix-power.png
%%PORTDOCS%%%%DOCSDIR%%/postfix-wrapper.5.html
%%PORTDOCS%%%%DOCSDIR%%/postfix.1.html
%%PORTDOCS%%%%DOCSDIR%%/postkick.1.html
%%PORTDOCS%%%%DOCSDIR%%/postlock.1.html
%%PORTDOCS%%%%DOCSDIR%%/postlog.1.html
%%PORTDOCS%%%%DOCSDIR%%/postmap.1.html
%%PORTDOCS%%%%DOCSDIR%%/postmulti.1.html
%%PORTDOCS%%%%DOCSDIR%%/postqueue.1.html
%%PORTDOCS%%%%DOCSDIR%%/postsuper.1.html
%%PORTDOCS%%%%DOCSDIR%%/proxymap.8.html
@ -230,3 +235,6 @@ sbin/sendmail
%%PORTDOCS%%%%DOCSDIR%%/tlsmgr.8.html
%%PORTDOCS%%%%DOCSDIR%%/generic.5.html
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm libexec/postfix
@dirrm etc/postfix/dist
@dirrmtry etc/postfix