pkg-deinstall

#!/bin/sh
#
# $FreeBSD: ports/mail/cyrus-imapd23/pkg-deinstall,v 1.10 2004/07/28 10:45:19 ume Exp $
#
# Created by: hetzels@westbend.net

#set -vx

PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%}
CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}

checkfile() {
diff -bBqw $1 $2 >/dev/null 2>&1
case $? in
0) # config file exists, but is the same
rm $1
;;
1) # config file exists and differs
;;
*) # no config file exists
;;
esac
}

#
# Modify the 'cyrus' user created from the cyrus-sasl port
#

modify_cyrus_user() {
USER=${CYRUS_USER}
PW=/usr/sbin/pw
if [ -x /usr/sbin/nologin ]; then
shell=/usr/sbin/nologin
elif [ -x /sbin/nologin ]; then
shell=/sbin/nologin
else
shell=/nonexistent
fi
uhome=/nonexistent

if ! ${PW} mod user ${USER} -d "${uhome}" -s "${shell}"; then
echo "*** Failed to update user \`${USER}'."
else
echo "*** Updated user \`${USER}'."
fi
}

case $2 in
DEINSTALL)
cd ${PKG_PREFIX}
checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf
checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf
;;
POST-DEINSTALL)
modify_cyrus_user
;;

esac

pkg-descr

The Cyrus IMAP (Internet Message Access Protocol) server provides access to
personal mail and system-wide bulletin boards through the IMAP protocol.
The Cyrus IMAP server is a scaleable enterprise mail system designed for use
from small to large enterprise environments using standards-based
technologies.

A full Cyrus IMAP implementation allows a seamless mail and bulletin board
environment to be set up across multiple servers. It differs from other
IMAP server implementations in that it is run on "sealed" servers, where
users are not normally permitted to log in. The mailbox database is stored
in parts of the filesystem that are private to the Cyrus IMAP system. All
user access to mail is through software using the IMAP, POP3, or KPOP
protocols.

The private mailbox database design gives the server large advantages in
efficiency, scalability, and administratability. Multiple concurrent
read/write connections to the same mailbox are permitted. The server
supports access control lists on mailboxes and storage quotas on mailbox
hierarchies.

WWW: http://cyrusimap.web.cmu.edu/

pkg-install

#!/bin/sh

#set -vx

PKG_BATCH=${BATCH:=NO}
PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%}
CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}

#
# Modify the 'cyrus' user created from the cyrus-sasl port
#

modify_cyrus_user() {
USER=${CYRUS_USER}
PW=/usr/sbin/pw
shell=/bin/csh
uhome=${PKG_PREFIX}/cyrus

if ! ${PW} mod user ${USER} -d "${uhome}" -s "${shell}"; then
echo "*** Failed to update user \`${USER}'."
else
echo "*** Updated user \`${USER}'."
fi
}


checkfile() {
diff -bBqw $1 $2 >/dev/null 2>&1
case $? in
0) # config file exists, but is the same
;;
1) # config file exists and differs
echo "** Make sure $1 is in sync with this version";
echo " of the port. See $1.dist for details.";
;;
*) # no config file exists, copy it
install -c -m 644 $2 $1
;;
esac
}

case $2 in
PRE-INSTALL)
;;

POST-INSTALL)
modify_cyrus_user
cd ${PKG_PREFIX}
checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf
checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf
if grep 'sieve' /etc/services; then
echo
else
echo
echo "** Please add an entry for the sieve protocol (2000/tcp)"
echo " to /etc/services"
echo
fi
;;
esac

pkg-message

****************************************************************************

To setup mail spool, modify /usr/local/etc/imapd.conf appropriately,
then run /usr/local/cyrus/bin/mkimap.
To run Cyrus IMAPd from startup, add cyrus_imapd_enable="YES" in your
/etc/rc.conf.

****************************************************************************

pkg-plist

bin/cyradm
bin/imtest
bin/installsieve
bin/lmtptest
bin/mupdatetest
bin/nntptest
bin/pop3test
bin/sieveshell
bin/sivtest
bin/smtptest
bin/synctest
cyrus/bin/arbitron
cyrus/bin/chk_cyrus
cyrus/bin/ctl_cyrusdb
cyrus/bin/ctl_deliver
cyrus/bin/ctl_mboxlist
cyrus/bin/cvt_cyrusdb
cyrus/bin/cyr_dbtool
cyrus/bin/cyr_expire
cyrus/bin/cyr_synclog
cyrus/bin/cyrdump
cyrus/bin/deliver
%%NNTP%%cyrus/bin/fetchnews
cyrus/bin/fud
%%IDLED%%cyrus/bin/idled
cyrus/bin/imapd
cyrus/bin/ipurge
cyrus/bin/lmtpd
cyrus/bin/lmtpproxyd
%%REPLICATION%%cyrus/bin/make_md5
%%REPLICATION%%cyrus/bin/make_sha1
cyrus/bin/masssievec
cyrus/bin/master
cyrus/bin/mbexamine
cyrus/bin/mbpath
cyrus/bin/mkimap
%%MURDER%%cyrus/bin/mupdate
%%NNTP%%cyrus/bin/nntpd
cyrus/bin/notifyd
cyrus/bin/pop3d
cyrus/bin/pop3proxyd
cyrus/bin/proxyd
%%LDAP_PTLOADER%%cyrus/bin/ptdump
%%LDAP_PTLOADER%%cyrus/bin/ptexpire
%%LDAP_PTLOADER%%cyrus/bin/ptloader
cyrus/bin/quota
cyrus/bin/reconstruct
cyrus/bin/sievec
cyrus/bin/smmapd
cyrus/bin/squatter
%%REPLICATION%%cyrus/bin/sync_client
%%REPLICATION%%cyrus/bin/sync_reset
%%REPLICATION%%cyrus/bin/sync_server
cyrus/bin/timsieved
cyrus/bin/tls_prune
cyrus/bin/unexpunge
include/cyrus/acl.h
include/cyrus/assert.h
include/cyrus/auth.h
include/cyrus/bsearch.h
include/cyrus/byteorder64.h
include/cyrus/charset.h
include/cyrus/cyrusdb.h
include/cyrus/glob.h
include/cyrus/gmtoff.h
include/cyrus/hash.h
include/cyrus/hmac-md5.h
include/cyrus/imapopts.h
include/cyrus/imapurl.h
include/cyrus/imclient.h
include/cyrus/imparse.h
include/cyrus/iptostring.h
include/cyrus/libconfig.h
include/cyrus/libcyr_cfg.h
include/cyrus/lock.h
include/cyrus/lsort.h
include/cyrus/map.h
include/cyrus/md5.h
include/cyrus/mkgmtime.h
include/cyrus/mpool.h
include/cyrus/nonblock.h
include/cyrus/parseaddr.h
include/cyrus/prot.h
include/cyrus/retry.h
include/cyrus/rfc822date.h
include/cyrus/strhash.h
include/cyrus/stristr.h
include/cyrus/sysexits.h
include/cyrus/util.h
include/cyrus/xmalloc.h
include/cyrus/xstrlcat.h
include/cyrus/xstrlcpy.h
lib/libcyrus_min.a
lib/libcyrus.a
%%SITE_PERL%%/%%PERL_ARCH%%/Cyrus/IMAP/Admin.pm
%%SITE_PERL%%/%%PERL_ARCH%%/Cyrus/IMAP/IMSP.pm
%%SITE_PERL%%/%%PERL_ARCH%%/Cyrus/IMAP/Shell.pm
%%SITE_PERL%%/%%PERL_ARCH%%/Cyrus/IMAP.pm
%%SITE_PERL%%/%%PERL_ARCH%%/Cyrus/SIEVE/managesieve.pm
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/IMAP/.packlist
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/IMAP/IMAP.bs
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/IMAP/IMAP.so
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/.packlist
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/managesieve.bs
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve/managesieve.so
%%EXAMPLESDIR%%/imapd.conf
@dirrm cyrus/bin
@dirrm include/cyrus
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/Cyrus/IMAP
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/Cyrus/SIEVE
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/Cyrus
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/IMAP
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE/managesieve
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus/SIEVE
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cyrus