Upgraded amavisd, mail failing

H.Wade Minter minter at lunenburg.org
Mon Apr 7 19:43:37 PDT 2003


I ran a portupgrade on my postfix-based mail system tonight, and it 
upgraded p5-Mail-SpamAssassin and amavisd-new.  So far so good.  I 
restarted the daemons, restarted the queue, and all of the incoming 
mail started getting held with the following error:

Apr  7 22:37:12 mail postfix/lmtp[62440]: D8C44280: 
to=<minter at example.com>, relay=127.0.0.1[127.0.0.1], delay=1566, 
status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in 
processing, id=62383-01-3, decoding FAILED: Insecure $ENV{PATH} while 
running with -T switch at /usr/local/sbin/amavisd line 3082. (in reply 
to end of DATA command))


Line 3082 from amavisd is:

# call 'file' utility for each part,
# and associate (save) full and short types with each part
#
sub determine_file_types($$$) {
     my($partslist,$tempdir,$file_generator_object) = @_;

     for my $part (@$partslist) {
         my($filename) = "$tempdir/parts/$part";
==>        my($filetype) = qx($file -b $filename 2>/dev/null);
         my($ret) = retcode($?);
         $ret==0 or die "'file' utility ($file) failed, status=$ret";
         chomp($filetype);
         section_time('get-file-type');

         local($_) = $filetype;  my($ty);

         # try to classify some common types and give them short type 
name


Line 5140 in amavisd has:

# Set path, home and term explictly.  Don't trust environment
==> $ENV{PATH} = $path          if $path ne '';
$ENV{HOME} = $helpers_home  if $helpers_home ne '';
$ENV{TERM} = 'dumb';

And amavisd.conf has:

$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';


This is a stock install from ports, nothing funny going on.  Does 
anyone have any ideas on what might be broken?

--Wade



More information about the freebsd-questions mailing list