comparison src/readpst.c @ 281:d9b1e2e0f25a

ignore internet headers that don't seem to be real rfc822 headers
author Carl Byington <carl@five-ten-sg.com>
date Sun, 22 May 2011 16:27:30 -0700
parents f897afe47db0
children 57c3bcf22c4f
comparison
equal deleted inserted replaced
280:f897afe47db0 281:d9b1e2e0f25a
1090 // headers are sometimes really bogus - they seem to be fragments of the 1090 // headers are sometimes really bogus - they seem to be fragments of the
1091 // message body, so we only use them if they seem to be real rfc822 headers. 1091 // message body, so we only use them if they seem to be real rfc822 headers.
1092 if (header) { 1092 if (header) {
1093 if ((strncasecmp(header, "Return-Path: ", 13) == 0) || 1093 if ((strncasecmp(header, "Return-Path: ", 13) == 0) ||
1094 (strncasecmp(header, "Received: ", 10) == 0) || 1094 (strncasecmp(header, "Received: ", 10) == 0) ||
1095 (strncasecmp(header, "Subject: ", 9) == 0) ||
1096 (strncasecmp(header, "Date: ", 6) == 0) ||
1095 (strncasecmp(header, "From: ", 6) == 0) || 1097 (strncasecmp(header, "From: ", 6) == 0) ||
1096 (strncasecmp(header, "X-x: ", 5) == 0)) { 1098 (strncasecmp(header, "X-x: ", 5) == 0) ||
1099 (strncasecmp(header, "Microsoft Mail Internet Headers", 31) == 0)) {
1097 return 1; 1100 return 1;
1098 } 1101 }
1099 else { 1102 else {
1100 if (strlen(header) > 2) { 1103 if (strlen(header) > 2) {
1101 DEBUG_INFO(("Ignore bogus headers = %s\n", header)); 1104 DEBUG_INFO(("Ignore bogus headers = %s\n", header));