View | Details | Raw Unified | Return to bug 129274 | Differences between
and this patch

Collapse All | Expand All

(-)dovecot/Makefile (+1 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	dovecot
8
PORTNAME=	dovecot
9
PORTVERSION=	1.1.7
9
PORTVERSION=	1.1.7
10
PORTREVISION=	1
10
CATEGORIES=	mail ipv6
11
CATEGORIES=	mail ipv6
11
MASTER_SITES=	http://www.dovecot.org/releases/1.1/
12
MASTER_SITES=	http://www.dovecot.org/releases/1.1/
12
13
(-)dovecot/files/dovecot.sh.in (-14 / +23 lines)
Lines 20-50 Link Here
20
# read configuration and set defaults
20
# read configuration and set defaults
21
load_rc_config ${name}
21
load_rc_config ${name}
22
: ${dovecot_enable:="NO"}
22
: ${dovecot_enable:="NO"}
23
: ${dovecot_config:="%%PREFIX%%/etc/${name}.conf"}
23
24
24
command="%%PREFIX%%/sbin/${name}"
25
command="%%PREFIX%%/sbin/${name}"
25
command_args="-c ${dovecot_config:="%%PREFIX%%/etc/${name}.conf"}"
26
required_files="${dovecot_config}"
27
start_precmd="start_precmd"
26
start_precmd="start_precmd"
28
stop_postcmd="stop_postcmd"
27
stop_postcmd="stop_postcmd"
29
extra_commands="restart"
28
restart_cmd="restart_cmd"
30
31
base_dir=$(${command} ${command_args} -a | /usr/bin/awk -F ': ' '/^base_dir:/ { print $2 }')
32
login_dir=$(${command} ${command_args} -a | /usr/bin/awk -F ': ' '/^login_dir:/ { print $2 }')
33
login_user=$(${command} ${command_args} -a | /usr/bin/awk -F ': ' '/^login_user:/ { print $2 }')
34
35
pidfile="${base_dir}/master.pid"
36
29
37
start_precmd()
30
start_precmd()
38
{	# Ensure runtime directories exist with correct permissions
31
{	# Ensure runtime directories exist with correct permissions
39
	local gid
32
	local login_user login_gid
40
	gid=$(/usr/sbin/pw usershow -n "${login_user}" 2>/dev/null | /usr/bin/cut -d: -f4)
33
	login_user=$(${command} ${command_args} -a | /usr/bin/awk -F ': ' '/^login_user:/ { print $2 }')
34
	login_gid=$(/usr/sbin/pw usershow -n "${login_user}" 2>/dev/null | /usr/bin/cut -d: -f4)
41
	/usr/bin/install -o root -g wheel -m 0755 -d ${base_dir}
35
	/usr/bin/install -o root -g wheel -m 0755 -d ${base_dir}
42
	/usr/bin/install -o root -g ${gid} -m 0750 -d ${login_dir}
36
	/usr/bin/install -o root -g ${login_gid} -m 0750 -d ${login_dir}
43
}
37
}
44
38
45
stop_postcmd()
39
stop_postcmd()
46
{	# Cleanup runtime directories
40
{	# Cleanup runtime directories
47
	rm -rf ${base_dir} 2>/dev/null
41
	rm -rf ${login_dir} ${base_dir} 2>/dev/null
42
}
43
44
restart_cmd()
45
{	# Overriding makes rc.subr run this once for each instance
46
	run_rc_command stop
47
	run_rc_command start
48
}
48
}
49
49
50
run_rc_command "$1"
50
# To start multiple instances of dovecot set dovecot_config to
51
# a space seperated list of configuration files.
52
for config in ${dovecot_config}; do
53
	required_files="${config}"
54
	command_args="-c ${config}"
55
	base_dir=$(${command} ${command_args} -a | /usr/bin/awk -F ': ' '/^base_dir:/ { print $2 }')
56
	login_dir=$(${command} ${command_args} -a | /usr/bin/awk -F ': ' '/^login_dir:/ { print $2 }')
57
	pidfile="${base_dir}/master.pid"
58
	run_rc_command "$1"
59
done
(-)dovecot/files/pkg-message.in (-4 / +13 lines)
Lines 1-12 Link Here
1
---------------------------------------------------------------------
1
---------------------------------------------------------------------
2
 
2
 
3
 You can get basic IMAP and POP3 services running by enabling
3
 You can get basic IMAP and POP3 services running by enabling
4
 dovecot in /etc/rc.conf.
4
 dovecot in the /etc/rc.conf file.
5
5
6
 In this basic configuration Dovecot will authenticate users against
6
	dovecot_enable
7
		(bool) If set to ``YES'', run the dovecot command
8
		at boot time.
9
10
 In the basic configuration Dovecot will authenticate users against
7
 the system's passwd file and use the default /var/mail/$USER mbox
11
 the system's passwd file and use the default /var/mail/$USER mbox
8
 files.
12
 files.
9
13
10
  echo dovecot_enable="YES" >> /etc/rc.conf
14
	dovecot_config
11
 
15
		(str) Path to dovecot configuration file(s).
16
		Default %%PREFIX%%/etc/dovecot.conf.
17
18
 To start multiple instances of dovecot set dovecot_config to
19
 a space seperated list of configuration files.
20
12
---------------------------------------------------------------------
21
---------------------------------------------------------------------

Return to bug 129274