Koozali.org: home of the SME Server

SME 6.0.1-01 AMAVIS: Couldn't load AMAVIS::AV::CLAMD

Offline Mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
SME 6.0.1-01 AMAVIS: Couldn't load AMAVIS::AV::CLAMD
« on: March 03, 2005, 10:05:03 PM »
This morning I notice that email was not working. Nothing in or out. Amavis log contains the warning "AMAVIS: Couldn't load AMAVIS::AV::CLAMD". Related logs offer a similar alert.

If I disable the anti-virus and spam filter, email again is sent and recieved.

Yesterday I installed postgresql 7.4.2, which I did get working after a bit of personal growth. The install instructions included updating perl to 5.6.1.

Previously I used Greg Swallow's update script to move from 6.0 to 6.0.1. Today I used the updated ClamAV script from Jesper Knudsen at Swerts-Knudsen.dk in hopes of setting things right. This did not resolve the issue.

I saw the thread that sugggested removing the clam rpm's then running J. Knudsen's script. There seemed to be some disagreement as to whether that would work.

I would be very greatful to anyone offering a link or suggestion to help me get the email + filters working again.

TIA
- Mark

Offline si_blakely

  • *
  • 57
  • +0/-0
SME 6.0.1-01 AMAVIS: Couldn't load AMAVIS::AV::CLAMD
« Reply #1 on: March 08, 2005, 11:19:31 PM »
I had this problem too. I think that a Perl module update may have broken something - and I cannot figure out what.

Here is my fix (fwiw)

in AMAVIS.pm there is a loop activating AV modules.
This uses the following construct (about line 284)...
Code: [Select]

  foreach my $av (@av) {
    $av = 'AMAVIS::AV::'.$av;
    writelog($args,LOG_CRIT, __PACKAGE__.": loading $av $VERSION");
    eval "use $av $VERSION;1" or do {
      writelog($args,LOG_CRIT, __PACKAGE__.": Couldn't load $av");
      die __PACKAGE__.": Couldn't load $av";
    };

[/i]
The line
Code: [Select]
eval "use $av $VERSION;1" or do {[/i] appears to be broken for CLAMD.pm.
This is how I patched AMAVIS

Code: [Select]

use AMAVIS::AV::CLAMD $VERSION;1;
  foreach my $av (@av) {
    $av = 'AMAVIS::AV::'.$av;
    writelog($args,LOG_CRIT, __PACKAGE__.": loading $av $VERSION");
    eval "use $av $VERSION;1" or do {
      writelog($args,LOG_CRIT, __PACKAGE__.": Couldn't load $av");
      die __PACKAGE__.": Couldn't load $av";
    };

[/i]

A direct use of AMAVIS::AV::CLAMD fixed the problem for me.
Testing with AMAVIS::AV::CLAM worked fine, so it isn't eval and it isn't CLAMD.pm - it's a weird combination of both. YMMV.

Good Luck
Simon

Offline Mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
Re: SME 6.0.1-01 AMAVIS: Couldn't load AMAVIS::AV::CLAMD
« Reply #2 on: March 08, 2005, 11:39:00 PM »
Thanks, Simon.  :-)

I will review your suggestion, backup everything and give it try.
- Mark

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
SME 6.0.1-01 AMAVIS: Couldn't load AMAVIS::AV::CLAMD
« Reply #3 on: March 14, 2005, 05:13:19 AM »
Thank you very very much. Today I update CPAN to version 1.76, and install other dependant modules too. After this update I have the same error.
Thank you very much

adinobro

I ran into this problem a couple of days ago
« Reply #4 on: March 15, 2005, 01:15:00 AM »
The actual problem is IO::Socket which fails with the -T switch.

Hopefully they'll fix this in a later version. Your solution was much easier than mine.