Hi,

I recently upgraded perl from 5.6.0 to perl-5.10.0, along with all the
modules necessary for sa-3.2.5 and amavisd-new (an old version still).
I'm now having a problem that I really don't understand:

Jul 30 14:24:30 bigship amavis[1757]: (01757-175) TROUBLE in
check_mail: decoding2-get-file-types FAILED: 'file' utility
(/usr/bin/file) failed, status=1 (256 ) at /usr/sbin/amavisd line
4019.

Jul 30 14:24:30 bigship amavis[1757]: (01757-175) PRESERVING EVIDENCE
in /var/amavis/amavis-20090730T142430-01757

The amavisd children are running as a regular user. When I su to that
user and run "/usr/bin/file" with the files listed above, it
successfully returns the correct type of file. The lines in amavisd
surrounding 4019 are:

    $file ne '' or die "Unix utility file(1) not available, but is needed";
    for my $part (@$partslist) {
        my($filename) = "$tempdir/parts/$part";
        my($filetype) = '';
        my($proc_fh) = run_command(undef, undef, $file, $filename);
        while( defined($_ = $proc_fh->getline) ) { $filetype .= $_ }
        my($err); $proc_fh->close or $err=$!; my($ret) = retcode($?);
     <===== 4019
        $ret==0 or die "'file' utility ($file) failed, status=$ret ($? $err)";

        chomp($filetype); my($taint) = substr($filetype,0,0);
        # remove file name
        $filetype = $1.$taint  if $filetype=~/^.+?:[\t ](.*)$(?!\n)/s;
        section_time('get-file-type');
        local($_) = $filetype;  my($ty);

        # try to classify some common types and give them short type name
        # _last_ match wins!

Running spamassassin --lint returns no errors or warnings. Amavis
complains that I'm missing a few modules, like SPF, DKIM, and
IO::Socket::SSL, but I don't think they're related, and I guess they
weren't on there before when it was working fine.

Thanks,
Alex

Reply via email to