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

Collapse All | Expand All

(-)mailscanner/Makefile (+1 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	MailScanner
8
PORTNAME=	MailScanner
9
PORTVERSION=	4.79.4
9
PORTVERSION=	4.79.4
10
PORTREVISION=	1
10
CATEGORIES=	mail
11
CATEGORIES=	mail
11
MASTER_SITES=	http://www.mailscanner.info/files/4/tar/
12
MASTER_SITES=	http://www.mailscanner.info/files/4/tar/
12
DISTNAME=	${PORTNAME}-install-${PORTVERSION}-${PATCHLEVEL}
13
DISTNAME=	${PORTNAME}-install-${PORTVERSION}-${PATCHLEVEL}
(-)mailscanner/files/mailscanner.in (-7 / +13 lines)
Lines 10-15 Link Here
10
#                                 Set it to "YES" to enable mailscanner
10
#                                 Set it to "YES" to enable mailscanner
11
# mailscanner_configfile (path):  Set to "%%PREFIX%%/etc/MailScanner/MailScanner.conf" by default.
11
# mailscanner_configfile (path):  Set to "%%PREFIX%%/etc/MailScanner/MailScanner.conf" by default.
12
# mailscanner_pidfile (path):     Set to "/var/run/MailScanner.pid" by default.
12
# mailscanner_pidfile (path):     Set to "/var/run/MailScanner.pid" by default.
13
# mailscanner_user (str):         Set to "root" by default. If you changed the "Run As User" variable in MailScanner.conf you MUST also set the same value here.
13
#
14
#
14
15
15
. %%RC_SUBR%%
16
. %%RC_SUBR%%
Lines 22-43 Link Here
22
: ${mailscanner_enable="NO"}
23
: ${mailscanner_enable="NO"}
23
: ${mailscanner_configfile="%%PREFIX%%/etc/MailScanner/MailScanner.conf"}
24
: ${mailscanner_configfile="%%PREFIX%%/etc/MailScanner/MailScanner.conf"}
24
: ${mailscanner_pidfile="/var/run/MailScanner.pid"}
25
: ${mailscanner_pidfile="/var/run/MailScanner.pid"}
26
: ${mailscanner_user="root"}
25
27
26
command="%%PREFIX%%/sbin/mailscanner"
28
command="%%PREFIX%%/sbin/mailscanner"
27
pidfile=${mailscanner_pidfile}
29
pidfile=${mailscanner_pidfile}
28
command_args="${mailscanner_configfile}"
30
command_args="${mailscanner_configfile}"
31
procname="MailScanner"
29
32
30
required_files="${mailscanner_configfile}"
33
required_files="${mailscanner_configfile}"
31
34
32
_ms_start_precmd() {
35
start_precmd=pid_touch
33
	# Quietly try to raise the open_files limit
36
start_cmd="mailscanner_start"
34
	#
35
	ulimit -n 2000 >/dev/null 2>&1
36
}
37
37
38
start_precmd=_ms_start_precmd
38
pid_touch ()
39
{
40
	touch $mailscanner_pidfile
41
	chown $mailscanner_user $mailscanner_pidfile
42
}
39
43
40
procname="MailScanner"
44
mailscanner_start() {
45
	su -m ${mailscanner_user} -c "exec ${command} ${command_args}"
46
}
41
47
42
run_rc_command "$1"
48
run_rc_command "$1"
43
49
(-)mailscanner/files/pkg-message.in (-2 / +13 lines)
Lines 38-44 Link Here
38
	Sophos users: Please take a look at the Sophos install
38
	Sophos users: Please take a look at the Sophos install
39
	script %%PREFIX%%/share/doc/MailScanner/Sophos.install.freebsd
39
	script %%PREFIX%%/share/doc/MailScanner/Sophos.install.freebsd
40
40
41
	Please also always look at the port changelog at
41
	*****************************************************************
42
	%%PREFIX%%/share/doc/MailScanner/CHANGES.port
42
	A new rc variable called mailscanner_user has been added to the
43
	startup script. This is a temporary workaround to address the
44
	numerous taint mode problems that are still present in the code.
45
46
	If you changed the "Run As User" variable in MailScanner.conf
47
	you MUST also set the same value in /etc/rc.conf.
48
49
	i.e. mailscanner_user="postfix"
50
51
	The new variable uses su to start the master perl script as the
52
	specified user, this effectively disables perl's taint mode.
53
	*****************************************************************
43
54
44
*************************************************************************
55
*************************************************************************

Return to bug 142382