Spam assasin stoped working, error in /etc/webmin/virtial-server/

have a strange error regarding spamassassin and procmail.

regarding this it started a while a go I noticed that not al rules not prosessed.

so no I see in /var/log/procmail.log a error prosessing any commands in this file (error (2)

Im running a open suse 11.1 server with latest version og virtualmin GPL, but the problem has been there a while…

how should this file look like?

Is the lookup daemon running on your server?

Try running this:

/etc/init.d/lookup-domain restart

Also, it’s complaining about SpamAssassin not working, so you may want to make sure SpamAssassin is installed and working.

If you have Virtualmin setup to use the SpamAssassin daemon, make sure spamd is running:

/etc/init.d/spamassassin restart

as I could see spamassasin is running (the spamd, not spamassasin)

this is the spesific error from procmail.log

/etc/webmin/virtual-server/ line 9: syntax error near unexpected token CONF,"/etc/webmin/miniserv.conf"' /etc/webmin/virtual-server/ line 9: open(CONF,"/etc/webmin/min’serv.conf");
procmail: Program failure (2) of “/etc/webmin/virtual-server/”

did more testing and found out if I make a own rule for mine account it’s prosessed, but domain level is still not working…

Could you post your /etc/webmin/virtual-server/ file?



here is my file, I have tried to comment out some of the comands, but only moves the error one more line down…

in the beginning it stopped at line2 :

#$ENV{‘PATH’} = ‘/bin:/usr/bin’;
#$< = $>;
#$( = $);
while() {
$root = $1 if (/^root=(.*)/);
$ENV{‘WEBMIN_CONFIG’} = “/etc/webmin”;
$ENV{‘WEBMIN_VAR’} = “/var/webmin”;
exec("$root/virtual-server/", @ARGV) || die “Failed to run $root/virtual-server/ : $!”;

Yeah, what you have there checks out just fine (running perl -c on your code).

Can you attach that file to this thread, so we can download it as-is? Perhaps somehow it got corrupted, and there’s something about it that isn’t showing up in a simple cut-and-paste…



here is the file (made a copy/paste into windows notepad) so you need to strip off the txt)

when I did "perl -c /etc/webmin/virtual-server/

it gives syntax OK

so it seems like the file is ok…

I have put the file back to original state (removed a couple of # to comment out lines that gave error in procmail log) so it seems like procmail have a problem prosessing this file…
can it be that I’m missing som software on my server…

but in procmail.log it say:

/etc/webmin/virtual-server/ line 2: syntax error near unexpected token $ENV{'IFS'}' 'etc/webmin/virtual-server/ line 2: delete($ENV{‘IFS’});
procmail: Program failure (2) of “/etc/webmin/virtual-server/”

the strange thing is that the rules I defined in usermin for my user works fine, all mail with spamscor above 10 is deleted, classified as spam goes into my spam folder…

but the domainlevel rules are not prosessed


That file looks like it has DOS-style line endings – which could occur if it were at some point edited with a Windows text editor.

That could cause the trouble you’re seeing – to fix it, try running this:

perl -pi -e ‘s/\r\n/\n/’ /etc/webmin/virtual-server/

thanks, solded that erroe but now I get

Insecure dependency in exec while running with -T switch at /etc/webmin/virtual-server/ line 17.
procmail: Program failure (255) of “/etc/webmin/virtual-server/”
procmail: Extraneous copy-flag ignored

Out of curiosity, had this worked in the past? And if so, do you know what changed between then and now?

While the above error is rare, it’s more likely that it would occur from the beginning…

However, what does this command show:

grep mailbox_command /etc/postfix/


has -rwsr-sr-x 1 root:root

this was working when the server was newly installed… ( I think)

I have upgraded webmin, usermin and virtualmin, also applied the fixes provided by opensuse repository.

there is a tread about this under usermin about this error, but it stops at about this spot (found it a little while ago)

I also found that antivirus scanning is not working either, at domain level, but I can make it work on userlevel…

same as for spam prevention, rules made at userlevel is working, but not at domain level.

Do you have the procmail-wrapper program installed?

It’s generally located here:


To fix your issue, I suspect you’ll need to use that. Once it’s installed, you can enable it in Postfix using this in place of your current mailbox_command:

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

Hi, checked the packages for Suse 11.1 didn’t find any procmail.wrapper…

unless the package has a strange name? or is it a perl package? installed from cpan?

It sounds like you may be running into some limitations of what can be made to work easily with the GPL version of Virtualmin on Suse :slight_smile:

Suse isn’t listed as supported by Virtualmin GPL, and version 10.1 is only Grade C for the Pro version:

That said, it can probably be made to work, but I’m not sure what steps to tell you to take, exactly :slight_smile:

The procmail-wrapper program is a program provided by Virtualmin, to allow procmail to interact with the various tools in use here, without running into the problems you’re seeing.

One option you have is to grab the procmail-wrapper source RPM, and compile it for your distro:

It’s also possible that one of the binary RPM’s for CentOS will install cleanly for you, you could give those a shot.


Dear andreychek:

I have similar problem and solved when I installed procmail-wrapper rpm (in Centos 5.3). But there is another problem: the spam mail seems did not deliver to spam folder.

Here is my /var/log/procmail.log:

From Mon Oct 26 17:34:01 2009 Subject: [SPAM**(1002.5)] test Folder: /dev/null 1913 Time:1256549646 User:test-mayanet. Size:1913 Dest:/dev/null Mode:Spam

It looks like delivered into /dev/null, how can I change it?

=============== Update:

OK, I found the key point may be inside /etc/webmin/virtual-server/procmail, it due to the destination of "* ^X-Spam-Level: " pointed to /dev/null.

I would rephrase my question to: how do I change the “* ^X-Spam-Level:” setting in each domain level spam config?

I would rephrase my question to: how do I change the “* ^X-Spam-Level:” setting in each domain level spam config?

You can set that in Server Configuration -> Spam and Virus Delivery -> “Delete spam if score is above”.

Solved this issue, had the exact same error and after some updates to Virtualmin + Webmin… took me 3 days but found the answer:

Only some of my users under one virtual domain where not getting their incoming mail scanned by Spamassassin… found the answer by logging into to each effected users home folder and deleting the .forward file, the content of which contained /usr/bin/procmail instead of going via the wrapper, which in turn by passed the spamc initiation for each message…

Hope this helps x

1 Like