Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Apr 2003 22:43:35 -0400
From:      H.Wade Minter <minter@lunenburg.org>
To:        freebsd-questions@freebsd.org
Subject:   Upgraded amavisd, mail failing
Message-ID:  <E4B23A1F-696B-11D7-B494-000393C3212A@lunenburg.org>

next in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E4B23A1F-696B-11D7-B494-000393C3212A>