View | Details | Raw Unified | Return to bug 22465
Collapse All | Expand All

(-)cyrus/Makefile (-8 lines)
Lines 76-82 Link Here
76
			${PREFIX}/etc/imap/proc \
76
			${PREFIX}/etc/imap/proc \
77
			${PREFIX}/etc/imap/log \
77
			${PREFIX}/etc/imap/log \
78
			${PREFIX}/etc/imap/msg
78
			${PREFIX}/etc/imap/msg
79
		${INSTALL} -d -m 700 -o cyrus -g cyrus /var/pwcheck
80
		${TOUCH} ${PREFIX}/etc/imap/mailboxes
79
		${TOUCH} ${PREFIX}/etc/imap/mailboxes
81
		${CHMOD} 640 ${PREFIX}/etc/imap/mailboxes
80
		${CHMOD} 640 ${PREFIX}/etc/imap/mailboxes
82
		chown cyrus:cyrus ${PREFIX}/etc/imap/mailboxes
81
		chown cyrus:cyrus ${PREFIX}/etc/imap/mailboxes
Lines 89-106 Link Here
89
		@${ECHO} "@exec chown -R cyrus:cyrus %D/etc/imap" >>${TMPPLIST}
88
		@${ECHO} "@exec chown -R cyrus:cyrus %D/etc/imap" >>${TMPPLIST}
90
		@${ECHO} "@exec chmod -R g-w,o= %D/etc/imap" >>${TMPPLIST}
89
		@${ECHO} "@exec chmod -R g-w,o= %D/etc/imap" >>${TMPPLIST}
91
		@${ECHO} "@mode u=rwx,go=" >>${TMPPLIST}
90
		@${ECHO} "@mode u=rwx,go=" >>${TMPPLIST}
92
		@${ECHO} "@exec mkdir /var/pwcheck" >>${TMPPLIST}
93
		@${ECHO} "@exec chown cyrus:cyrus /var/pwcheck" >>${TMPPLIST}
94
		@${ECHO} "@exec chmod go= /var/pwcheck" >>${TMPPLIST}
95
		@${ECHO} "@exec mkdir /var/spool/imap" >>${TMPPLIST}
91
		@${ECHO} "@exec mkdir /var/spool/imap" >>${TMPPLIST}
96
		@${ECHO} "@exec chown cyrus:cyrus /var/spool/imap" >>${TMPPLIST}
92
		@${ECHO} "@exec chown cyrus:cyrus /var/spool/imap" >>${TMPPLIST}
97
		@${ECHO} "@exec chmod g-w,o= /var/spool/imap" >>${TMPPLIST}
93
		@${ECHO} "@exec chmod g-w,o= /var/spool/imap" >>${TMPPLIST}
98
		@${ECHO} "@cwd /var" >>${TMPPLIST}
94
		@${ECHO} "@cwd /var" >>${TMPPLIST}
99
		@${ECHO} "@dirrm pwcheck" >>${TMPPLIST}
100
		@${ECHO} "@dirrm spool/imap" >>${TMPPLIST}
95
		@${ECHO} "@dirrm spool/imap" >>${TMPPLIST}
101
		@${SED} -e "/%%PREFIX%%/s##${PREFIX}#g" ${FILESDIR}/cyrus.sh \
102
			>${PREFIX}/etc/rc.d/cyrus.sh
103
		@${CHMOD} 0755 ${PREFIX}/etc/rc.d/cyrus.sh
104
		@PKG_PREFIX=${PREFIX} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
96
		@PKG_PREFIX=${PREFIX} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
105
97
106
.include <bsd.port.mk>
98
.include <bsd.port.mk>
(-)cyrus/files/cyrus.sh (-27 lines)
Lines 1-27 Link Here
1
#!/bin/sh
2
#
3
PREFIX=%%PREFIX%%
4
5
case "$1" in
6
7
start)
8
	if [ -x ${PREFIX}/cyrus/bin/pwcheck ]
9
	then
10
		${PREFIX}/cyrus/bin/pwcheck & && echo -n " pwcheck"
11
	fi
12
	;;
13
14
stop)
15
	if [ -r /var/run/pwcheck.pid ]
16
	then
17
		kill `cat /var/run/pwcheck.pid` && echo -n " pwcheck"
18
	fi
19
	;;
20
21
*)
22
	echo "usage: $0 {start|stop}" 1>&2
23
	exit 64
24
	;;
25
26
esac
27
(-)cyrus/files/imapd.conf (+27 lines)
Lines 108-112 Link Here
108
#
108
#
109
#loginuseacl: no
109
#loginuseacl: no
110
110
111
# If enabled, deliver wil look for Sieve scripts in user's home directories:
112
# ~user/.sieve.
113
#
114
sieveusehomedir: false
115
116
# If sieveusehomedir is false, this directory is searched for Sieve scripts.
117
# The active Sieve script is s called "default", placed in the users sieve
118
# sieve directory (ie. /usr/local/etc/imap/sieve/u/user).
119
#
120
sievedir: /usr/local/etc/imap/sieve
121
122
# If enabled, the partitions will also be hashed, in addition to the hashing
123
# done on configuration directories.  This is recommended if one partition has
124
# a very bushy mailbox tree.
125
#
126
#hashimapspool: false
127
128
# The mechanism used by the server to verify plaintext passwords.  Possible
129
# values include "PAM", "kerberos_v4", "passwd", and "shadow"
130
#
131
sasl_pwcheck_method: pwcheck
132
133
# If  enabled,  the  SASL library will automatically create authentication
134
# secrets when given a plaintext password.  See the SASL documentation.
135
#
136
#sasl_auto_transition: no
137
111
#
138
#
112
# EOF
139
# EOF
(-)cyrus/files/inetd.conf.cyrus (+7 lines)
Lines 10-12 Link Here
10
# To be able to access the IMAP mailbox by POP-3, use this line.
10
# To be able to access the IMAP mailbox by POP-3, use this line.
11
pop3	stream	tcp	nowait	cyrus	/usr/local/cyrus/bin/pop3d	pop3d
11
pop3	stream	tcp	nowait	cyrus	/usr/local/cyrus/bin/pop3d	pop3d
12
#
12
#
13
# Program to upload user sieve scripts to the IMAP server.
14
#
15
# NOTE: you will need to add "sieve" to /etc/services.
16
#       timsieved uses port 2000.
17
#
18
sieve   strean  tcp     nowait  cyrus   /usr/local/cyrus/bin/timsieved  sieve
19
(-)cyrus/files/patch-ae (+11 lines)
Line 0 Link Here
1
--- imap/deliver.c.orig	Tue Jan  4 17:49:02 2000
2
+++ imap/deliver.c	Tue Oct 31 22:49:37 2000
3
@@ -821,7 +821,7 @@
4
     }
5
 }
6
 
7
-#define SENDMAIL "/usr/lib/sendmail"
8
+#define SENDMAIL "/usr/sbin/sendmail"
9
 #define POSTMASTER "postmaster"
10
 
11
 static char *month[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
(-)cyrus/pkg-deinstall (+47 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
#	$FreeBSD$
4
#
5
# Created by: hetzels@westbend.net
6
7
#set -vx
8
9
PKG_BATCH=${BATCH:=NO}
10
11
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
12
13
checkfile() {
14
        diff -bBqw $1 $1.dist >/dev/null 2>&1
15
        case $? in
16
                0)      # config file exists, but is the same
17
			rm $1
18
                        ;;
19
                1)      # config file exists and differs
20
                        ;;
21
                *)      # no config file exists
22
                        ;;
23
        esac
24
}
25
26
# Uninstall timseived's Cyrus.conf file.
27
28
cyrus_conf() {
29
	if [ -f ${PKG_PREFIX}/lib/sasl/Cyrus.conf ]; then
30
		echo "pwcheck_method: pwcheck" > ${PKG_PREFIX}/lib/sasl/Cyrus.conf.tmp
31
		if cmp -s ${PKG_PREFIX}/lib/sasl/Cyrus.conf ${PKG_PREFIX}/lib/sasl/Cyrus.conf.tmp; then
32
			rm -f ${PKG_PREFIX}/lib/sasl/Cyrus.conf
33
		fi
34
		rm -f ${PKG_PREFIX}/lib/sasl/Cyrus.conf.tmp
35
	fi
36
}
37
38
case $2 in
39
	DEINSTALL)
40
		cd ${PKG_PREFIX}
41
		cyrus_conf
42
		checkfile ${PKG_PREIFX}/etc/imapd.conf
43
		;;
44
	POST-DEINSTALL)
45
		;;
46
47
esac
(-)cyrus/pkg-install (+30 lines)
Lines 2-7 Link Here
2
2
3
#set -vx
3
#set -vx
4
4
5
PKG_BATCH=${BATCH:=NO}
6
7
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
8
5
#
9
#
6
# create 'cyrus' user and group before installing
10
# create 'cyrus' user and group before installing
7
#
11
#
Lines 76-81 Link Here
76
	esac
80
	esac
77
}
81
}
78
82
83
# Install timseived's Cyrus.conf file
84
85
cyrus_conf() {
86
        if [ ! -f ${PKG_PREFIX}/lib/sasl/Cyrus.conf ]; then
87
                echo "pwcheck_method: pwcheck" > ${PKG_PREFIX}/lib/sasl/Cyrus.conf
88
        fi
89
}
79
90
80
case $2 in
91
case $2 in
81
	PRE-INSTALL)
92
	PRE-INSTALL)
Lines 84-89 Link Here
84
95
85
	POST-INSTALL)
96
	POST-INSTALL)
86
		cd ${PKG_PREFIX}
97
		cd ${PKG_PREFIX}
98
		cyrus_conf
87
		checkfile ${PKG_PREFIX}/etc/imapd.conf
99
		checkfile ${PKG_PREFIX}/etc/imapd.conf
88
		if grep '^imap4' /etc/inetd.conf; then
100
		if grep '^imap4' /etc/inetd.conf; then
89
			echo "** Please check that your /etc/inetd.conf entry for \`imap4'"
101
			echo "** Please check that your /etc/inetd.conf entry for \`imap4'"
Lines 91-96 Link Here
91
		else
103
		else
92
			echo "** Please add an entry for the imap4 protocol to /etc/inetd.conf."
104
			echo "** Please add an entry for the imap4 protocol to /etc/inetd.conf."
93
		fi
105
		fi
106
		echo
107
		if grep '^sieve' /etc/inetd.conf; then
108
			echo "** Please check that your /etc/inetd.conf entry for \`sieve'"
109
			echo "   is suitable for the Cyrus timsieved daemon"
110
		else
111
			echo "** Please add an entry for timseived to /etc/inetd.conf."
112
			echo "   If you wish to have user's upload their sieve filter"
113
			echo "   scripts to the server."
114
		fi
115
		echo
94
		echo "   An example can be found in ${PKG_PREFIX}/etc/inetd.conf.cyrus."
116
		echo "   An example can be found in ${PKG_PREFIX}/etc/inetd.conf.cyrus."
117
		if grep 'sieve' /etc/services; then
118
			echo
119
		else
120
			echo
121
			echo "** Please add an entry for the sieve protocol (2000/tcp)"
122
			echo "   to /etc/services"
123
			echo
124
		fi
95
		;;
125
		;;
96
esac
126
esac
(-)cyrus/pkg-plist (-1 lines)
Lines 14-20 Link Here
14
cyrus/bin/feedcyrus
14
cyrus/bin/feedcyrus
15
cyrus/bin/timsieved
15
cyrus/bin/timsieved
16
cyrus/bin/cyrquota
16
cyrus/bin/cyrquota
17
etc/rc.d/cyrus.sh
18
etc/imapd.conf.dist
17
etc/imapd.conf.dist
19
etc/inetd.conf.cyrus
18
etc/inetd.conf.cyrus
20
etc/imap/mailboxes
19
etc/imap/mailboxes

Return to bug 22465