Problem with 4.80.7 rpm install. SOLVED

Mark Sapiro mark at msapiro.net
Sun Jun 20 15:55:05 IST 2010


On Thu Jun  3 21:17:44 2010, Mark Sapiro wrote:

>My system is CentOS 5. I was running MailScanner 4.80.4. In my
>configuration I have
>
>Run As User = postfix
>Run As Group = postfix
>
>I downloaded
><http://www.mailscanner.info/files/4/rpm/MailScanner-4.80.7-1.rpm.tar.gz>,
>unpacked it and ran the install.sh script as usual.
>
>MailScanner --lint
>
>ran normally, but when I ran
>
>service MailScanner restartms
>
>children died during initialization with
>
>Jun  3 12:35:56 sbh16 MailScanner[22147]: Cannot create temporary Work
>Dir /var/spool/MailScanner/incoming/22147. Are the permissions and
>ownership of /var/spool/MailScanner/incoming correct?
>
>This would then spawn another child which would die the same way.
>
>It seems the install process (run as root) changed the owner of
>/var/spool/MailScanner/incoming from postfix to root.
>
>chown postfix /var/spool/MailScanner/incoming/
>
>fixed the problem, but the owner shouldn't have been changed in the
>first place.


The same thing occurred when I just upgraded from 4.80.7 to 4.80.9.

This time I was able to determine that the change in ownership occurred
when I ran

  service MailScanner restartms

>From that, I was able to determine that the problem is in
/etc/sysconfig/MailScanner. Line 56 is

RANAS=`$CMD -e "print
MailScanner::Config::QuickPeek('$MSCONF','RunAsUser')"`

and should be

RUNAS=`$CMD -e "print
MailScanner::Config::QuickPeek('$MSCONF','RunAsUser')"`

i.e. it sets RANAS, not RUNAS.

In detail what happens is /etc/init.d/MailScanner sets RUNAS=root and
then sources /etc/sysconfig/MailScanner.

/etc/sysconfig/MailScanner erroneously sets RANAS and then later does

if [ "x$RUNAS" = "x" ]; then
  RUNAS=postfix
fi

but RUNAS was previously set to root by /etc/init.d/MailScanner so it
remains set as root.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the MailScanner mailing list