minor problems with qmail-scanner-2.01 install process

John Simpson <[email protected]>
Newsgroups gmane.mail.qmail.scanner
Message-ID <[email protected]>
howdy-

i'm in the process of building a server for a client, and in the  
process i'm updating my own "install scripts" to use qmail-scanner 2.01.

my normal "./configure" line from qmail-scanner 1.25 looks like this:

./configure \
	--spooldir /var/qmail/scan \
	--admin virus \
	--domain ___ \
	--notify recips,admin \
	--log-details syslog \
	--qs-user clamav \
	"$@"

i read through the docs for 2.01 and updated the command to include  
the "--batch" option (thanks jason, this was a really good idea, i  
don't remember ever seeing it before.)

when i ran my script, it barfed because "qmail-scanner-queue.pl -g"  
died with error code 111. qmail-scanner didn't print any kind of  
error message, it looks like it just died with "exit 111" in the code  
or something.

so i tracked it down. it turns out that even though i'm using the "-- 
spooldir /var/qmail/scan" option, the installer still put several  
files in /var/spool/qscan... and did not properly set the permissions  
on the /var/spool/qscan directory, or on the quarantine-events.txt  
and quarantine.log files within the directory, so that the qs-user  
(normally qscand, and in my case clamav) has permissions to read and/ 
or write these files as appropriate. the qs-user should also own the  
directory itself, so that if the quarantine.log file doesn't exist,  
qmail-scanner will be able to create it.

that's a side issue. reading through the docs, i expected that  
because of my "--spooldir" option, that all of these files would be  
present under /var/qmail/scan (which is where i've always installed  
the qmail-scanner stuff, just my personal preference.)

so i tracked THIS down. it turns out that the "configure" script has  
a few options which are not documented- specifically the "--etcdir"  
and "--logdir" options. when i added them to my "./configure" command  
line, everything seems to be working perfectly.

so two things need to be fixed:

- if ETCDIR and/or LOGDIR are not the same as SPOOLDIR, you need to  
properly set the ownership and permissions of the files when "./ 
configure ... --install" creates them.

- the "--etcdir" and "--logidr" options need to be added to the  
output of "./configure --help".

and to clarify for anybody else who reads this and didn't follow the  
changes, this is the command line which is working on the client's  
server:

./configure --batch \
         --spooldir /var/qmail/scan \
         --etcdir /var/qmail/scan \
         --logdir /var/qmail/scan \
         --admin virus \
         --domain ___ \
         --notify recips,admin \
         --scanners clamdscan \
         --log-details syslog \
         --qs-user clamav \
         "$@"

and the last "$@" in there is because my script actually writes this  
command line to a script called "go", which (1) documents the command  
line used to build the software, and (2) makes it easy to run the  
exact same command twice- once as "./go" to test it, and once as "./ 
go --install" to actually install it.

--------------------------------------------------
| John M. Simpson - KG4ZOW - Programmer At Large |
| http://www.jms1.net/           <[email protected]> |
--------------------------------------------------
| Mac OS X proves that it's easier to make UNIX  |
| pretty than it is to make Windows secure.      |
--------------------------------------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Qmail-scanner-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general
PGP.sig (application/pgp-signature, 186 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.