Problem with variable root in lookup-domain.pl

The spamassassin is not working. on /var/log/procmail.log it says:

"Failed to run /virtual-server/lookup-domain.pl : No such file or directory at /etc/webmin/virtual-server/lookup-domain.pl line 17"

The problem is the variable $root, is empty. I've fixed it changing the file /etc/webmin/virtual-server/lookup-domain.pl :

chdir("$root/virtual-server"); exec("$root/virtual-server/lookup-domain.pl", @ARGV) || die "Failed to run $root/virtual-server/lookup-domain.pl : $!";

exec("/usr/libexec/webmin/virtual-server/lookup-domain.pl", @ARGV) || die "Failed to run $root/virtual-server/lookup-domain.pl : $!"; chdir("/usr/libexec/webmin/virtual-server");

But is not a good solution, because if virtualmin is updated it will fail again.

Status: 
Closed (fixed)

Comments

Sorry, it seems that the comment character in this forum makes things bigger... what I wanted to say is that I have commented the lines:

chdir("$root/virtual-server"); exec("$root/virtual-server/lookup-domain.pl", @ARGV) || die "Failed to run $root/virtual-server/lookup-domain.pl : $!";

And replaced them for:

chdir("/usr/libexec/webmin/virtual-server"); exec("/usr/libexec/webmin/virtual-server/lookup-domain.pl", @ARGV) || die "Failed to run $root/virtual-server/lookup-domain.pl : $!";

It was a permission problem, I've fixed with:

chmod +r /etc/webmin/miniserv.conf

I hope the permissions won't change when I update virtualmin.

Thank you.

Ok, great ..

Also, make sure that procmail on your system is configured to run as root. Typically Virtualmin sets up postfix to run /usr/bin/procmail-wrapper , which is setuid-root .. and then in turn runs procmail, so that lookup-domain has permissions to read /etc/webmin/miniserv.conf