Faster handling of bounce messages

git-svn: trunk@1305
remotes/push_mirror/metadata
Nigel Horne 21 years ago
parent 2e52a37d81
commit b9a141eade
  1. 4
      clamav-devel/ChangeLog
  2. 30
      clamav-devel/libclamav/mbox.c
  3. 7
      clamav-devel/libclamav/message.c

@ -1,3 +1,7 @@
Thu Feb 3 21:09:34 GMT 2005 (njh)
----------------------------------
* libclamav/mbox.c: Speed improvements in the handling of bounce messages
Wed Feb 2 08:32:46 GMT 2005 (njh)
----------------------------------
* clamav-milter: Call watchdog when neither SESSION nor --external is

@ -17,6 +17,9 @@
*
* Change History:
* $Log: mbox.c,v $
* Revision 1.215 2005/02/03 21:07:33 nigelhorne
* Faster handling of bounce messages
*
* Revision 1.214 2005/02/01 14:46:06 nigelhorne
* Decode encapsulated bounce messages that have been base64 encoded (needlessly :-) )
*
@ -630,7 +633,7 @@
* Compilable under SCO; removed duplicate code with message.c
*
*/
static char const rcsid[] = "$Id: mbox.c,v 1.214 2005/02/01 14:46:06 nigelhorne Exp $";
static char const rcsid[] = "$Id: mbox.c,v 1.215 2005/02/03 21:07:33 nigelhorne Exp $";
#if HAVE_CONFIG_H
#include "clamav-config.h"
@ -2506,14 +2509,25 @@ parseEmailBody(message *messageIn, text *textIn, const char *dir, const table_t
/* Content-Type: message/rfc822 */
cli_dbgmsg("Found message inside multipart (encoding type %d)\n",
messageGetEncoding(aMessage));
#if 0
if(messageGetEncoding(aMessage) == NOMIME) {
cli_dbgmsg("No encoding line found in the multipart/message\n");
assert(aMessage == messages[i]);
messageDestroy(messages[i]);
messages[i] = NULL;
continue;
switch(messageGetEncoding(aMessage)) {
case NOENCODING:
case EIGHTBIT:
case BINARY:
if(encodingLine(aMessage) == NULL) {
/*
* This means that the message has no attachments
* The test for messageGetEncoding is needed since
* encodingLine won't have been set if the message
* itself has been encoded
*/
cli_dbgmsg("No encoding line found in the multipart/message\n");
assert(aMessage == messages[i]);
messageDestroy(messages[i]);
messages[i] = NULL;
continue;
}
}
#if 0
messageAddStrAtTop(aMessage,
"Received: by clamd (message/rfc822)");
#endif

@ -17,6 +17,9 @@
*
* Change History:
* $Log: message.c,v $
* Revision 1.141 2005/02/03 21:07:34 nigelhorne
* Faster handling of bounce messages
*
* Revision 1.140 2005/02/02 08:35:09 nigelhorne
* Improved debug message
*
@ -417,7 +420,7 @@
* uuencodebegin() no longer static
*
*/
static char const rcsid[] = "$Id: message.c,v 1.140 2005/02/02 08:35:09 nigelhorne Exp $";
static char const rcsid[] = "$Id: message.c,v 1.141 2005/02/03 21:07:34 nigelhorne Exp $";
#if HAVE_CONFIG_H
#include "clamav-config.h"
@ -693,7 +696,7 @@ messageSetMimeType(message *mess, const char *type)
if(highestSimil >= 50) {
cli_dbgmsg("Unknown MIME type \"%s\" - guessing as %s (%u%% certainty)\n",
type, closest, highestSimil);
mess->mimeType = t;
mess->mimeType = (mime_type)t;
} else {
cli_dbgmsg("Unknown MIME type: `%s', set to Application - if you believe this file contains a virus, report it to bugs@clamav.net\n", type);
mess->mimeType = APPLICATION;

Loading…
Cancel
Save