[clamav-users] File::Scan::ClamAV

Anthony DIckinson crap at the-tiddler.co.uk
Tue Jul 22 08:53:38 EDT 2014


On 22/07/14 03:47, Chris wrote:
> On Sun, 2014-07-20 at 12:52 -0400, Scott Kitterman wrote:
>> On Sunday, July 20, 2014 07:27:25 Chris wrote:
>>> On Sun, 2014-07-20 at 13:32 +0200, Matus UHLAR - fantomas wrote:
>>>> On 19.07.14 21:38, Chris wrote:
>>>>> Finally I'm about finished with setting up my Ubuntu 14.04 system and
>>>>> getting everything setup the way it was in the old Mandriva system. I
>>>>> have both SA and ClamAV running now but I'm missing a module,
>>>>> File::Scan::ClamAV to interface with SA. Have tried multiple times to
>>>>> install via CPAN, I'm posted the output at pastebin -
>>>>> http://pastebin.com/bdurgL6X
>>>>>
>>>>> Any ideas anyone? ClamAV has been installed via the Ubuntu software
>>>>> installer if it makes a difference.
>>>> why not using ClamAV with your MTA directly?
>>> Good morning Matus, I have postfix installed and running, however, the
>>> only mail that goes through it are the outputs of cronjobs sent to me
>>> and the forwarding of spam to the address spam at uce.gov . That is
>>> probably overkill but I installed it so long ago on the old machine that
>>> it was just 2nd nature to install it again. The mail from my ISP comes
>>> in via Fetchmail > Procmail and is run through SA prior to getting
>>> tossed to my inbox.
>> I use clamsmtp (also from the Ubuntu package archive) with postfix, but I
>> suspect you could configure it as a transparent proxy between fetchmail and
>> procmail.  Then the virus scanning would be handled further upstream.
>>
>> Scott K
> I looked at this Scott but I don't think I'm techno-savy enough to try
> it. Any other ideas on how to install this module? After looking at the
> 't' folder in the source pkg and the errors it looks like it's looking
> for something it can't find but then again I'm not a perl programmer so
> I can't be positive.
>
> Thanks
> Chris
>

Chris,

Looks like the tests for this module are out of date or not 100% 
accurate. You can get the tests to complete by fudging.... Warning: Hack 
alert!!!


#step 1
sudo cpan
install File::Scan::ClamAV
(this will fail)
look File::Scan::ClamAV
(this puts you in the build directory for this module within cpan) e.g.:

cpan[2]> look File::Scan::ClamAV
Running look for module 'File::Scan::ClamAV'

Trying to open a subshell in the build directory...
Working directory is /root/.cpan/build/File-Scan-ClamAV-1.91-O_dSGE
xxxx at xxxx:.cpan/build/File-Scan-ClamAV-1.91-O_dSGE#

#step 2
cd t
(go into the test directory)
(in mkconf.pl change):
my $dir = cwd;
to
my $dir = '/tmp/;

#step 3
In  01ping.t, 02reload.t, 03quit.t, 04scan.t and 05streamscan.t files:
1) change all references to 'clamsock' to '/tmp/clamsock' (should be 3 
places in each file: in the loop, during File::Scan::ClamAV 
instantiation and unlink)
2) change the for loop count from 10 to 60 (as clamd takes a while to 
load) so,
for (1..10)
to
for (1..60)

#step 4
cd ..
(back to the root build dir)

# step 5
(run make test to run the test suite) e.g.:

xxxx at xxxx:.cpan/build/File-Scan-ClamAV-1.91-O_dSGE# make test
PERL_DL_NONLAZY=1 CLAMD_PATH=/usr/sbin /usr/bin/perl 
"-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 
'                                            blib/arch')" t/*.t
t/00basic.t ....... ok
t/01ping.t ........ ok
t/02reload.t ...... ok
t/03quit.t ........ ok
t/04scan.t ........ ok
t/05streamscan.t .. ok
t/pod-coverage.t .. skipped: Test::Pod::Coverage 1.00 required for 
testing POD coverage
t/pod.t ........... skipped: Test::Pod 1.00 required for testing POD
All tests successful.
Files=8, Tests=27, 187 wallclock secs ( 0.09 usr  0.04 sys + 174.55 
cusr  4.58 csys = 179.26 CPU)
Result: PASS
xxxx at xxxx:.cpan/build/File-Scan-ClamAV-1.91-O_dSGE#

# step 6
(run make install to install the modules)
make install

# step 7
exit
quit

Hope this helps,

Ant



More information about the clamav-users mailing list