summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorMarcus Alves Grando <mnag@FreeBSD.org>2006-01-12 16:23:30 +0000
committerMarcus Alves Grando <mnag@FreeBSD.org>2006-01-12 16:23:30 +0000
commit7f1fdfcab473c5763c5d88931488ed631718f24a (patch)
treed8c58984d6c3120dec811d19026190cedc58e18e /mail
parentAdd rcNG script to start postfix (diff)
Add rcNG script to start postfix
Update pkg-message to reflect rcNG script Bump PORTREVISION portlint(1)
Notes
Notes: svn path=/head/; revision=153355
Diffstat (limited to 'mail')
-rw-r--r--mail/postfix21/Makefile53
-rw-r--r--mail/postfix21/files/postfix.sh.in35
-rw-r--r--mail/postfix21/pkg-message32
-rw-r--r--mail/postfix21/scripts/configure.postfix5
4 files changed, 77 insertions, 48 deletions
diff --git a/mail/postfix21/Makefile b/mail/postfix21/Makefile
index 2610923489a5..957d7ae2b8fb 100644
--- a/mail/postfix21/Makefile
+++ b/mail/postfix21/Makefile
@@ -16,6 +16,7 @@
PORTNAME= postfix
PORTVERSION= 2.1.6
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= mail ipv6
MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \
@@ -36,6 +37,7 @@ CONFLICTS= courier-0.* postfix-1.* postfix-2.0.* postfix-2.2.* postfix-2.3.* \
NO_LATEST_LINK= yes
USE_SUBMAKE= yes
USE_REINPLACE= yes
+USE_RC_SUBR= postfix.sh
MAN1= mailq.1 newaliases.1 postalias.1 postcat.1 postconf.1 postdrop.1 \
postfix.1 postkick.1 postlock.1 postlog.1 postmap.1 postqueue.1 \
@@ -81,6 +83,9 @@ SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
MKDIR="${MKDIR}" \
POSTFIX_OPTIONS="${POSTFIX_OPTIONS}"
+# Default requirement for postfix rcNG
+_REQUIRE= DAEMON
+
pre-fetch:
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.postfix
@@ -91,34 +96,42 @@ pre-fetch:
.if defined(WITHOUT_PCRE)
POSTFIX_CCARGS+= -DNO_PCRE
.else
-LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
+LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
POSTFIX_CCARGS+= -DHAS_PCRE -I${LOCALBASE}/include
POSTFIX_AUXLIBS+= -L${LOCALBASE}/lib -lpcre
.endif
+.if defined(NOPORTDOCS)
+READMEDIR=no
+.else
+READMEDIR=${PREFIX}/share/doc/postfix
+.endif
+
+SUB_LIST+= REQUIRE="${_REQUIRE}"
+
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}
+. for f in ${MAN1}
@${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
- ${WRKSRC}/man/man1/${file} ${WRKSRC}/html/${file}.html
+ ${WRKSRC}/man/man1/${f} ${WRKSRC}/html/${f}.html
. endfor
-. for file in ${MAN5}
+. for f in ${MAN5}
@${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
- ${WRKSRC}/man/man5/${file} ${WRKSRC}/html/${file}.html
+ ${WRKSRC}/man/man5/${f} ${WRKSRC}/html/${f}.html
. endfor
-. for file in ${MAN8base}
+. for f in ${MAN8base}
@${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
- ${WRKSRC}/man/man8/${file} ${WRKSRC}/html/${file}.html
+ ${WRKSRC}/man/man8/${f} ${WRKSRC}/html/${f}.html
. endfor
-. for file in ${README}
+. for f in ${README}
@${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
- ${WRKSRC}/html/${file}.html
+ ${WRKSRC}/html/${f}.html
@${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" \
- ${WRKSRC}/README_FILES/${file}
+ ${WRKSRC}/README_FILES/${f}
. endfor
-. for file in ${CONF1}
- @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" ${WRKSRC}/conf/${file}
+. for f in ${CONF1}
+ @${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" ${WRKSRC}/conf/${f}
. endfor
post-patch:
@@ -134,12 +147,6 @@ do-configure:
pre-install:
@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-.if defined(NOPORTDOCS)
-READMEDIR=no
-.else
-READMEDIR=${PREFIX}/share/doc/postfix
-.endif
-
do-install:
cd ${WRKSRC}; ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp \
config_directory=${PREFIX}/etc/postfix \
@@ -157,13 +164,13 @@ do-install:
@${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${PREFIX}/bin/rmail
-. for file in ${BINTEST}
- @${INSTALL_PROGRAM} ${WRKSRC}/bin/${file} ${PREFIX}/sbin
+. for f in ${BINTEST}
+ @${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${PREFIX}/sbin
. endfor
-. for file in ${CONF1}
- ${INSTALL_DATA} ${WRKSRC}/conf/${file} \
- ${PREFIX}/etc/postfix/dist-${file}
+. for f in ${CONF1}
+ ${INSTALL_DATA} ${WRKSRC}/conf/${f} \
+ ${PREFIX}/etc/postfix/dist-${f}
. endfor
. if !defined(NOPORTDOCS)
diff --git a/mail/postfix21/files/postfix.sh.in b/mail/postfix21/files/postfix.sh.in
new file mode 100644
index 000000000000..8424abbe123b
--- /dev/null
+++ b/mail/postfix21/files/postfix.sh.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: postfix
+# REQUIRE: %%REQUIRE%%
+# KEYWORD: shutdown
+#
+# Define these postfix_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/postfix
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+postfix_enable="${postfix_enable-NO}"
+
+. %%RC_SUBR%%
+
+name="postfix"
+rcvar=`set_rcvar`
+
+start_cmd=${name}_start
+stop_cmd=${name}_stop
+
+postfix_start() {
+ %%PREFIX%%/sbin/postfix start
+}
+
+postfix_stop() {
+ %%PREFIX%%/sbin/postfix stop
+}
+
+load_rc_config ${name}
+run_rc_command "$1"
diff --git a/mail/postfix21/pkg-message b/mail/postfix21/pkg-message
index c9b85fc8c365..d4bc72bd9c7d 100644
--- a/mail/postfix21/pkg-message
+++ b/mail/postfix21/pkg-message
@@ -1,37 +1,21 @@
-If you have postfix configured in your /etc/mail/mailer.conf (answered yes to
-the previous question) and would like to enable postfix to start at boot time,
-please set these variables in your /etc/rc.conf file:
+To enable postfix rcNG startup script please add postfix_enable="YES" in
+your rc.conf
-sendmail_enable="YES"
-sendmail_flags="-bd"
-sendmail_pidfile="/var/spool/postfix/pid/master.pid"
-sendmail_outbound_enable="NO"
+If you not need sendmail anymore, please add in your rc.conf:
+
+sendmail_enable="NO"
sendmail_submit_enable="NO"
+sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
-This will disable Sendmail completely.
-
-Alternatively to the above settings, you can enable postfix to start with
-the other local services, for example, after your database server starts if
-you need it to be running for postfix. To do this, set in your rc.conf file:
-
-sendmail_enable="NONE"
-
-Then make the following symbolic link:
-
-cd /usr/local/etc/rc.d
-ln -s /usr/local/sbin/postfix postfix.sh
-
-
-Also, you will want to disable some Sendmail-specific daily maintenance
-routines in your /etc/periodic.conf file:
+And you can disable some sendmail specific daily maintenance routines in your
+/etc/periodic.conf file:
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
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 /usr/local/etc/sasldb* file(s) readable by group mail (this should
diff --git a/mail/postfix21/scripts/configure.postfix b/mail/postfix21/scripts/configure.postfix
index 1d8c8824e184..8db47f847136 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.61 2005-10-14 14:24:15 mnag Exp $
+# $FreeBSD: /tmp/pcvs/ports/mail/postfix21/scripts/Attic/configure.postfix,v 1.62 2006-01-12 16:23:30 mnag Exp $
if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
exit
@@ -172,18 +172,21 @@ while [ "$1" ]; do
echo "POSTFIX_CCARGS+= -DHAS_MYSQL -I\${LOCALBASE}/include/mysql"
echo "POSTFIX_AUXLIBS+= \${LOCALBASE}/lib/mysql/libmysqlclient.a -lm -lz"
echo "MYSQL_SUFFIX= +mysql"
+ echo "_REQUIRE+= mysql"
;;
PgSQL)
echo "USE_PGSQL=YES"
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"
+ echo "_REQUIRE+= postgresql"
;;
OpenLDAP)
echo "USE_OPENLDAP=YES"
echo "POSTFIX_CCARGS+= -DHAS_LDAP -I\${LOCALBASE}/include"
echo "POSTFIX_AUXLIBS+= -L\${LOCALBASE}/lib -lldap -llber"
echo "OPENLDAP_SUFFIX= +openldap"
+ echo "_REQUIRE+= slapd"
echo ".if defined(WITH_OPENLDAP_VER)"
echo "WANT_OPENLDAP_VER=\${WITH_OPENLDAP_VER}"
echo ".endif"