PDA

View Full Version : Slackware install - Qmail Scanner


Bookworm
05-16-2004, 11:03 PM
I've gone through and done a number of tests with a new installation.

(Expect the QMRAdmin to get some additional information. I now have a fully daemonized ClamAV as well as a daemonized courier-passd setup)

Qmail-scanner-queue issues.

In Slackware, one cannot use suid-perl without completely installing Perl from scratch. Some may call this a problem, I call it a feature. Suid Perl CAN be a big security issue.

To configure qmail-scanner, you'll need the following cofniguration line

./configure --admin postmaster --domain <domain.com> --notify admin --local-domains <domain.com> --sa-delete 0 --skip-setuid-test

The --skip-setuid-test will allow you to continue the compile - otherwise it dies, claiming you can't run at all, instead of needing the wrapper.

The you install the wrapper, remove the taint from the file (the -T option) and chmod 0755 to qmail-scanner-queue.pl.

Edit the QMAILQUEUE line and put in qmail-scanner-queue (not .pl!)

Now comes the tricky part.

setuidgid qscand /var/qmail/bin/qmail-scanner-queue.pl -g (yes, .pl)
setuidgid qscand /var/qmail/bin/qmail-scanner-queue.pl -z (purges the logs of bounces that are parked for more than 30 hours)

Then, be sure to change the ownership of the /var/spool/qmailscan/tmp directory - Mine always seem to end up root:root - I believe it should be qscand:qscand.

Here's some new information - you should (Jason Haar requests/requires it) run the -z option after up@#$%!@#$%!@#$%!@#$%!@#$%!@#$%! your antivirus scanner, and/or your Spam scanner. This means that you should edit your crontab, and 10 minutes or so after up@#$%!@#$%!@#$%!@#$%!@#$%!@#$%! ClamAV, you should run that command.

Then, run the tests - setuidgid qscand /download/qmailrocks/qmail-scanner-1.22/contrib/test_installation.sh

If you _don't_ run the tests setuidgid, it will fail.

Hopefully this will help some people.

BW

upyeronson
06-04-2004, 08:09 PM
Hi!

Great work on explaining Task 14. However, could you explain in which file the following line should be applied.

"Edit the QMAILQUEUE line and put in qmail-scanner-queue (not .pl!) "

I'm guessing it's editing the qmail-scanner-queue.pl file, but wanted to make sure I was doing the correct thing.

Again, great instructions for slackware users who don't have Perl's setuid.

chirpper
06-07-2004, 02:19 PM
Ok, looking at the guide and what you stated here, it seems like we are running this config script/configure line like 4-5 times. Is that true? and if so, what are the differences?

I am using slack 9.1, so of course the setuid is a problem. From there, I get royally lost.

Chirp