The attached patch deals with several problems I've found with amavisd on
SuSE 9.0 Linux and FreeBSD 4.8.
Basically it runs everthing under amavisd as %{l_rusr} which (a) eliminates
a starup problem with Net::Server on FreeBSD where it can't change user id
to %{l_rusr}, and (b) fixes a problem with log rotation where the log files
are owned by root so amavisd can't restart.
I can't think of any reason why amavisd needs to start as root given that
it's opening high ports which don't require root access.
Bill
--
INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Systems, Inc.
UUCP: camco!bill PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/
``Mechanical Engineers build weapons. Civil Engineers build targets.''
--- rc.amavisd.orig 2004-04-26 16:56:12.000000000 -0700
+++ rc.amavisd 2004-04-29 09:17:51.000000000 -0700
@@ -19,7 +19,7 @@
[ -f $amavisd_pidfile ] && kill -$1 `cat $amavisd_pidfile`
}
-%status -u @l_susr@ -o
+%status -u @l_rusr@ -o
amavisd_usable="unknown"
amavisd_active="no"
rcService amavisd enable yes && \
@@ -28,30 +28,30 @@
echo "amavisd_usable=\"$amavisd_usable\""
echo "amavisd_active=\"$amavisd_active\""
-%start -u @l_susr@
+%start -u @l_rusr@
rcService amavisd enable yes || exit 0
rcService amavisd active yes && exit 0
@l_prefix@/sbin/amavisd -c $amavisd_cfgfile
-%stop -u @l_susr@
+%stop -u @l_rusr@
rcService amavisd enable yes || exit 0
rcService amavisd active no && exit 0
@l_prefix@/sbin/amavisd -c $amavisd_cfgfile stop
-%restart -u @l_susr@
+%restart -u @l_rusr@
rcService amavisd enable yes || exit 0
rcService amavisd active no && exit 0
rc amavisd stop
sleep 2
rc amavisd start
-%daily -u @l_susr@
+%daily -u @l_rusr@
rcService amavisd enable yes || exit 0
# rotate summary logfile
shtool rotate -f \
-n ${amavisd_log_numfiles} -s 0 \
- -z ${amavisd_log_complevel} -m 640 -o @l_susr@ -g @l_rgrp@ \
+ -z ${amavisd_log_complevel} -m 640 \
@l_prefix@/var/amavisd/amavisd.sum
# generate summary logfile
@@ -66,7 +66,7 @@
# rotate logfile
shtool rotate -f \
-n ${amavisd_log_numfiles} -s ${amavisd_log_minsize} -d \
- -z ${amavisd_log_complevel} -m 640 -o @l_susr@ -g @l_rgrp@ \
+ -z ${amavisd_log_complevel} -m 640 \
-P "${amavisd_log_prolog}" \
-E "${amavisd_log_epilog} && rc amavisd restart" \
@l_prefix@/var/amavisd/amavisd.log