sub newmail { my ($self, $scriptname, $postmaster, @recipients) = @_; my $command = $self->{Mailprog}; $command .= qq{ -f "$postmaster"} if $postmaster; my $pipe; eval { local $SIG{__DIE__}; $pipe = IO::File->new("| $command"); }; if ($@) { die $@ unless $@ =~ /Insecure directory/; delete $ENV{PATH}; $pipe = IO::File->new("| $command"); } die "Can't open mailprog [$command]\n" unless $pipe; $self->{Pipe} = $pipe; $self->output_trace_headers($scriptname); }