[BUGS] Why is my mail being horribly newlined?

Greg 'groggy' Lehey grog at FreeBSD.org
Fri Dec 14 17:45:56 EST 2007


On Friday, 14 December 2007 at  6:49:38 +1100, Callum Gibson wrote:
> On 14 Dec 06:29, Jerahmy Pocott wrote:
>> Yes, I put my own end of lines after those words. My thoughts are that
>> it's either the text encoding used (apple likes UTF-8) or the newline
>> character, traditionally Macs used <CR> though I'm fairly sure the
>> default is now the unix <LF>, unless it's trying to be windows friendly
>> and placing <CR>/<LF>..

Well, in fact there are Internet standards.  This one would be RFC
2822 (http://rfc.net/rfc2822.html), which mandates a \r\n at the end
of each line.

> And yet sometimes it comes throught ok like this mail.
>
>> I don't believe the mail client enforces any wrapping..

It looks very much like it does.

>> I thought maybe it was the mail server doing it..
>
> What you think we're running MS Exchange or something? ;-) It's more likely
> to be the mailing list software than the mail server itself, which really
> shouldn't be touching the contents of messages (not that it stopped Lotus
> Notes, a well know abuser of many email standards).
>
> Yet, if you look at my final paragraph, it didn't wrap and it was fairly long.
> Easy way to test it is for someone else to type a really long line and see what happens like this. grog will hate me now.

Nope, there are exceptions to everything.  This is a good proof that
the mailing list software is not imposing length limits.

On Friday, 14 December 2007 at  6:56:38 +1100, Jerahmy Pocott wrote:
>
> On 14/12/2007, at 6:49 AM, Callum Gibson wrote:
>
>> What you think we're running MS Exchange or something? ;-) It's
>> more likely
>> to be the mailing list software than the mail server itself, which
>> really
>> shouldn't be touching the contents of messages (not that it stopped
>> Lotus
>> Notes, a well know abuser of many email standards).

On the other hand, *something* has mutilated this text now.  Given
that it wasn't the mailing list software (see above; I'm quite
confident that it won't look any different to most people, though it
might to you).  To be sure, the following paragraph was on 2 lines,
but coming back from you it's on 4.

>> Yet, if you look at my final paragraph, it didn't wrap and it was
>> fairly long.
>> Easy way to test it is for someone else to type a really long line
>> and see what happens like this. grog will hate me now.
>
> But when I CC'd the message to myself it came through looking fine,
> only when it was received from the list did it get all chopped up..
>
> Yet if I don't put any new lines in myself, it comes back all nicely
> formatted to around 80 chars!

Toy MUA syndrome.  It's reformatting the messages for you.

> I noticed in the headers of my sent mail it has: text/plain;
> charset=US-ASCII; delsp=yes; format=flowed

That should be format=flawed :-)

This is probably the issue.  My understanding of format=flawed is that
"soft" line breaks are included at the end of the line by terminating
them with the characters '= '.  These characters should then be
ignored, along with the following \r\n, so that toy MUAs can second
guess the user and reformat it the way they want, not the way the
sender intended.

The message to which I'm replying arrived without format=flawed, and
without the '= ' at the end of the line.  It's quite possible that the
mailing list software removed them.  In my experience the Apple format
is *really* flawed: it terminates the lines with '=', not '= '.  Can
you check on your original (look in the raw file).

Greg
--
See complete headers for address and phone numbers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://mailman.barnet.com.au/pipermail/bugs/attachments/20071214/ef7e0070/attachment.bin 


More information about the BUGS mailing list