Hi all!
Just to summarise, my problem appears to be in /usr/libexec/webmin/virtual-server/lookup-domain.pl or in perl itself.
Please, if anyone after reading everything below knows in which direction I should be looking next when trying to figure out the cause of my problem, I would appreciate any suggestions.
The symptoms are:
procmail: Program failure (-25) of “/etc/webmin/virtual-server/lookup-domain.pl” (in /var/log/procmail.log)
which means that no spam and virus filter is run on mail locally delivered by procmail.
For further reference (in the case anyone else has a similar issue), here is a little explanation of how things work, based on my freshman’s understanding (for users knowing well how things work, please skip to the next paragraph):
1.) /etc/webmin/virtual-server/lookup-domain.pl is a standalone spamassassin and clamav wrapper.
Note1: /etc/webmin/virtual-server/lookup-domain.pl parses /etc/webmin/minserv.conf to obtain webmin directory containing perl scripts (further referred to as $root) and then runs $root/virtual-server/lookup-domain.pl (in my case /usr/libexec/webmin/virtual-server/lookup-domain.pl).
Note2: Since on my machine /etc/webmin/minserv.conf is accessible for reading only for root, /etc/webmin/virtual-server/lookup-domain.pl has better be run by root.
2.) a) When email is delivered to postfix, it runs /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME (see postconf -n | grep mailbox_command).
2.) b) /usr/bin/procmail-wrapper runs /usr/bin/procmail and the role of procmail-wrapper in all this is only to assure that procmail is run by root (since it has SUID bit), I guess.
2.) c) /usr/bin/procmail then executes /etc/procmailrc, where /etc/webmin/virtual-server/lookup-domain.pl is used to for extracting <unique_domain_id> of the user, to which the email is being delivered. This <unique_domain_id> is then used to include domain specific procmailrc (stored is /etc/webmin/virtual-server/procmail/) in which spam and virus filter is invoked.
Thus, if /usr/libexec/webmin/virtual-server/lookup-domain.pl doesn’t work => spam and virus filtering doesn’t work either. (Implication going the other way around is not true of course :).
To exclude other possible suspects for the cause of
procmail: Program failure (-25) of “/etc/webmin/virtual-server/lookup-domain.pl” (in /var/log/procmail.log)
I have generated output of lookup-domain.pl for all the domains accepting mail on my server – and btw. the script /etc/webmin/virtual-server/lookup-domain.pl DOES work most of the time when run by me (root from terminal) and DOESN’T work most of the time when run by procmail – and exchanged the original lookup-domain.pl with a simple “if, elsif” script (given user name, returns <unique_domain_id> same as the original lookup-domain.pl). My observation is, that since this exchange there was no “Program failure (-25)” or any other failure concerning lookup-domain.pl detected on my system and already quite some mail has been delivered.
As mentioned in my previous posts, while running /etc/webmin/virtual-server/lookup-domain.pl, I have noticed that most of the time when the script fails, it fails because the environmental variable are not being passed from script to script as scripts are being nested. It always succeeds after system restart or reinstallation of perl (but this might be a coincidence).
My conclusion therefore is, that there is a nasty bug either in /usr/libexec/webmin/virtual-server/lookup-domain.pl or in perl itself (or somewhere even deeper).
My OS is CentOS release 5.5 (Final), my webmin version 1.530, my virtualmin version 3.82.gpl GPL, my perl version is 5.8.8-32.el5_5.2 (for the source repos of all my perl packages see my previous posts). I do have other packages from NON Cent-OS repo (like php and mysql) installed, but there was no upgrade immediately preceding the first occurrence of my problem.
Any suggestions about what could be the cause of my problem would be appreciated!
Thanks a lot!
Best, tomiskou