[Libpst-devel] readpst.c UNIX style mbox
Nigel Horne
njh at bandsman.co.uk
Thu May 4 08:18:11 UTC 2006
There seems to have been some misunderstanding from the original author
over the format of From lines in UNIX style mboxs that are used, amongst
other things, to separate mail messages in an mbox.
This patch fixes it,
-Nigel
*** Oreadpst.c 2006-05-04 09:01:18.000000000 +0100
--- readpst.c 2006-05-04 09:15:07.000000000 +0100
***************
*** 695,702 ****
if (mode != MODE_SEPERATE) {
char *soh = NULL; // real start of headers.
// don't put rubbish in if we are doing seperate
- fprintf(f->output, "From \"%s\" %s\n", item->email->outlook_sender_name, c_time);
soh = skip_header_prologue(item->email->header);
fprintf(f->output, "%s\n\n", soh);
} else {
fprintf(f->output, "%s\n", item->email->header);
--- 695,706 ----
if (mode != MODE_SEPERATE) {
char *soh = NULL; // real start of headers.
// don't put rubbish in if we are doing seperate
soh = skip_header_prologue(item->email->header);
+ if(strncmp(soh, "X-From_: ", 9) == 0) {
+ fputs("From ", f->output);
+ soh += 9;
+ } else
+ fprintf(f->output, "From \"%s\" %s\n", item->email->outlook_sender_name, c_time);
fprintf(f->output, "%s\n\n", soh);
} else {
fprintf(f->output, "%s\n", item->email->header);
More information about the Libpst-devel
mailing list