Re: No newline at end of messages?

"John R Levine" <[email protected]>
Newsgroups gmane.mail.majordomo.majordomo2.devel
Message-ID <[email protected]>
> JRL> Squinting at the input, it appears that the section it's using is
> JRL> missing a newline that is supposed to be at the end.
>
> It is common to forget that the newline that appears before the
> closing boundary is part of the boundary, not part of the message.
> This permits different encodings for a single line of text.
>
> I'll have to dig in and see if we're missing a newline or something we
> shouldn't be.

The missing newline is (well, isn't) in the input message.

Unfortunately, the message was composed by the Apple mail client, so we
can expect to see a whole lot of mail sent by this buggy software.

As a band-aid, I added a line at line 136 of MailOut.pm in mail_entity to
force a newline at the end of the message, so it is at least transportable
through SMTP even if it's not perfectly formed.  I think this is benign,
the worst it'll do is add an extra newline to messages that already have
them at the end.  It'd be better to check to see if the newline is already
present, but I'm not eager to go mucking about in the MIME libraries.

  $entity->print($fh);
  print $fh "\n";		# ensure last line JRL
  close ($fh)


Regards,
John Levine, [email protected], Primary Perpetrator of "The Internet for Dummies",
Information Superhighwayman wanna-be, http://www.johnlevine.com, Mayor
"A book is a sneeze." - E.B. White, on the writing of Charlotte's Web
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.