comparison src/readpst.c @ 280:f897afe47db0

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:08:10 -0700
parents 8c2c7d8d7518
children d9b1e2e0f25a
comparison
equal deleted inserted replaced
279:8c2c7d8d7518 280:f897afe47db0
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, "From: ", 6) == 0)) { 1095 (strncasecmp(header, "From: ", 6) == 0) ||
1096 (strncasecmp(header, "X-x: ", 5) == 0)) {
1096 return 1; 1097 return 1;
1097 } 1098 }
1098 else { 1099 else {
1099 if (strlen(header) > 2) { 1100 if (strlen(header) > 2) {
1100 DEBUG_INFO(("Ignore bogus headers = %s\n", header)); 1101 DEBUG_INFO(("Ignore bogus headers = %s\n", header));