Perl problems on FreeBSD (again)

Johan Hendriks Johan at
Wed Oct 21 15:11:07 IST 2009

>Mog wrote:
>> Hi all,
>> I upgraded MailScanner last night along with a number of other ports,

>> which unfortunately included a micro update to Perl. On FreeBSD it
>> from perl-5.10.0 to perl-5.10.1, and judging by the error messages in

>> the maillog, it seems that the old taint mode problem has resurfaced:
>> Could not use Custom Function code 

>> it could not be "require"d. Make sure the last line is "1;" and the 
>> module is correct with perl -wc (Error: Insecure dependency in
>> while running with -T switch at 
>> /usr/local/lib/MailScanner/MailScanner/ line 754.
>> I'm seeing this same error message being shown for these files as
>>, and
>>  From what I understand, FreeBSD runs perl programs with the -T
>> (taint mode), which is basically some additional security check. If
>> reading this right, the additional security check (for some reason) 
>> seems to have a problem with 'eval { require $fullfile; };', the code

>> used to require the CustomFunction modules MailScanner uses:
>>    $fullfile = "$dir/$filename";
>>    next unless -f $fullfile and -s $fullfile;
>>    eval { require $fullfile; };
>>    if ($@) {
>>      MailScanner::Log::WarnLog("Could not use Custom Function code
%s, " .
>>                                "it could not be \"require\"d. Make
sure " .
>>                                "the last line is \"1;\" and the
module " .
>>                                "is correct with perl -wc (Error:
>>                                $fullfile, $@);
>>    }
>> Does this makes sense to anyone? Naturally I've reported this problem
>> the FreeBSD people as well to see if they can help work out what is 
>> going on.
>> Regards,
>> mog

>What process did you use to upgrade MailScanner/Perl? If you used 
>portupgrade, please give the command line you used.

I have the same issue, I did the normal portupgrade perl.
And did run the perl-after-upgrade
After that did not work I did a rebuild of perl with -rf portupgrade -rf
perl, this way all ports relying on perl are rebuild.
And that did also not work.
So I grabbed another server, installed FreeBSD 8.0RC1 upgraded the ports
tree, installed MailScanner, and got the same error.
It is the same error I got with perl 5.8.9, and with perl 5.8.8 I had no
problems also.
Now perl5.10.0_4 and 5.8.8 has no problems, but 5.10.1 and 5.8.9  has,
anyway on my systems (AMD64 and i386)

No virus found in this outgoing message.
Checked by AVG - 
Version: 8.5.423 / Virus Database: 270.14.24/2449 - Release Date:
10/20/09 18:42:00

More information about the MailScanner mailing list