Release
 
FreeBSD SUIDPERL error solution

So you've installed qmail-scanner on your FreeBSD box, along with the latest version of Perl, ClamAV and Spamassassin. But when you run the test_installation script at /downloads/qmailrocks.org/qmail-scanner-x.xx/contrib/test_installation -doit, you get this nasty error:

Sending eicar test virus - should be caught by perlscanner module...
qmail-inject: fatal: qq temporary problem (#4.3.0)
Bad error. qmail-inject died

What the hell is wrong???

This error is caused by a misconfigured Perl installation. FreeBSD usually installs with a default installation of Perl that is not the most current version. Since the newer version of Spamassassin requires the latest version of Perl, you wisely went and installed Perl 5.8 from the FreeBSD ports collection. After installing the new Perl from the ports collection, you activated it with the command "use.perl port". But you're getting this darn error when you run the test script.

Well, the reason you are getting that error is because the port installed version of Perl 5.8 does not have SUIDPERL enabled. Therefore, a setuidgid call to qmail-scanner fails. The solution is to re-install Perl with SUIDPERL enabled. This is relatively simple, so just follow the directions below and you "should" be fine...

First, let's uninstall the current port version of Perl 5.8...

If you installed Perl 5.8 using the pkg_add tool, you can uninstall it like this:

pkg_delete -f perl5.8

If you installed Perl 5.8 from the ports collection, you can uninstall it like so:

cd /usr/ports/lang/perl5.8

make deinstall

Now, let's enable SUIDPERL in the server's make.conf file

vi /etc/make.conf

add the following line:

ENABLE_SUIDPERL=true

Save and exit from the file.

Now let's reinstall perl from the ports collection with SUIDPERL enabled...

cd /usr/ports/lang/perl5.8

make -DENABLE_SUIDPERL"TRUE" install clean

(This will take several minutes, at least, so go get a snack)

Ok, after the new Perl5.8 is installed, lets make sure the system is set up to use the port installed version of Perl...

use.perl port

Ok, now let's make sure that qmail-scanner and qmail-smtpd are properly configured to handle the setuidgid functionality...

cd /var/qmail/bin

chmod 4755 qmail-scanner-queue.pl

chown qscand:qscand qmail-scanner-queue.pl

vi qmail-scanner-queue.pl

make sure that the very first line of the file reads:

#!/usr/bin/perl -T

save and exit the file.

vi /var/qmail/supervise/qmail-smtpd/run

make sure that the following line exists:

QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" export QMAILQUEUE

Note: Make extra sure that the line includes the .pl extension on the end of the qmail-scanner-queue call.

Save and exit the file.

Now let's restart qmail for good measure...

qmailctl restart

And now let's try the test_installation script again...

/downloads/qmailrocks/qmail-scanner-1.24/contrib/test_installation -doit

If all has gone well, you should get a response like this:

Sending standard test message - no viruses...
done!

Sending eicar test virus - should be caught by perlscanner module...
done!

Sending eicar test virus with altered filename - should only be caught by commercial anti-virus modules (if you have any)...

Sending bad spam message for anti-spam testing - In case you are using SpamAssassin...
Done!

Finished test. Now go and check Email for someone@yourdomain.com (the address shown here will vary)

If you still get the qq temporary problem error, go back and make sure you have followed these directions carefully. Also, check the "softlimit" setting in the qmail-smtpd/run script (mentioned above) is set to at least 40000000

Return to guide

 


 

Color Coded Qmail Installation Key
 
Regular Black Text 
 Qmail installation notes and summaries by the author. Me talking.
 
Bold Black Text 
 Commands to be run by you, the installer.
 
Bold Maroon Text 
 Special notes for Redhat 9 users.
 
Bold Red Text 
 Vital and/or critical information.
 
Regular/Bold Purple text 
 Denotes helpful tips and hints or hyperlinks.
 
Regular Orange Text 
 Command line output.
Cp

Regular green text 

 Denotes the contents of a file or script.
home | about | the installation | utilities | faq | contact | journal | mailing list | list archive | forum | links | donatemerchandise
modified
This mirror last modified: Thursday, August 9th, 2012 15:59:45 CEST
 
The Rocks Project