Browse code

Ensure all bounces are rescanned by cl_mbox

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@371 77e5149b-7576-45b1-b177-96237e5ba77b

Nigel Horne authored on 2004/03/04 22:02:27
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Thu Mar  4 13:07:04 GMT 2004 (njh)
2
+----------------------------------
3
+  * libclamav:	Some bounce messages weren't being rescanned, fix thanks
4
+	to "Andrey J. Melnikoff (TEMHOTA)" <temnota@kmv.ru>
5
+
1 6
 Thu Mar  4 03:29:07 CET 2004 (tk)
2 7
 ---------------------------------
3 8
   * libclamav: CL_ENCRYPTED: mark encrypted Zip archives as a virus type
... ...
@@ -17,6 +17,9 @@
17 17
  *
18 18
  * Change History:
19 19
  * $Log: mbox.c,v $
20
+ * Revision 1.49  2004/03/04 13:01:58  nigelhorne
21
+ * Ensure all bounces are rescanned by cl_mbox
22
+ *
20 23
  * Revision 1.48  2004/02/27 12:16:26  nigelhorne
21 24
  * Catch lines just containing ':'
22 25
  *
... ...
@@ -135,7 +138,7 @@
135 135
  * Compilable under SCO; removed duplicate code with message.c
136 136
  *
137 137
  */
138
-static	char	const	rcsid[] = "$Id: mbox.c,v 1.48 2004/02/27 12:16:26 nigelhorne Exp $";
138
+static	char	const	rcsid[] = "$Id: mbox.c,v 1.49 2004/03/04 13:01:58 nigelhorne Exp $";
139 139
 
140 140
 #if HAVE_CONFIG_H
141 141
 #include "clamav-config.h"
... ...
@@ -1317,6 +1320,17 @@ parseEmailBody(message *messageIn, blob **blobsIn, int nBlobs, text *textIn, con
1317 1317
 					saveTextPart(mainMessage, dir);
1318 1318
 				} else if((b = blobCreate()) != NULL) {
1319 1319
 					cli_dbgmsg("Found a bounce message\n");
1320
+					/*
1321
+					 * Ensure the when any bounce messages
1322
+					 * that have been saved in the
1323
+					 * temporary directory are passed to
1324
+					 * cl_mbox() by inserting a header line
1325
+					 * that scanners.c recognises as a mail
1326
+					 *
1327
+					 * Fix thanks to "Andrey J. Melnikoff
1328
+					 * (TEMHOTA)" <temnota@kmv.ru>
1329
+					 */
1330
+					blobAddData(b, (unsigned char *)"Received: by clamd\n", 19);
1320 1331
 					do {
1321 1332
 						blobAddData(b, (unsigned char *)t_line->t_text, strlen(t_line->t_text));
1322 1333
 						blobAddData(b, (unsigned char *)"\n", 1);