Qmailscanner fix

yum -y install sudo
visudo

Add this line:

ALL ALL=(qscand) NOPASSWD: /var/qmail/bin/qmail-scanner-queue.pl

Now, open /var/qmail/bin/qmail-scanner.pl and – at about line 70 – add this:

$ENV{'PATH'}='/bin:/usr/bin';
$whoami = getpwuid($<) || "unknown";
if($whoami ne "qscand") {
    exec("/usr/bin/sudo -u qscand /var/qmail/bin/qmail-scanner-queue.pl") || die;
}