aboutsummaryrefslogtreecommitdiff
path: root/mail/postfix21
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@FreeBSD.org>2005-09-11 21:43:50 +0000
committerVsevolod Stakhov <vsevolod@FreeBSD.org>2005-09-11 21:43:50 +0000
commitc070d8ac5b517ace9b837dc909693ee033546a4d (patch)
tree23f52cf34cc8ee32d969ac8751d80397d2675171 /mail/postfix21
parent69a6a2783a17a345063818063bd1b37e9a7e4fb3 (diff)
downloadports-c070d8ac5b517ace9b837dc909693ee033546a4d.tar.gz
ports-c070d8ac5b517ace9b837dc909693ee033546a4d.zip
Notes
Diffstat (limited to 'mail/postfix21')
-rw-r--r--mail/postfix21/Makefile129
-rw-r--r--mail/postfix21/distinfo12
-rw-r--r--mail/postfix21/files/extra_ipv6.patch132
-rw-r--r--mail/postfix21/pkg-install274
-rw-r--r--mail/postfix21/scripts/configure8
-rw-r--r--mail/postfix21/scripts/configure.postfix83
-rw-r--r--mail/postfix21/scripts/fix-files-list12
7 files changed, 380 insertions, 270 deletions
diff --git a/mail/postfix21/Makefile b/mail/postfix21/Makefile
index b66e4039dddb..e831f543886c 100644
--- a/mail/postfix21/Makefile
+++ b/mail/postfix21/Makefile
@@ -15,8 +15,7 @@
# NOTE: PCRE is enabled by default unless you specifically disable it.
PORTNAME= postfix
-PORTVERSION= 2.1.5
-PORTREVISION= 1
+PORTVERSION= 2.1.6
PORTEPOCH= 1
CATEGORIES= mail ipv6
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \
@@ -32,7 +31,8 @@ DIST_SUBDIR= ${PORTNAME}
MAINTAINER= vivek@khera.org
COMMENT= A secure alternative to widely-used Sendmail
-CONFLICTS= courier-0.* postfix-1.* postfix-2.0.* postfix-2.2.* sendmail-8.* sendmail-*-8.* smail-3.* zmailer-2.*
+CONFLICTS= courier-0.* postfix-1.* postfix-2.0.* postfix-2.2.* postfix-2.3.* \
+ sendmail-8.* sendmail-*-8.* smail-3.* zmailer-2.*
NO_LATEST_LINK= yes
USE_SUBMAKE= yes
USE_REINPLACE= yes
@@ -96,35 +96,41 @@ POSTFIX_CCARGS+= -DHAS_PCRE -I${LOCALBASE}/include
POSTFIX_AUXLIBS+= -L${LOCALBASE}/lib -lpcre
.endif
+pre-patch:
+ ${ECHO} "<HTML><BODY>See <A HREF="header_checks.5.html">header_checks.5.html</A></BODY></HTML>" \
+ > ${WRKSRC}/html/body_checks.5.html
+. for file in ${MAN1}
+ @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
+ ${WRKSRC}/man/man1/${file} ${WRKSRC}/html/${file}.html
+. endfor
+. for file in ${MAN5}
+ @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
+ ${WRKSRC}/man/man5/${file} ${WRKSRC}/html/${file}.html
+. endfor
+. for file in ${MAN8base}
+ @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
+ ${WRKSRC}/man/man8/${file} ${WRKSRC}/html/${file}.html
+. endfor
+. for file in ${README}
+ @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
+ ${WRKSRC}/html/${file}.html
+ @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
+ ${WRKSRC}/README_FILES/${file}
+. endfor
+. for file in ${CONF1}
+ @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" ${WRKSRC}/conf/${file}
+. endfor
+
post-patch:
+# All files modified with ${FILESDIR}/patch-* to use !!PREFIX!! need REINPLACE. Put below.
+ @${REINPLACE_CMD} -e "s,!!PREFIX!!,${PREFIX},g" \
+ ${WRKSRC}/conf/main.cf ${WRKSRC}/src/global/mail_params.h
+
+do-configure:
(cd ${WRKSRC} && ${MAKE} -f Makefile.init makefiles ${MAKEFILEFLAGS} \
CCARGS="${POSTFIX_CCARGS}" AUXLIBS="${POSTFIX_AUXLIBS}" && \
${ECHO} "all: default" >> Makefile)
-pre-patch:
- ${ECHO} "<body>See <A HREF="header_checks.5.html">header_checks.5.html</A></BODY>" > ${WRKSRC}/html/body_checks.5.html
-.for file in ${MAN1}
- @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
- ${WRKSRC}/man/man1/${file} ${WRKSRC}/html/${file}.html
-.endfor
-.for file in ${MAN5}
- @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
- ${WRKSRC}/man/man5/${file} ${WRKSRC}/html/${file}.html
-.endfor
-.for file in ${MAN8base}
- @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
- ${WRKSRC}/man/man8/${file} ${WRKSRC}/html/${file}.html
-.endfor
-.for file in ${README}
- @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
- ${WRKSRC}/html/${file}.html
- @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
- ${WRKSRC}/README_FILES/${file}
-.endfor
-.for file in ${CONF1}
- @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" ${WRKSRC}/conf/${file}
-.endfor
-
pre-install:
@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
@@ -136,46 +142,41 @@ READMEDIR=${PREFIX}/share/doc/postfix
do-install:
cd ${WRKSRC}; ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp \
- config_directory=${PREFIX}/etc/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=${PREFIX}/man \
- sample_directory=${PREFIX}/etc/postfix \
- readme_directory=${READMEDIR}
-
-.for file in ${CONF1}
- ${INSTALL_DATA} ${WRKSRC}/conf/${file} \
- ${PREFIX}/etc/postfix/dist-${file}
-.endfor
-
- @${INSTALL_SCRIPT} \
- ${WRKSRC}/auxiliary/rmail/rmail \
- ${PREFIX}/bin/rmail
-
-# optional TEST binaries
-.for file in ${BIN1}
- @${INSTALL_PROGRAM} ${WRKSRC}/bin/${file} ${PREFIX}/sbin
-.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
+ config_directory=${PREFIX}/etc/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=${PREFIX}/man \
+ sample_directory=${PREFIX}/etc/postfix \
+ readme_directory=${READMEDIR}
+
+ @${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${PREFIX}/bin/rmail
+
+. for file in ${BINTEST}
+ @${INSTALL_PROGRAM} ${WRKSRC}/bin/${file} ${PREFIX}/sbin
+. endfor
+
+. for file in ${CONF1}
+ ${INSTALL_DATA} ${WRKSRC}/conf/${file} \
+ ${PREFIX}/etc/postfix/dist-${file}
+. 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
-# need to fixup ${PREFIX}/etc/postfix/postfix-files to indicate compressed
-# man pages, since the ports software compresses them after this step, and
-# if we run etc/postfix/post-install again during package installation,
-# it will complain about missing files.
- @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/fix-files-list
+# 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}
post-clean:
diff --git a/mail/postfix21/distinfo b/mail/postfix21/distinfo
index 3a7505c59c6b..a2d73207bd29 100644
--- a/mail/postfix21/distinfo
+++ b/mail/postfix21/distinfo
@@ -1,12 +1,12 @@
-MD5 (postfix/postfix-2.1.5.tar.gz) = bcaa4aac80595d04c60c72844203a04d
-SIZE (postfix/postfix-2.1.5.tar.gz) = 1971931
+MD5 (postfix/postfix-2.1.6.tar.gz) = 91c976fe69ff33f487cd6eee9c343999
+SIZE (postfix/postfix-2.1.6.tar.gz) = 1973068
MD5 (postfix/postfix-libspf2-2.1.5-5.patch) = c6ac24b91af6c575ec787110a2df8a24
SIZE (postfix/postfix-libspf2-2.1.5-5.patch) = 25889
-MD5 (postfix/ipv6-1.25-pf-2.1.5.patch.gz) = c1c5a84b6c04bde0df7100cf05abb54c
-SIZE (postfix/ipv6-1.25-pf-2.1.5.patch.gz) = 48228
MD5 (postfix/tls+ipv6-1.25-pf-2.1.5.patch.gz) = 5b02ebf2ec104c43f805d2bcb7bb16ef
SIZE (postfix/tls+ipv6-1.25-pf-2.1.5.patch.gz) = 251571
+MD5 (postfix/postfix-2.1.6-vda.patch.gz) = 26f1d0899fa2af41967e64dc633924d1
+SIZE (postfix/postfix-2.1.6-vda.patch.gz) = 7795
MD5 (postfix/pfixtls-0.8.18-2.1.3-0.9.7d.tar.gz) = d3211ebd4d2fbbc9c78235666ed355ac
SIZE (postfix/pfixtls-0.8.18-2.1.3-0.9.7d.tar.gz) = 239141
-MD5 (postfix/postfix-2.1.5-trash.patch.gz) = 868209c12cf214566130b9c8b968cfed
-SIZE (postfix/postfix-2.1.5-trash.patch.gz) = 7049
+MD5 (postfix/ipv6-1.25-pf-2.1.5.patch.gz) = c1c5a84b6c04bde0df7100cf05abb54c
+SIZE (postfix/ipv6-1.25-pf-2.1.5.patch.gz) = 48228
diff --git a/mail/postfix21/files/extra_ipv6.patch b/mail/postfix21/files/extra_ipv6.patch
new file mode 100644
index 000000000000..3549880b76f2
--- /dev/null
+++ b/mail/postfix21/files/extra_ipv6.patch
@@ -0,0 +1,132 @@
+--- src/util/inet_addr_list.c.old Thu Aug 18 11:09:16 2005
++++ src/util/inet_addr_list.c Thu Aug 18 11:09:53 2005
+@@ -133,7 +133,11 @@
+ #ifdef INET6
+ char ha[NI_MAXHOST], hb[NI_MAXHOST];
+ int nierr;
++#ifdef NI_WITHSCOPEID
+ int niflags = NI_NUMERICHOST | NI_WITHSCOPEID;
++#else
++ int niflags = NI_NUMERICHOST;
++#endif
+ struct sockaddr *sa, *sb;
+
+ sa = (struct sockaddr *)a, sb = (struct sockaddr *)b;
+--- src/global/wildcard_inet_addr.c.old Thu Aug 18 11:10:42 2005
++++ src/global/wildcard_inet_addr.c Thu Aug 18 11:11:05 2005
+@@ -38,7 +38,11 @@
+ struct addrinfo hints, *res, *res0;
+ char hbuf[NI_MAXHOST];
+ int error;
++#ifdef NI_WITHSCOPEID
+ const int niflags = NI_NUMERICHOST | NI_WITHSCOPEID;
++#else
++ const int niflags = NI_NUMERICHOST;
++#endif
+
+ inet_addr_list_init(addr_list);
+
+--- src/smtpd/smtpd_peer.c.old Thu Aug 18 11:11:44 2005
++++ src/smtpd/smtpd_peer.c Thu Aug 18 11:13:37 2005
+@@ -163,7 +163,11 @@
+
+ #ifdef INET6
+ error = getnameinfo(sa, len, abuf, sizeof(abuf), NULL, 0,
++#ifdef NI_WITHSCOPEID
+ NI_NUMERICHOST | NI_WITHSCOPEID);
++#else
++ NI_NUMERICHOST);
++#endif
+ if (error)
+ msg_fatal("%s: numeric getnameinfo lookup for peer: error %s",
+ myname, GAI_STRERROR(error));
+@@ -277,7 +281,11 @@
+ continue;
+ error = getnameinfo(res->ai_addr, res->ai_addrlen,
+ rabuf, sizeof(rabuf), NULL, 0,
++#ifdef NI_WITHSCOPEID
+ NI_NUMERICHOST | NI_WITHSCOPEID);
++#else
++ NI_NUMERICHOST);
++#endif
+ if (error) {
+ msg_warn("%s: %s: hostname %s verification failed: %s",
+ myname, state->addr, state->name,
+--- src/lmtp/lmtp_connect.c.old Thu Aug 18 11:14:16 2005
++++ src/lmtp/lmtp_connect.c Thu Aug 18 11:15:07 2005
+@@ -202,7 +202,11 @@
+ return;
+ }
+ aierr = getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf),
++#ifdef NI_WITHSCOPEID
+ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
++#else
++ NULL, 0, NI_NUMERICHOST);
++#endif
+ if (aierr != 0) {
+ msg_warn("%s: getnameinfo(): %s",
+ myname, GAI_STRERROR(aierr));
+@@ -276,7 +280,11 @@
+
+ sa = (struct sockaddr *)&addr_list->addrs[i - 1];
+ aierr = getnameinfo(sa, SA_LEN(sa), hbuf, sizeof(hbuf),
++#ifdef NI_WITHSCOPEID
+ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
++#else
++ NULL, 0, NI_NUMERICHOST);
++#endif
+ if (aierr != 0)
+ msg_fatal("%s: getnameinfo() (AF=%d): %s",
+ myname, af, GAI_STRERROR(aierr));
+--- src/smtp/smtp_connect.c.old Thu Aug 18 11:15:43 2005
++++ src/smtp/smtp_connect.c Thu Aug 18 11:16:28 2005
+@@ -135,7 +135,11 @@
+ return;
+ }
+ aierr = getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf),
++#ifdef NI_WITHSCOPEID
+ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
++#else
++ NULL, 0, NI_NUMERICHOST);
++#endif
+ if (aierr != 0) {
+ msg_warn("%s: getnameinfo(): %s",
+ myname, GAI_STRERROR(aierr));
+@@ -210,7 +214,11 @@
+
+ sa = (struct sockaddr *)&addr_list->addrs[pos];
+ aierr = getnameinfo(sa, SA_LEN(sa), hbuf, sizeof(hbuf),
++#ifdef NI_WITHSCOPEID
+ NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID);
++#else
++ NULL, 0, NI_NUMERICHOST);
++#endif
+ if (aierr != 0)
+ msg_fatal("%s: getnameinfo() (AF=%d): %s",
+ myname, af, GAI_STRERROR(aierr));
+--- src/qmqpd/qmqpd_peer.c.old Thu Aug 18 11:17:03 2005
++++ src/qmqpd/qmqpd_peer.c Thu Aug 18 11:17:49 2005
+@@ -146,7 +146,11 @@
+
+ #ifdef INET6
+ error = getnameinfo(sa, len, abuf, sizeof(abuf), NULL, 0,
++#ifdef NI_WITHSCOPEID
+ NI_NUMERICHOST | NI_WITHSCOPEID);
++#else
++ NI_NUMERICHOST);
++#endif
+ if (error)
+ msg_fatal("%s: numeric getnameinfo lookup for peer: error %s",
+ myname, GAI_STRERROR(error));
+@@ -216,7 +220,11 @@
+ continue;
+ error = getnameinfo(res->ai_addr, res->ai_addrlen,
+ rabuf, sizeof(rabuf), NULL, 0,
++#ifdef NI_WITHSCOPEID
+ NI_NUMERICHOST | NI_WITHSCOPEID);
++#else
++ NI_NUMERICHOST);
++#endif
+ if (error) {
+ msg_warn("%s: %s: hostname %s verification failed: %s",
+ myname, state->addr, state->name,
diff --git a/mail/postfix21/pkg-install b/mail/postfix21/pkg-install
index 2d7f916363b0..45633f0dfc1b 100644
--- a/mail/postfix21/pkg-install
+++ b/mail/postfix21/pkg-install
@@ -12,109 +12,103 @@ BATCH=${BATCH:=no}
POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no}
if [ x${POSTFIX_DEFAULT_MTA} = xno ]; then
- DEFAULT_REPLACE_MAILERCONF=n
+ DEFAULT_REPLACE_MAILERCONF=n
else
- DEFAULT_REPLACE_MAILERCONF=y
+ DEFAULT_REPLACE_MAILERCONF=y
fi
if [ -x /usr/sbin/nologin ]; then
- NOLOGIN=/usr/sbin/nologin
+ NOLOGIN=/usr/sbin/nologin
else
- NOLOGIN=/sbin/nologin
+ 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}
+ 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
+ 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}\"."
+ 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
- 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}\"."
+ 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
- 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}\"."
+ 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
- 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
-
+ 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
@@ -122,70 +116,68 @@ if [ x"$2" = xPOST-INSTALL ]; then
CONF1="main.cf master.cf access aliases canonical \
header_checks relocated transport virtual"
- for file in $CONF1
- do
- if [ ! -f ${PKG_PREFIX}/etc/postfix/$file ]; then
- cp ${PKG_PREFIX}/etc/postfix/dist-$file ${PKG_PREFIX}/etc/postfix/$file
- fi
+ for file in $CONF1; do
+ if [ ! -f ${PKG_PREFIX}/etc/postfix/$file ]; then
+ cp ${PKG_PREFIX}/etc/postfix/dist-$file ${PKG_PREFIX}/etc/postfix/$file
+ fi
done
sh ${PKG_PREFIX}/etc/postfix/post-install tempdir=/tmp \
- config_directory=${PKG_PREFIX}/etc/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
+ config_directory=${PKG_PREFIX}/etc/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
# readme_directory is "no" above since the package will have correct perms
# already, and we don't know if they had PORTDOCS.
fi
replace() {
- local orig repl
-
- orig=$1
- repl=$2
- if [ -e ${orig} ]; then
- mv -f ${orig} ${orig}.OFF
- chmod 0 ${orig}.OFF
- fi
- if [ -e ${repl} ]; then
- ln -s ${repl} ${orig}
- fi
+ local orig repl
+
+ orig=$1
+ repl=$2
+ if [ -e ${orig} ]; then
+ mv -f ${orig} ${orig}.OFF
+ chmod 0 ${orig}.OFF
+ fi
+ if [ -e ${repl} ]; then
+ ln -s ${repl} ${orig}
+ fi
}
if [ x"$2" = xPOST-INSTALL -a -z "${PACKAGE_BUILDING}" ]; then
- if [ -x /sbin/sysctl ]; then
- OSVERSION=`/sbin/sysctl -n kern.osreldate`
- else
- OSVERSION=`/usr/sbin/sysctl -n kern.osreldate`
- fi
- if [ ${OSVERSION} -ge 400014 ]; then
- if yesno "Would you like to activate Postfix in /etc/mail/mailer.conf" \
- ${DEFAULT_REPLACE_MAILERCONF}; then
- 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
- else
- if yesno "Would you like to replace {sendmail,mailq,newaliases} with Postfix versions" n; then
- replace /usr/sbin/sendmail ${PKG_PREFIX}/sbin/sendmail
- replace /usr/bin/mailq ${PKG_PREFIX}/sbin/sendmail
- replace /usr/bin/newaliases ${PKG_PREFIX}/sbin/sendmail
- echo "Done."
- fi
- fi
+ if [ -x /sbin/sysctl ]; then
+ OSVERSION=`/sbin/sysctl -n kern.osreldate`
+ else
+ OSVERSION=`/usr/sbin/sysctl -n kern.osreldate`
+ fi
+ if [ ${OSVERSION} -ge 400014 ]; then
+ if yesno "Would you like to activate Postfix in /etc/mail/mailer.conf" ${DEFAULT_REPLACE_MAILERCONF}; then
+ 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
+ else
+ if yesno "Would you like to replace {sendmail,mailq,newaliases} with Postfix versions" n; then
+ replace /usr/sbin/sendmail ${PKG_PREFIX}/sbin/sendmail
+ replace /usr/bin/mailq ${PKG_PREFIX}/sbin/sendmail
+ replace /usr/bin/newaliases ${PKG_PREFIX}/sbin/sendmail
+ echo "Done."
+ fi
+ fi
fi
diff --git a/mail/postfix21/scripts/configure b/mail/postfix21/scripts/configure
deleted file mode 100644
index 93c5b95ec561..000000000000
--- a/mail/postfix21/scripts/configure
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-
-for f in `find ${WRKSRC} -type f | xargs grep -l '\!\!PREFIX\!\!' ` ; do \
- mv $f $f.orig && sed s+!!PREFIX!!+$PREFIX+g < $f.orig > $f && \
- rm $f.orig
-done
diff --git a/mail/postfix21/scripts/configure.postfix b/mail/postfix21/scripts/configure.postfix
index 0290a78a20e5..0a9d441da31e 100644
--- a/mail/postfix21/scripts/configure.postfix
+++ b/mail/postfix21/scripts/configure.postfix
@@ -1,5 +1,5 @@
#!/bin/sh
-# $FreeBSD: /tmp/pcvs/ports/mail/postfix21/scripts/Attic/configure.postfix,v 1.59 2005-02-18 08:51:18 pav Exp $
+# $FreeBSD: /tmp/pcvs/ports/mail/postfix21/scripts/Attic/configure.postfix,v 1.60 2005-09-11 21:43:50 vsevolod Exp $
if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
exit
@@ -24,10 +24,10 @@ SASL "Cyrus SASLv1 (Simple Authentication and Security Layer)" "$status_SASL" \
SASL2 "Cyrus SASLv2 (Simple Authentication and Security Layer)" "$status_SASL2" \
SASLKRB "If your SASL requires Kerberos select this option" "$status_SASLKRB" \
SASLKRB5 "If your SASL requires Kerberos5 select this option" "$status_SASLKRB5" \
-SPF "SPF support" "$status_SPF" \
TLS "SSL and TLS" "$status_TLS" \
IPv6 "IPv6 support" "$status_IPv6" \
IPv6TLS "IPv6 support with SSL and TLS" "$status_IPv6TLS" \
+SPF "SPF support" "$status_SPF" \
DB3 "Berkeley DB3 (required if SASL also built with DB3)" "$status_DB3" \
DB40 "Berkeley DB4.0 (required if SASL also built with DB4.0)" "$status_DB40" \
DB41 "Berkeley DB4.1 (required if SASL also built with DB4.1)" "$status_DB41" \
@@ -74,20 +74,20 @@ while [ "$1" ]; do
echo "NOPCRE_SUFFIX= +nopcre"
SUB_NOPCRE=""
;;
- SASL)
- echo "LIB_DEPENDS+= sasl.8:\${PORTSDIR}/security/cyrus-sasl"
- echo "POSTFIX_CCARGS+= -DUSE_SASL_AUTH -I\${LOCALBASE}/include -I\${LOCALBASE}/include/sasl1"
- echo "POSTFIX_AUXLIBS+= -L\${LOCALBASE}/lib -lsasl -lpam -lcrypt"
- echo "SASL_SUFFIX= +sasl"
- if [ -f ${PREFIX}/lib/libsasl.a ]; then
- if nm ${PREFIX}/lib/libsasl.a | grep -wq "mysql_verify_password"; then
+ SASL)
+ echo "LIB_DEPENDS+= sasl.8:\${PORTSDIR}/security/cyrus-sasl"
+ echo "POSTFIX_CCARGS+= -DUSE_SASL_AUTH -I\${LOCALBASE}/include -I\${LOCALBASE}/include/sasl1"
+ echo "POSTFIX_AUXLIBS+= -L\${LOCALBASE}/lib -lsasl -lpam -lcrypt"
+ echo "SASL_SUFFIX= +sasl"
+ if [ -f ${PREFIX}/lib/libsasl.a ]; then
+ if nm ${PREFIX}/lib/libsasl.a | grep -wq "mysql_verify_password"; then
echo "USE_MYSQL=YES"
- echo "POSTFIX_CCARGS+= -DHAS_MYSQL -I\${LOCALBASE}/include/mysql"
- echo "POSTFIX_AUXLIBS+= \${LOCALBASE}/lib/mysql/libmysqlclient.a -lm -lz"
- fi
- fi
- SUB_SASL=""
- ;;
+ echo "POSTFIX_CCARGS+= -DHAS_MYSQL -I\${LOCALBASE}/include/mysql"
+ echo "POSTFIX_AUXLIBS+= \${LOCALBASE}/lib/mysql/libmysqlclient.a -lm -lz"
+ fi
+ fi
+ SUB_SASL=""
+ ;;
SASL2)
echo "LIB_DEPENDS+= sasl2.2:\${PORTSDIR}/security/cyrus-sasl2"
echo "POSTFIX_CCARGS+= -DUSE_SASL_AUTH -I\${LOCALBASE}/include -I\${LOCALBASE}/include/sasl"
@@ -96,17 +96,17 @@ while [ "$1" ]; do
if [ -f ${PREFIX}/lib/libsasl2.a ]; then
if nm ${PREFIX}/lib/libsasl2.a | grep -wq "mysql_verify_password"; then
echo "USE_MYSQL=YES"
- echo "POSTFIX_CCARGS+= -DHAS_MYSQL -I\${LOCALBASE}/include/mysql"
- echo "POSTFIX_AUXLIBS+= \${LOCALBASE}/lib/mysql/libmysqlclient.a -lm -lz"
+ echo "POSTFIX_CCARGS+= -DHAS_MYSQL -I\${LOCALBASE}/include/mysql"
+ echo "POSTFIX_AUXLIBS+= \${LOCALBASE}/lib/mysql/libmysqlclient.a -lm -lz"
fi
fi
SUB_SASL=""
;;
SASLKRB)
- echo "POSTFIX_AUXLIBS+= -lkrb -lcrypto -lcom_err"
+ echo "POSTFIX_AUXLIBS+= -lkrb -lcrypto -lcom_err"
;;
SASLKRB5)
- echo "POSTFIX_AUXLIBS+= -lkrb5 -lcrypto -lcom_err -lasn1 -lroken"
+ echo "POSTFIX_AUXLIBS+= -lkrb5 -lcrypto -lcom_err -lasn1 -lroken"
;;
TLS)
echo "MAN8+= tlsmgr.8"
@@ -175,7 +175,7 @@ while [ "$1" ]; do
;;
PgSQL)
echo "USE_PGSQL=YES"
- echo "POSTFIX_CCARGS+= -DHAS_PGSQL -I\${LOCALBASE}/include -I\${LOCALBASE}/pgsql/include"
+ echo "POSTFIX_CCARGS+= -DHAS_PGSQL -I\${LOCALBASE}/include -I\${LOCALBASE}/pgsql/include"
echo "POSTFIX_AUXLIBS+= -L\${LOCALBASE}/lib -L\${LOCALBASE}/pgsql/lib -lpq -lcrypt"
echo "PGSQL_SUFFIX= +pgsql"
;;
@@ -186,32 +186,19 @@ while [ "$1" ]; do
echo "OPENLDAP_SUFFIX= +openldap"
;;
Test)
- echo "BIN1= smtp-sink smtp-source qmqp-source"
-# echo "MAN1+= smtp-sink.1 smtp-source.1 qmqp-sink.1 qmqp-source.1"
+ echo "BINTEST= smtp-sink smtp-source qmqp-source"
SUB_TEST=""
;;
- SPF)
- # see http://www.ipnet6.org/postfix/spf/
- echo "LIB_DEPENDS+= spf2.1:\${PORTSDIR}/mail/libspf2"
- echo "PATCH_SITES+= http://www.ipnet6.org/postfix/download/"
- echo "PATCHFILES+= postfix-libspf2-2.1.5-5.patch"
- echo "PATCH_DIST_STRIP= -p1"
- echo "POSTFIX_CCARGS+= -I\${LOCALBASE}/include"
- echo "POSTFIX_AUXLIBS+= -L\${LOCALBASE}/lib -lspf2"
- echo "SPF_SUFFIX= +spf"
-## echo "README+= SPF_README"
- echo ""
- SUB_SPF=""
- ;;
IPv6)
if [ X$SUB_TLS = "X" ]; then
- /usr/bin/dialog --msgbox "Select exactly one of the IPv6 and TLS patches" 5 60 > /dev/stderr
+ /usr/bin/dialog --msgbox "Select one of the IPv6 and TLS patches or select IPv6TLS patch" 5 60 > /dev/stderr
rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
exit 1
fi
echo "PATCH_SITES+= ftp://ftp.stack.nl/pub/postfix/tls+ipv6/1.25/"
echo "PATCHFILES+= ipv6-1.25-pf-2.1.5.patch.gz"
echo "PATCH_DIST_STRIP= -p1"
+ echo "EXTRA_PATCHES+= \${PATCHDIR}/extra_ipv6.patch"
echo "IPv6_SUFFIX= +ipv6"
echo ""
IPv6SELECTED=YES
@@ -219,7 +206,7 @@ while [ "$1" ]; do
;;
IPv6TLS)
if [ X$SUB_TLS = "X" -o X$IPv6SELECTED != X ]; then
- /usr/bin/dialog --msgbox "Select exactly one of the IPv6 and TLS patches" 5 60 > /dev/stderr
+ /usr/bin/dialog --msgbox "Select one of the IPv6 and TLS patches or select IPv6TLS patch" 5 60 > /dev/stderr
rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
exit 1
fi
@@ -230,13 +217,31 @@ while [ "$1" ]; do
echo "PATCH_SITES+= ftp://ftp.stack.nl/pub/postfix/tls+ipv6/1.25/"
echo "PATCHFILES+= tls+ipv6-1.25-pf-2.1.5.patch.gz"
echo "PATCH_DIST_STRIP= -p1"
+ echo "EXTRA_PATCHES+= \${PATCHDIR}/extra_ipv6.patch"
echo "TLS_SUFFIX= +tls+ipv6"
+ IPv6TLSSELECTED=YES
SUB_TLS=""
SUB_IPV6=""
;;
+ SPF)
+ if [ X$SUB_TLS = "X" -o X$IPv6TLSSELECTED != X ]; then
+ /usr/bin/dialog --msgbox "SPF patch don't apply cleany with TLS or IPv6TLS" 5 60 > /dev/stderr
+ rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
+ exit 1
+ fi
+ # see http://www.ipnet6.org/postfix/spf/
+ echo "LIB_DEPENDS+= spf2.1:\${PORTSDIR}/mail/libspf2-10"
+ echo "PATCH_SITES+= http://www.ipnet6.org/postfix/download/"
+ echo "PATCHFILES+= postfix-libspf2-2.1.5-5.patch"
+ echo "PATCH_DIST_STRIP= -p1"
+ echo "POSTFIX_CCARGS+= -I\${LOCALBASE}/include"
+ echo "POSTFIX_AUXLIBS+= -L\${LOCALBASE}/lib -lspf2"
+ echo "SPF_SUFFIX= +spf"
+ SUB_SPF=""
+ ;;
VDA)
echo "PATCH_SITES+= http://web.onda.com.br/nadal/postfix/VDA/"
- echo "PATCHFILES+= postfix-2.1.5-trash.patch.gz"
+ echo "PATCHFILES+= postfix-2.1.6-vda.patch.gz"
echo "PATCH_DIST_STRIP= -p1"
;;
*)
@@ -255,6 +260,6 @@ echo "PLIST_SUB+= SUB_SPF=\"${SUB_SPF}\""
# for some reason, if we alter the pkg name this way, the first build (where
# we ask the configure questions) doesn't pick up the extensions, but
-# any subsequent build will. so "make; make install" will build twice.
+# any subsequent build will. so "make; make install" will build twice.
# don't do this for now.
#echo "PKGNAMESUFFIX= \${NOPCRE_SUFFIX}\${SASL_SUFFIX}\${DB_SUFFIX}\${MYSQL_SUFFIX}\${PGSQL_SUFFIX}\${OPENLDAP_SUFFIX}\${TLS_SUFFIX}\${IPv6_SUFFIX}\${SPF_SUFFIX}"
diff --git a/mail/postfix21/scripts/fix-files-list b/mail/postfix21/scripts/fix-files-list
deleted file mode 100644
index cc4a1083a814..000000000000
--- a/mail/postfix21/scripts/fix-files-list
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-# need to fixup ${PREFIX}/etc/postfix/postfix-files to indicate compressed
-# man pages, since the ports software compresses them later, and if we
-# run post-install it will complain about missing files
-# (script from Simon J. Mudd)
-
-ed ${PREFIX}/etc/postfix/postfix-files <<EOF || exit 1
-%s/\(\/man[158]\/.*\.[158]\):/\1.gz:/
-w
-q
-EOF