git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@770 77e5149b-7576-45b1-b177-96237e5ba77b
Nigel Horne authored on 2004/08/20 13:54:31... | ... |
@@ -17,6 +17,9 @@ |
17 | 17 |
* |
18 | 18 |
* Change History: |
19 | 19 |
* $Log: mbox.c,v $ |
20 |
+ * Revision 1.106 2004/08/20 04:53:18 nigelhorne |
|
21 |
+ * Tidy up |
|
22 |
+ * |
|
20 | 23 |
* Revision 1.105 2004/08/18 21:35:08 nigelhorne |
21 | 24 |
* Multithread the FollowURL calls |
22 | 25 |
* |
... | ... |
@@ -303,7 +306,7 @@ |
303 | 303 |
* Compilable under SCO; removed duplicate code with message.c |
304 | 304 |
* |
305 | 305 |
*/ |
306 |
-static char const rcsid[] = "$Id: mbox.c,v 1.105 2004/08/18 21:35:08 nigelhorne Exp $"; |
|
306 |
+static char const rcsid[] = "$Id: mbox.c,v 1.106 2004/08/20 04:53:18 nigelhorne Exp $"; |
|
307 | 307 |
|
308 | 308 |
#if HAVE_CONFIG_H |
309 | 309 |
#include "clamav-config.h" |
... | ... |
@@ -380,7 +383,7 @@ typedef enum { FALSE = 0, TRUE = 1 } bool; |
380 | 380 |
|
381 | 381 |
#define SAVE_TO_DISC /* multipart/message are saved in a temporary file */ |
382 | 382 |
|
383 |
-/*#define FOLLOWURLS /* |
|
383 |
+#define FOLLOWURLS /* |
|
384 | 384 |
* If an email contains URLs, check them - helps to |
385 | 385 |
* find Dialer.gen-45 |
386 | 386 |
*/ |
... | ... |
@@ -919,6 +922,12 @@ parseEmailBody(message *messageIn, blob **blobsIn, int nBlobs, text *textIn, con |
919 | 919 |
* able to scan anyway and we lose nothing |
920 | 920 |
*/ |
921 | 921 |
aText = textCopy(messageGetBody(mainMessage)); |
922 |
+ /* |
|
923 |
+ * TODO |
|
924 |
+ else if(options&CL_MAILURL) |
|
925 |
+ if(tableFind(subtypeTable, mimeSubtype) == HTML) |
|
926 |
+ checkURLs(mainMessage, dir); |
|
927 |
+ */ |
|
922 | 928 |
break; |
923 | 929 |
case MULTIPART: |
924 | 930 |
boundary = messageFindArgument(mainMessage, "boundary"); |
... | ... |
@@ -1348,11 +1357,11 @@ parseEmailBody(message *messageIn, blob **blobsIn, int nBlobs, text *textIn, con |
1348 | 1348 |
cli_dbgmsg("Found uuencoded message in multipart/mixed text portion\n"); |
1349 | 1349 |
messageSetEncoding(aMessage, "x-uuencode"); |
1350 | 1350 |
addAttachment = TRUE; |
1351 |
- } else if(strcasecmp(messageGetMimeSubtype(aMessage), "plain") == 0) { |
|
1351 |
+ } else if(tableFind(subtypeTable, cptr) == PLAIN) { |
|
1352 | 1352 |
char *filename; |
1353 | 1353 |
/* |
1354 | 1354 |
* Strictly speaking |
1355 |
- * a text/html part is |
|
1355 |
+ * a text/plain part is |
|
1356 | 1356 |
* not an attachment. We |
1357 | 1357 |
* pretend it is so that |
1358 | 1358 |
* we can decode and |
... | ... |
@@ -1373,7 +1382,8 @@ parseEmailBody(message *messageIn, blob **blobsIn, int nBlobs, text *textIn, con |
1373 | 1373 |
} |
1374 | 1374 |
} else { |
1375 | 1375 |
if(options&CL_MAILURL) |
1376 |
- checkURLs(aMessage, dir); |
|
1376 |
+ if(tableFind(subtypeTable, cptr) == HTML) |
|
1377 |
+ checkURLs(aMessage, dir); |
|
1377 | 1378 |
messageAddArgument(aMessage, "filename=textportion"); |
1378 | 1379 |
addAttachment = TRUE; |
1379 | 1380 |
} |