Spam assasin stoped working, error in /etc/webmin/virtial-server/lookup-domain.pl

17 posts / 0 new
Last post
#1 Wed, 09/09/2009 - 01:31
mmoxnes

Spam assasin stoped working, error in /etc/webmin/virtial-server/lookup-domain.pl

hi 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?

Wed, 09/09/2009 - 08:44
andreychek

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

Thu, 09/10/2009 - 04:17 (Reply to #2)
mmoxnes

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

this is the spesific error from procmail.log

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

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....

Thu, 09/10/2009 - 08:40 (Reply to #3)
andreychek

Could you post your /etc/webmin/virtual-server/lookup-domain.pl file?

Thanks,

-Eric

Thu, 09/10/2009 - 11:20 (Reply to #4)
mmoxnes

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 : delete($ENV{'IFS'});

!/usr/bin/perl delete($ENV{'IFS'}); delete($ENV{'CDPATH'}); delete($ENV{'ENV'}); delete($ENV{'BASH_ENV'}); $ENV{'PATH'} = '/bin:/usr/bin'; $< = $>; $( = $);

open(CONF,"/etc/webmin/miniserv.conf"); while() { $root = $1 if (/^root=(.*)/); } close(CONF); $ENV{'WEBMIN_CONFIG'} = "/etc/webmin"; $ENV{'WEBMIN_VAR'} = "/var/webmin"; chdir("$root/virtual-server"); exec("$root/virtual-server/lookup-domain.pl", @ARGV) || die "Failed to run $root/virtual-server/lookup-domain.pl : $!";

Thu, 09/10/2009 - 11:29 (Reply to #5)
andreychek

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...

Thanks!

-Eric

Thu, 09/10/2009 - 21:13 (Reply to #6)
mmoxnes

hi 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/lookup-domain.pl

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/lookup-domain.pl: line 2: syntax error near unexpected token $ENV{'IFS'}' 'etc/webmin/virtual-server/lookup-domain.pl: line 2:delete($ENV{'IFS'}); procmail: Program failure (2) of "/etc/webmin/virtual-server/lookup-domain.pl"

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

Thu, 09/10/2009 - 21:24 (Reply to #7)
andreychek

Aha!

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/lookup-domain.pl

Fri, 09/11/2009 - 02:42 (Reply to #8)
mmoxnes

hi thanks, solded that erroe but now I get

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

Fri, 09/11/2009 - 09:59 (Reply to #9)
andreychek

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/main.cf

Fri, 09/11/2009 - 10:36 (Reply to #10)
mmoxnes

mailbox_command=/usr/bin/procmail

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.

Fri, 09/11/2009 - 12:37 (Reply to #11)
andreychek

Do you have the procmail-wrapper program installed?

It's generally located here:

/usr/bin/procmail-wrapper

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

Fri, 09/11/2009 - 13:08 (Reply to #12)
mmoxnes

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?

Fri, 09/11/2009 - 14:03 (Reply to #13)
andreychek

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 :-)

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

http://www.virtualmin.com/os-support

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

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:

http://software.virtualmin.com/gpl/centos/5.3/SRPMS/procmail-wrapper-1.0...

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

-Eric

Mon, 10/26/2009 - 04:49 (Reply to #14)
raytracy

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 root@raytracy.com  Mon Oct 26 17:34:01 2009
Subject: [SPAM**(1002.5)] test
  Folder: /dev/null                                                        1913
Time:1256549646 From:root@raytracy.com To:test@mayanet.com.tw User:test-mayanet.
com.tw 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?

Mon, 10/26/2009 - 10:31 (Reply to #15)
andreychek

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".

Mon, 01/11/2010 - 08:32
Artoftheworld

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

Topic locked