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).

Amusingly, when I very first wrote the new delivery chain like six months ago,
it was using fgetc :-)

Aaron


Ilja Booij <[EMAIL PROTECTED]> said:

> 
> 
> Hmm. seems to be something with '\0's again..
> 
> <snip>
> > Apr 27 11:52:03 sumy dbmail/smtp[58595]: dbmysql.c,db_query: executing
> > query [INSERT INTO messages(mailbox_idnr, physmessage_id,
> > unique_id,recent_flag, status) VALUES ('13392', '1769759',
> > 'd578abea4d8ce1da1ab1a770434996dd', '1', '005')]
> > Apr 27 11:52:03 sumy dbmail/smtp[58595]: dbmysql.c,db_query: executing
> > query [SELECT physmessage_id FROM messages WHERE message_idnr = '1919865']
> > Apr 27 11:52:03 sumy dbmail/smtp[58595]: dbmysql.c,db_query: executing
> > query [INSERT INTO messageblks(messageblk,blocksize, physmessage_id)
> > VALUES ('ired=5.0 tests=BAYES_00 autolearn=ham \n
> > version=2.63\nX-Spam-Level: \n\n\n\nRegards, Igor A. Olemskoi,
> >
[nix]\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
> > Apr 27 11:52:03 sumy dbmail/smtp[58595]: store_message_temp(): allocating
> > [524288] bytes of memory for readblock
> <snip>
> 
> 2 things:
> 1. lot's of NULs..
> 2. No separation is being made between header and body.
> 
> Ilja
> 
> 
> _______________________________________________
> Dbmail-dev mailing list
> Dbmail-dev@dbmail.org
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
> 



-- 



Reply via email to