aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorlawrance <lawrance@FreeBSD.org>2006-02-14 20:00:05 +0800
committerlawrance <lawrance@FreeBSD.org>2006-02-14 20:00:05 +0800
commit55a8091d9e2a1fbbc2b1e589b38da9d9230825ee (patch)
tree35acf44e3d43bb277f42d64c3c5394011bf01be5 /mail
parent6f268c6d9412fe6e44c816e8ce0b31a540cd96c9 (diff)
downloadfreebsd-ports-gnome-55a8091d9e2a1fbbc2b1e589b38da9d9230825ee.tar.gz
freebsd-ports-gnome-55a8091d9e2a1fbbc2b1e589b38da9d9230825ee.tar.zst
freebsd-ports-gnome-55a8091d9e2a1fbbc2b1e589b38da9d9230825ee.zip
Add plist entries to create empty directories.
Add 'sharedindexupdate' srcipt. Use 'exec' in shell scripts. PR: ports/93269 Submitted by: Yarema <yds@CoolRat.org> (maintainer)
Diffstat (limited to 'mail')
-rw-r--r--mail/courier/Makefile17
-rw-r--r--mail/courier/files/pkg-message.in8
-rw-r--r--mail/courier/files/sharedindexupdate.in26
-rw-r--r--mail/courier/pkg-plist21
4 files changed, 65 insertions, 7 deletions
diff --git a/mail/courier/Makefile b/mail/courier/Makefile
index 06ae632ef426..47e7c9b817ca 100644
--- a/mail/courier/Makefile
+++ b/mail/courier/Makefile
@@ -7,6 +7,7 @@
PORTNAME= courier
PORTVERSION= 0.52.2
+PORTREVISION= 1
CATEGORIES= mail ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier
@@ -59,16 +60,15 @@ CALENDIR= /var/spool/calendar
MIMETYPES= ${LOCALBASE}/etc/mime.types
WITH_TRANSPORT= local esmtp dsn
+USE_AUTOTOOLS= libtool:15
USE_BZIP2= yes
-USE_SUBMAKE= yes
-USE_PERL5= yes
+USE_FAM= yes
USE_GETTEXT= yes
USE_GMAKE= yes
USE_OPENSSL= yes
+USE_PERL5= yes
USE_REINPLACE= yes
-USE_AUTOTOOLS= libtool:15
-USE_FAM= yes
-WANT_FAM_SYSTEM=fam
+USE_SUBMAKE= yes
.if defined(WITH_RCORDER)
USE_RCORDER= courier.sh
@@ -118,7 +118,7 @@ PLIST_SUB+= BINOWN="${BINOWN}" BINGRP="${BINGRP}" \
CACHEOWN="${CACHEOWN}" CACHEDIR="${CACHEDIR}" \
CALENDIR="${CALENDIR}" LOCALSTATEDIR="${LOCALSTATEDIR}"
SUB_LIST:= ${PLIST_SUB}
-SUB_FILES+= pkg-install pkg-message crontab
+SUB_FILES+= pkg-install pkg-message crontab sharedindexupdate
OPTIONS+=LDAP "LDAP-based mail aliasing support"
.if (exists(${LOCALBASE}/lib/libldap.a) && exists(${LOCALBASE}/lib/liblber.a)) || defined(WITH_LDAP)
@@ -272,6 +272,8 @@ pre-patch:
@${CP} ${TEMPLATES}/config.guess ${TEMPLATES}/config.sub ${WRKSRC}
post-patch:
+ @${REINPLACE_CMD} -e 's|^PROG=\./|PROG=exec ./|g' \
+ ${WRKSRC}/courier/module.*/courier.config
@${REINPLACE_CMD} -e 's|@datadir@|@sysconfdir@|g' \
${WRKSRC}/*/mk*cert.* \
${WRKSRC}/*/*/mk*cert.*
@@ -321,7 +323,8 @@ post-build:
post-install:
@${LN} -f ${SYSCONFDIR}/maildrop ${SYSCONFDIR}/maildropfilter
@${INSTALL_DATA} /dev/null ${SYSCONFDIR}/locallowercase
- @${INSTALL_DATA} ${WRKDIR}/crontab ${PREFIX}/etc/courier/
+ @${INSTALL_DATA} ${WRKDIR}/crontab ${SYSCONFDIR}/
+ @${INSTALL_SCRIPT} ${WRKDIR}/sharedindexupdate ${DATADIR}/
.for file in ${OWNER0}
@-${CHOWN} -Rh ${BINOWN}:${BINGRP} ${PREFIX}/${file}
.endfor
diff --git a/mail/courier/files/pkg-message.in b/mail/courier/files/pkg-message.in
index 48ba798bc30d..286912be6fd4 100644
--- a/mail/courier/files/pkg-message.in
+++ b/mail/courier/files/pkg-message.in
@@ -38,3 +38,11 @@
Documentation (if installed locally) is located in
%%DOCSDIR%%/ otherwise see
http://www.Courier-MTA.org/
+
+ If you are planning to serve shared maildirs, then
+ you should create a cron job that runs at regular
+ intervals (once every few hours is fine) that
+ executes the following script to update the
+ shared folder index:
+
+ %%PREFIX%%/share/courier/sharedindexupdate
diff --git a/mail/courier/files/sharedindexupdate.in b/mail/courier/files/sharedindexupdate.in
new file mode 100644
index 000000000000..cc72cceb212d
--- /dev/null
+++ b/mail/courier/files/sharedindexupdate.in
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $NetBSD: sharedindexupdate.sh,v 1.2 2005/02/18 22:12:50 jlam Exp $
+# $FreeBSD: /tmp/pcvs/ports/mail/courier/files/sharedindexupdate.in,v 1.1 2006-02-14 12:00:05 lawrance Exp $
+#
+# This script updates the index of shared folders on the system and is
+# only needed if Courier-IMAP or SqWebMail used to serve mail and shared
+# folders are used. If so, then this script should be run regularly as a
+# system process to ensure the shared folder index is kept up-to-date.
+#
+# The courier-authlib package must be separately installed to provide the
+# "authenumerate" program used in this script.
+
+prefix="%%PREFIX%%"
+exec_prefix="${prefix}"
+sysconfdir="${prefix}/etc/courier"
+sbindir="${exec_prefix}/sbin"
+
+rm -rf ${sysconfdir}/shared.tmp
+mkdir ${sysconfdir}/shared.tmp || exit 1
+
+test -x ${sbindir}/authenumerate || exit 1
+${sbindir}/authenumerate > ${sysconfdir}/shared.tmp/.tmplist || exit 1
+${sbindir}/sharedindexsplit ${sysconfdir}/shared.tmp 1 < ${sysconfdir}/shared.tmp/.tmplist || exit 1
+rm -f ${sysconfdir}/shared.tmp/.tmplist
+${sbindir}/sharedindexinstall
diff --git a/mail/courier/pkg-plist b/mail/courier/pkg-plist
index a86f292479ca..2635bfd1b5fe 100644
--- a/mail/courier/pkg-plist
+++ b/mail/courier/pkg-plist
@@ -13,10 +13,12 @@
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %D/etc/courier/aliases
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/esmtpacceptmailfor.dir
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/esmtppercentrelay.dir
+@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %D/etc/courier/filters
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d %D/etc/courier/filters/active
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/shared
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/shared.tmp
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0755 -d %D/etc/courier/smtpaccess
+@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 -d %D/etc/courier/webadmin
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 -d %D/etc/courier/webadmin/added
@exec install -o %%MAILOWN%% -g %%MAILGRP%% -m 0700 -d %D/etc/courier/webadmin/removed
@unexec rm -f %D/etc/courier/*.dat 2>/dev/null || true
@@ -495,6 +497,7 @@ share/courier/rootcerts/verisign-time-stamping-authority.pem
share/courier/rootcerts/visa-ecommerce-root.pem
share/courier/rootcerts/xramp-global-certification-authority.pem
@dirrm share/courier/rootcerts
+share/courier/sharedindexupdate
share/courier/sqwebmail/cleancache.pl
share/courier/sqwebmail/html/en-us/CHARSET
share/courier/sqwebmail/html/en-us/ISPELLDICT
@@ -733,5 +736,23 @@ share/courier/sqwebmail/webgpg
@exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/submit
@exec chown %%MAILOWN%%:%%MAILGRP%% %D/libexec/courier/submitmkdir
@exec chown %%MAILOWN%%:%%MAILGRP%% %D/sbin/showmodules
+@exec chmod 0555 %D/libexec/courier
+@exec chmod 0555 %D/libexec/courier/modules
+@exec chmod 0555 %D/libexec/courier/modules/dsn
+@exec chmod 0555 %D/libexec/courier/modules/esmtp
+%%WITHFAX%%@exec chmod 0555 %D/libexec/courier/modules/fax
+@exec chmod 0555 %D/libexec/courier/modules/local
+%%WITHUUCP%%@exec chmod 0555 %D/libexec/courier/modules/uucp
+@exec chmod 0555 %D/libexec/courier/webmail
+@exec chmod 0555 %D/libexec/filters
+@exec chmod 0555 %D/share/courier
+@exec chmod 0555 %D/share/courier/couriermlm
+@exec chmod 0555 %D/share/courier/courierwebadmin
+%%WITHFAX%%@exec chmod 0555 %D/share/courier/faxmail
+@exec chmod 0555 %D/share/courier/rootcerts
+@exec chmod 0555 %D/share/courier/sqwebmail
+@exec chmod 0555 %D/share/courier/sqwebmail/html
+@exec chmod 0555 %D/share/courier/sqwebmail/html/en-us
+@exec chmod 0555 %D/share/courier/sqwebmail/images
@unexec echo y | crontab -u %%CACHEOWN%% -r 2>/dev/null || true
@unexec rm -rf %%CALENDIR%% %%CACHEDIR%% 2>/dev/null || true