Cannot create + lock headers file - Debian Sarge

Jim Holland mailscanner at MANGO.ZW
Tue Jan 3 21:14:43 GMT 2006


Hi all

I have just started using Debian for the first time on a new live server
and have installed MailScanner 4.46.2-3 from the unstable distribution on
a server otherwise running Sarge - the latest Debian stable distribution.  
Unfortunately 4.46.2-3 is the latest MailScanner package that is available
from Debian.

It is running with sendmail 8.13.4-3 (Lock Type = posix) and ClamAV
0.87.1-0volatile.3.

I am having a problem that has been repeatedly mentioned in the archives:

	MailScanner[2295]: Cannot create + lock headers file 
	/var/spool/MailScanner/incoming/2295/jBVJNUGm002368.header

Fortunately the error seems to arise only when doing a force-reload
(or the equivalent stop then start) from the init.d/mailscanner script, so
it is not causing any apparent problems in practice, but clearly something
is wrong.

I presume that the problem relates to a failure to kill off the old 
process, but I just cannot see any obvious problem with the init.d script 
or with the location of the lock files.  (It is unfortunately complicated 
somewhat by the use of the terms "mailscanner" and "MailScanner" in 
different places).

It is using the standard init.d script that came with the package.

Related errors that also show up in the messages log are

	 root: Process did not exit cleanly, returned 0 with signal 15

and once in mail.log:

	MailScanner[8448]: ERROR: Can't get absolute pathname of current 
	working directory

Is this a known bug with the Debian package?  I haven't come across it
before when using MailScanner compiled from the tarball under Red Hat 7.2.  
I append the relevant part of the init.d script that I think is the cause
of the problem.  I notice that the "waiting" loop almose always seems to 
iterate up to 10, and that a ps ax shows a left-over MailScanner process.

I have checked the following in MailScanner.conf:

	Lockfile Dir = /var/lock/subsys/MailScanner

Regards

Jim Holland
System Administrator
MANGO - Zimbabwe's non-profit e-mail service

    stop)
        echo -n "Stopping $DESC: "
        start-stop-daemon --stop --quiet \
                --name $NAME --quiet >/dev/null 2>&1
        RETVAL=$?
        if [ $RETVAL -eq 0 ]; then
            rm -f /var/lock/subsys/mailscanner
            touch /var/lock/subsys/MailScanner.off
        fi
        if ps axww | grep -i $DAEMON | grep -qv grep; then
            echo -n "(waiting"
            for i in 1 2 3 4 5 6 7 8 9 10; do
                sleep $i
                if ! ps axww | grep -i $DAEMON | grep -qv grep; then
                    break;
                fi
                echo -n .
            done
            echo -n ") "
        fi
        rm -f /var/run/$NAME/*
        echo "$NAME."
        ;;

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!



More information about the MailScanner mailing list