Browse code

add more mail file types

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

Tomasz Kojm authored on 2004/04/30 05:01:32
Showing 3 changed files
... ...
@@ -1,3 +1,7 @@
1
+Thu Apr 29 21:59:36 CEST 2004 (tk)
2
+----------------------------------
3
+  * libclamav: detect more mail file types
4
+
1 5
 Thu Apr 29 09:59:41 BST 2004 (njh)
2 6
 ----------------------------------
3 7
   * libclamav:		Tidied the handling of content disposition type:
... ...
@@ -69,11 +69,17 @@ struct cli_magic_s {
69 69
 
70 70
 #define MAGIC_BUFFER_SIZE 26
71 71
 static const struct cli_magic_s cli_magic[] = {
72
+
73
+    /* Archives */
74
+
72 75
     {0,  "Rar!",			4,  "RAR",		  CL_RARFILE},
73 76
     {0,  "PK\003\004",			4,  "ZIP",		  CL_ZIPFILE},
74 77
     {0,  "\037\213",			2,  "GZip",		  CL_GZFILE},
75 78
     {0,  "BZh",				3,  "BZip",		  CL_BZFILE},
76 79
     {0,  "From ",			5,  "MBox",		  CL_MAILFILE},
80
+
81
+    /* Mail */
82
+
77 83
     {0,  "Received",			8,  "Raw mail",		  CL_MAILFILE},
78 84
     {0,  "Return-Path: ",		13, "Maildir",		  CL_MAILFILE},
79 85
     {0,  "Return-path: ",		13, "Maildir",		  CL_MAILFILE},
... ...
@@ -84,6 +90,11 @@ static const struct cli_magic_s cli_magic[] = {
84 84
     {0,  "Message-Id: ",		12, "Mail",		  CL_MAILFILE},
85 85
     {0,  "Message-ID: ",		12, "Mail",		  CL_MAILFILE},
86 86
     {0,  "X-Apparently-To: ",		17, "Mail",		  CL_MAILFILE},
87
+    {0,  "X-Envelope-From: ",		17, "Mail",		  CL_MAILFILE},
88
+    {0,  "Envelope-to: ",		13, "Mail",		  CL_MAILFILE},
89
+    {0,  "Delivery-date: ",		15, "Mail",		  CL_MAILFILE},
90
+    {0,  "To: ",			4,  "Mail",		  CL_MAILFILE},
91
+    {0,  "Subject: ",			9,  "Mail",		  CL_MAILFILE},
87 92
     {0,  "For: ",			5,  "Eserv mail",	  CL_MAILFILE},
88 93
     {0,  "From: ",			6,  "Exim mail",	  CL_MAILFILE},
89 94
     {0,  "X-Symantec-",			11, "Symantec",		  CL_MAILFILE},
... ...
@@ -91,6 +102,9 @@ static const struct cli_magic_s cli_magic[] = {
91 91
     {0,  "v:\015\012Received: ",	14, "VPOP3 Mail (DOS)",	  CL_MAILFILE},
92 92
     {0,  "v:\012Received: ",		13, "VPOP3 Mail (UNIX)",  CL_MAILFILE},
93 93
     {0,  "Hi. This is the qmail-send",  26, "Qmail bounce",	  CL_MAILFILE},
94
+
95
+    /* Others */
96
+
94 97
     {0,  "\320\317\021\340\241\261\032\341",
95 98
 	                    8, "OLE2 container",  CL_OLE2FILE},
96 99
     /* Ignored types */
... ...
@@ -611,8 +611,8 @@ int build(struct optstruct *opt)
611 611
     sprintf(smbuff, "%d:", no);
612 612
     strcat(header, smbuff);
613 613
 
614
-    /* functionality level (TODO: use cl_funclevel()) */
615
-    sprintf(smbuff, "%d:", 1);
614
+    /* functionality level */
615
+    sprintf(smbuff, "%d:", cl_retflevel());
616 616
     strcat(header, smbuff);
617 617
 
618 618
     /* MD5 */