17 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Re: last line bei...
FromSent OnAttachments
Jason R. MastalerFeb 20, 2003 3:43 pm 
Sam VarshavchikFeb 20, 2003 4:54 pm 
Jesse CablekFeb 24, 2003 10:51 am 
Sam VarshavchikFeb 24, 2003 2:47 pm 
Chris BerryFeb 24, 2003 3:08 pm 
Sam VarshavchikFeb 24, 2003 3:44 pm 
Chris BerryFeb 24, 2003 4:30 pm 
Jason TackaberryFeb 24, 2003 4:46 pm 
Kurt BiglerFeb 24, 2003 5:28 pm 
Sam VarshavchikFeb 24, 2003 5:33 pm 
Chris BerryFeb 24, 2003 7:02 pm 
Sam VarshavchikFeb 24, 2003 8:56 pm 
Chris BerryFeb 25, 2003 12:03 pm 
Jesse CablekFeb 25, 2003 1:16 pm 
Jesse CablekFeb 25, 2003 3:12 pm 
Sam VarshavchikFeb 25, 2003 8:11 pm 
Jesse CablekFeb 25, 2003 9:34 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Re: last line being truncatedActions...
From:Kurt Bigler (kk@breathhost.net)
Date:Feb 24, 2003 5:28:53 pm
List:net.sourceforge.lists.courier-users

on 2/24/03 3:07 PM, Chris Berry <comp@hotmail.com> wrote:

Perhaps an easy fix would be to add a bit of sanitizing code that would append a newline to messages that lack one? (I'm not a developer so feel free to flame if that's a dumb idea)

This missing final newline problem is one of the oldest and most commonly recurring UNIX "bugs" as I see it. It seems to me that it is a good thing for any code that writes a text file line by line to provide the final newline if it is missing. You can always argue about whose responsibility this is, but it is so easy to do IF your code is already writing out the file, that I think there is little excuse for not doing it, especially given how open the possible inter-operability scenario is, regardless of rfcs.

However, if some other program has already written out a file, that is entirely another thing--to open that file and add a missing newline. Here (if I havent misinterpreted) it sounds like that is the case - some other agent already put the file in the maildir. If the file was simply moved there intact then there was no opportunity to alter it. But whatever agent wrote the file out originally (in the maildir or not) should have included the final newline.

That would be the place to start I think - to bring up the issue to whoever is responsible for the agent that wrote the file out line-by-line. Any agent that is interacting with a network port is probably copying data on a line-by-line basis and has the opportunity to add any missing final newline easily. Likewise for any agent that is processing header lines, scanning for, or possibly adding header information along the way.