Matt Sergeant <[EMAIL PROTECTED]> wrote:

> Is there any chance your Mail::Header module is out of date or
> broken?

I've got 1.60, which is the current version, and it has the 
problem.  Try this, which creates the header object as it's 
created in Qpsmtpd::SMTP.pm:

====================
use Mail::Header;

print "Version: $Mail::Header::VERSION\n\n";

my $buffer = <<'EOT';
To: Herbert West
 <[EMAIL PROTECTED]>
X-Testing: This is a test. This is only a test.
EOT
$buffer .= join '', ( ' abcd' x 10 . "\n" ) x 10;
my $header = Mail::Header->new(
   Modify => 0,
   MailFrom => "COERCE"
);
my @headers = split /\n/, $buffer;
$header->extract([EMAIL PROTECTED]);
$header->print;

print "\n", $header->get('To');
====================

Both headers get unfolded.  Is extract() expecting the newlines 
to be left on the array elements?  Leaving them on (by 
splitting on /^/m instead of /\n/) seems to solve the munging 
problem.  Unfortunately it means that get() returns the folded 
value, which is not what we want for most purposes.

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Washington, DC

Reply via email to