Turns out that fread just won't do the trick for LMTP :-(
Switching to fgetc for everything. Bah.

Aaron


""Aaron Stone"" <[EMAIL PROTECTED]> said:

> 
> Sorry for all of the last minute breakage, folks. It looks like deliveries
> should be working again, using fgetc in read_header and fread in
> store_message_tmp. Please check out CVS and test it out!
> 
> There's one case left that I'm a little worried about, which is if, while
> reading in the body of a message during an LMTP session, fread reads past the
> body and grabs LMTP commands. This *shouldn't* be a problem, because once the
> client (eg Postfix) has sent the whole message, it waits for the server to
> report back the delivery status. Worst case, some systems might block for a
> short period during the fread, waiting for more data from the client, then
> timing out (should be a sub-second timeout) and returning from fread.
> 
> We'll just have to try it in the real world to see if it causes trouble...
> 
> Aaron
> 
> 
> ""Aaron Stone"" <[EMAIL PROTECTED]> said:
> 
> > 
> > ""Jesse Norell"" <[EMAIL PROTECTED]> said:
> > > > Ok, I just thought this through again, and at the moment our only
option is
> > > > fgetc with one character at a time. Anything that's line-at-a-time is 
> > > > not
> > > > binary safe (correct this assumption and we're home free, though). Block
> at a
> > > > time, like fread, is not sensitive to the header/body boundary. It is
> > > > inevitable (and I must have missed it by testing with my usual dumb
> three line
> > > > headers) that read_header() will fread a bit into the body. So we'd
have to
> > > > either unread the extra stuff or pass an initial body along the delivery
> > > > chain. Neither is a pretty option (how much you can push back, if at
all, is
> > > > highly system dependent).
> > > 
> > >   Perhaps you could fgetc() through the headers, and once you hit the body
> > > use fread() for performance?
> > 
> > Not a bad idea at all! I'll try just chaning the read_header function, and
> > folks please check CVS again in a few hours to see if it's working right.
> > 
> > Aaron
> > 
> > 
> > > 
> > > 
> > > --
> > > Jesse Norell
> > > 
> > > [EMAIL PROTECTED] is not my email address;
> > > change "administrator" to my first name.
> > > --
> > > 
> > > _______________________________________________
> > > Dbmail-dev mailing list
> > > Dbmail-dev@dbmail.org
> > > http://twister.fastxs.net/mailman/listinfo/dbmail-dev
> > > 
> > 
> > 
> > 
> > -- 
> > 
> > 
> > 
> > _______________________________________________
> > Dbmail-dev mailing list
> > Dbmail-dev@dbmail.org
> > http://twister.fastxs.net/mailman/listinfo/dbmail-dev
> > 
> 
> 
> 
> -- 
> 
> 
> 
> _______________________________________________
> Dbmail-dev mailing list
> Dbmail-dev@dbmail.org
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
> 



-- 



Reply via email to