git-svn: trunk@1953
Nigel Horne authored on 2006/05/04 17:29:05... | ... |
@@ -35,7 +35,7 @@ |
35 | 35 |
* cli_mbox decode it |
36 | 36 |
* TODO: Remove the vcard handling |
37 | 37 |
*/ |
38 |
-static char const rcsid[] = "$Id: pst.c,v 1.22 2006/05/03 21:14:56 nigelhorne Exp $"; |
|
38 |
+static char const rcsid[] = "$Id: pst.c,v 1.23 2006/05/04 08:29:05 nigelhorne Exp $"; |
|
39 | 39 |
|
40 | 40 |
#if HAVE_CONFIG_H |
41 | 41 |
#include "clamav-config.h" /* must come first */ |
... | ... |
@@ -5316,7 +5316,7 @@ pst_decode(const char *dir, int desc) |
5316 | 5316 |
} |
5317 | 5317 |
|
5318 | 5318 |
if (item->email->header != NULL) { |
5319 |
- char *soh = NULL; // real start of headers. |
|
5319 |
+ char *soh; // real start of headers. |
|
5320 | 5320 |
// some of the headers we get from the file are not properly defined. |
5321 | 5321 |
// they can contain some email stuff too. We will cut off the header |
5322 | 5322 |
// when we see a \n\n or \r\n\r\n |
... | ... |
@@ -5330,10 +5330,14 @@ pst_decode(const char *dir, int desc) |
5330 | 5330 |
*temp = '\0'; |
5331 | 5331 |
} |
5332 | 5332 |
|
5333 |
- // don't put rubbish in if we are doing seperate |
|
5334 |
- fprintf(f->output, "From \"%s\" %s\n", item->email->outlook_sender_name, c_time); |
|
5335 |
- soh = skip_header_prologue(item->email->header); |
|
5336 |
- fprintf(f->output, "%s\n\n", soh); |
|
5333 |
+ /* don't put rubbish in if we are doing seperate */ |
|
5334 |
+ soh = skip_header_prologue(item->email->header); |
|
5335 |
+ if(strncmp(soh, "X-From_: ", 9) == 0) { |
|
5336 |
+ fputs("From ", f->output); |
|
5337 |
+ soh += 9; |
|
5338 |
+ } else |
|
5339 |
+ fprintf(f->output, "From \"%s\" %s\n", item->email->outlook_sender_name, c_time); |
|
5340 |
+ fprintf(f->output, "%s\n\n", soh); |
|
5337 | 5341 |
} else { |
5338 | 5342 |
//make up our own header! |
5339 | 5343 |
// don't want this first line for this mode |
... | ... |
@@ -5342,7 +5346,8 @@ pst_decode(const char *dir, int desc) |
5342 | 5342 |
} else { |
5343 | 5343 |
temp = (char *)"(readpst_null)"; |
5344 | 5344 |
} |
5345 |
- fprintf(f->output, "From \"%s\" %s\n", temp, c_time); |
|
5345 |
+ /*fprintf(f->output, "From \"%s\" %s\n", temp, c_time);*/ |
|
5346 |
+ fprintf(f->output, "From %s %s\n", temp, c_time); |
|
5346 | 5347 |
if ((temp = item->email->outlook_sender) == NULL) |
5347 | 5348 |
temp = (char *)""; |
5348 | 5349 |
fprintf(f->output, "From: \"%s\" <%s>\n", item->email->outlook_sender_name, temp); |