Date: Wed, 1 Nov 2000 00:07:02 -0600 (CST) From: "Scot W. Hetzel" <hetzels@westbend.net> To: FreeBSD-gnats-submit@freebsd.org, hetzels@westbend.net, stb@freebsd.org Subject: ports/22465: mail/cyrus port removes /var/pwcheck directory. Message-ID: <200011010607.AAA31489@spare.westbend.net>
next in thread | raw e-mail | index | archive | help
>Number: 22465 >Category: ports >Synopsis: /var/pwcheck CONFLICT between mail/cyrus and security/cyrus-sasl >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Oct 31 22:10:02 PST 2000 >Closed-Date: >Last-Modified: >Originator: Scot W. Hetzel >Release: FreeBSD 4.1-STABLE i386 >Organization: West Bend Internet >Environment: >Description: The mail/cyrus port used to install the pwcheck daemon and needed to create the /var/pwcheck directory. This has since moved to the security/cyrus-sasl port and is no longer needed in the mail/cyrus port. NOTE: I have sent similar patches to the maintainer, but no action was taken. deliver.c needs a patch to defines the location of sendmail as /usr/sbin/sendmail (wrapper) instead of /usr/lib/sendmail. This is needed so that sieve can send it's mail notifications (sieve vacation, rejected messages, etc.). NOTE: Cyrus-1.6.25 (in BETA) and Cyrus-2.0.7+ have made this a imapd.conf config option. >How-To-Repeat: When you install the mail/cyrus port, and then uninstall it. It will remove the /var/pwcheck directory. Other ports then fail to authenticate due to the pwcheck directory is no longer available. This affects the system Sendmail and Postfix port, when compiled to use SASL. >Fix: Apply the attached patch to correct these problems. Changed files: Makefile files/imapd.conf files/inetd.conf.cyrus pkg-install pkg-plist New files: files/patch-ae pkg-deinstall Removed Files: files/cyrus.sh diff -ruN cyrus.orig/Makefile cyrus/Makefile --- cyrus.orig/Makefile Sun Oct 8 05:21:56 2000 +++ cyrus/Makefile Tue Oct 31 23:07:16 2000 @@ -76,7 +76,6 @@ ${PREFIX}/etc/imap/proc \ ${PREFIX}/etc/imap/log \ ${PREFIX}/etc/imap/msg - ${INSTALL} -d -m 700 -o cyrus -g cyrus /var/pwcheck ${TOUCH} ${PREFIX}/etc/imap/mailboxes ${CHMOD} 640 ${PREFIX}/etc/imap/mailboxes chown cyrus:cyrus ${PREFIX}/etc/imap/mailboxes @@ -89,18 +88,11 @@ @${ECHO} "@exec chown -R cyrus:cyrus %D/etc/imap" >>${TMPPLIST} @${ECHO} "@exec chmod -R g-w,o= %D/etc/imap" >>${TMPPLIST} @${ECHO} "@mode u=rwx,go=" >>${TMPPLIST} - @${ECHO} "@exec mkdir /var/pwcheck" >>${TMPPLIST} - @${ECHO} "@exec chown cyrus:cyrus /var/pwcheck" >>${TMPPLIST} - @${ECHO} "@exec chmod go= /var/pwcheck" >>${TMPPLIST} @${ECHO} "@exec mkdir /var/spool/imap" >>${TMPPLIST} @${ECHO} "@exec chown cyrus:cyrus /var/spool/imap" >>${TMPPLIST} @${ECHO} "@exec chmod g-w,o= /var/spool/imap" >>${TMPPLIST} @${ECHO} "@cwd /var" >>${TMPPLIST} - @${ECHO} "@dirrm pwcheck" >>${TMPPLIST} @${ECHO} "@dirrm spool/imap" >>${TMPPLIST} - @${SED} -e "/%%PREFIX%%/s##${PREFIX}#g" ${FILESDIR}/cyrus.sh \ - >${PREFIX}/etc/rc.d/cyrus.sh - @${CHMOD} 0755 ${PREFIX}/etc/rc.d/cyrus.sh @PKG_PREFIX=${PREFIX} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include <bsd.port.mk> diff -ruN cyrus.orig/files/cyrus.sh cyrus/files/cyrus.sh --- cyrus.orig/files/cyrus.sh Wed Sep 23 10:36:26 1998 +++ cyrus/files/cyrus.sh Wed Dec 31 18:00:00 1969 @@ -1,27 +0,0 @@ -#!/bin/sh -# -PREFIX=%%PREFIX%% - -case "$1" in - -start) - if [ -x ${PREFIX}/cyrus/bin/pwcheck ] - then - ${PREFIX}/cyrus/bin/pwcheck & && echo -n " pwcheck" - fi - ;; - -stop) - if [ -r /var/run/pwcheck.pid ] - then - kill `cat /var/run/pwcheck.pid` && echo -n " pwcheck" - fi - ;; - -*) - echo "usage: $0 {start|stop}" 1>&2 - exit 64 - ;; - -esac - diff -ruN cyrus.orig/files/imapd.conf cyrus/files/imapd.conf --- cyrus.orig/files/imapd.conf Mon Aug 30 07:06:19 1999 +++ cyrus/files/imapd.conf Tue Oct 31 23:17:31 2000 @@ -108,5 +108,32 @@ # #loginuseacl: no +# If enabled, deliver wil look for Sieve scripts in user's home directories: +# ~user/.sieve. +# +sieveusehomedir: false + +# If sieveusehomedir is false, this directory is searched for Sieve scripts. +# The active Sieve script is s called "default", placed in the users sieve +# sieve directory (ie. /usr/local/etc/imap/sieve/u/user). +# +sievedir: /usr/local/etc/imap/sieve + +# If enabled, the partitions will also be hashed, in addition to the hashing +# done on configuration directories. This is recommended if one partition has +# a very bushy mailbox tree. +# +#hashimapspool: false + +# The mechanism used by the server to verify plaintext passwords. Possible +# values include "PAM", "kerberos_v4", "passwd", and "shadow" +# +sasl_pwcheck_method: pwcheck + +# If enabled, the SASL library will automatically create authentication +# secrets when given a plaintext password. See the SASL documentation. +# +#sasl_auto_transition: no + # # EOF diff -ruN cyrus.orig/files/inetd.conf.cyrus cyrus/files/inetd.conf.cyrus --- cyrus.orig/files/inetd.conf.cyrus Mon Aug 30 07:06:19 1999 +++ cyrus/files/inetd.conf.cyrus Tue Oct 31 21:57:34 2000 @@ -10,3 +10,10 @@ # To be able to access the IMAP mailbox by POP-3, use this line. pop3 stream tcp nowait cyrus /usr/local/cyrus/bin/pop3d pop3d # +# Program to upload user sieve scripts to the IMAP server. +# +# NOTE: you will need to add "sieve" to /etc/services. +# timsieved uses port 2000. +# +sieve strean tcp nowait cyrus /usr/local/cyrus/bin/timsieved sieve + diff -ruN cyrus.orig/files/patch-ae cyrus/files/patch-ae --- cyrus.orig/files/patch-ae Wed Dec 31 18:00:00 1969 +++ cyrus/files/patch-ae Tue Oct 31 22:54:45 2000 @@ -0,0 +1,11 @@ +--- imap/deliver.c.orig Tue Jan 4 17:49:02 2000 ++++ imap/deliver.c Tue Oct 31 22:49:37 2000 +@@ -821,7 +821,7 @@ + } + } + +-#define SENDMAIL "/usr/lib/sendmail" ++#define SENDMAIL "/usr/sbin/sendmail" + #define POSTMASTER "postmaster" + + static char *month[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", diff -ruN cyrus.orig/pkg-deinstall cyrus/pkg-deinstall --- cyrus.orig/pkg-deinstall Wed Dec 31 18:00:00 1969 +++ cyrus/pkg-deinstall Tue Oct 31 22:29:39 2000 @@ -0,0 +1,47 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Created by: hetzels@westbend.net + +#set -vx + +PKG_BATCH=${BATCH:=NO} + +PKG_PREFIX=${PKG_PREFIX:=/usr/local} + +checkfile() { + diff -bBqw $1 $1.dist >/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 +} + +# Uninstall timseived's Cyrus.conf file. + +cyrus_conf() { + if [ -f ${PKG_PREFIX}/lib/sasl/Cyrus.conf ]; then + echo "pwcheck_method: pwcheck" > ${PKG_PREFIX}/lib/sasl/Cyrus.conf.tmp + if cmp -s ${PKG_PREFIX}/lib/sasl/Cyrus.conf ${PKG_PREFIX}/lib/sasl/Cyrus.conf.tmp; then + rm -f ${PKG_PREFIX}/lib/sasl/Cyrus.conf + fi + rm -f ${PKG_PREFIX}/lib/sasl/Cyrus.conf.tmp + fi +} + +case $2 in + DEINSTALL) + cd ${PKG_PREFIX} + cyrus_conf + checkfile ${PKG_PREIFX}/etc/imapd.conf + ;; + POST-DEINSTALL) + ;; + +esac diff -ruN cyrus.orig/pkg-install cyrus/pkg-install --- cyrus.orig/pkg-install Sun May 9 21:22:57 1999 +++ cyrus/pkg-install Tue Oct 31 22:46:27 2000 @@ -2,6 +2,10 @@ #set -vx +PKG_BATCH=${BATCH:=NO} + +PKG_PREFIX=${PKG_PREFIX:=/usr/local} + # # create 'cyrus' user and group before installing # @@ -76,6 +80,13 @@ esac } +# Install timseived's Cyrus.conf file + +cyrus_conf() { + if [ ! -f ${PKG_PREFIX}/lib/sasl/Cyrus.conf ]; then + echo "pwcheck_method: pwcheck" > ${PKG_PREFIX}/lib/sasl/Cyrus.conf + fi +} case $2 in PRE-INSTALL) @@ -84,6 +95,7 @@ POST-INSTALL) cd ${PKG_PREFIX} + cyrus_conf checkfile ${PKG_PREFIX}/etc/imapd.conf if grep '^imap4' /etc/inetd.conf; then echo "** Please check that your /etc/inetd.conf entry for \`imap4'" @@ -91,6 +103,24 @@ else echo "** Please add an entry for the imap4 protocol to /etc/inetd.conf." fi + echo + if grep '^sieve' /etc/inetd.conf; then + echo "** Please check that your /etc/inetd.conf entry for \`sieve'" + echo " is suitable for the Cyrus timsieved daemon" + else + echo "** Please add an entry for timseived to /etc/inetd.conf." + echo " If you wish to have user's upload their sieve filter" + echo " scripts to the server." + fi + echo echo " An example can be found in ${PKG_PREFIX}/etc/inetd.conf.cyrus." + 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 diff -ruN cyrus.orig/pkg-plist cyrus/pkg-plist --- cyrus.orig/pkg-plist Sat May 13 14:08:21 2000 +++ cyrus/pkg-plist Tue Oct 31 22:27:58 2000 @@ -14,7 +14,6 @@ cyrus/bin/feedcyrus cyrus/bin/timsieved cyrus/bin/cyrquota -etc/rc.d/cyrus.sh etc/imapd.conf.dist etc/inetd.conf.cyrus etc/imap/mailboxes >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011010607.AAA31489>