[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-167-g4319a8f

acab acab at 77e5149b-7576-45b1-b177-96237e5ba77b
Fri Jun 12 19:11:23 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 83415ddd390fb5af0baeaccaf53da89d1472e301
Author: acab <acab at 77e5149b-7576-45b1-b177-96237e5ba77b>
Date:   Thu Apr 16 23:01:51 2009 +0000

    bb#1549 second try
    
    git-svn-id: http://svn.clamav.net/svn/clamav-devel/trunk@5043 77e5149b-7576-45b1-b177-96237e5ba77b

diff --git a/ChangeLog b/ChangeLog
index 4a0518f..be9926b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Apr 17 00:59:48 CEST 2009 (acab)
+------------------------------------
+ * clamav-milter/clamfi.c: try harder not to break DKIM when AddHeader=Add
+			   Many thanks to Dick St.Peters
+
 Thu Apr 16 16:17:23 CEST 2009 (acab)
 ------------------------------------
  * shared/optparser.c, etc/clamav-milter.conf: document how to make
diff --git a/clamav-milter/clamfi.c b/clamav-milter/clamfi.c
index a4df626..75a3327 100644
--- a/clamav-milter/clamfi.c
+++ b/clamav-milter/clamfi.c
@@ -82,18 +82,23 @@ struct CLAMFI {
 
 
 static void add_x_header(SMFICTX *ctx, char *st, unsigned int scanned, unsigned int status) {
-    if(addxvirus == 1) {
+    if(addxvirus == 1) { /* Replace/Yes */
 	while(scanned)
 	    if(smfi_chgheader(ctx, (char *)"X-Virus-Scanned", scanned--, NULL) != MI_SUCCESS)
 		logg("^Failed to remove existing X-Virus-Scanned header\n");
 	while(status)
 	    if(smfi_chgheader(ctx, (char *)"X-Virus-Status", status--, NULL) != MI_SUCCESS)
 		logg("^Failed to remove existing X-Virus-Status header\n");
+	if(smfi_addheader(ctx, (char *)"X-Virus-Scanned", xvirushdr) != MI_SUCCESS)
+	    logg("^Failed to add X-Virus-Scanned header\n");
+	if(smfi_addheader(ctx, (char *)"X-Virus-Status", st) != MI_SUCCESS)
+	    logg("^Failed to add X-Virus-Status header\n");
+    } else { /* Add */
+	if(smfi_insheader(ctx, 0, (char *)"X-Virus-Scanned", xvirushdr) != MI_SUCCESS)
+	    logg("^Failed to insert X-Virus-Scanned header\n");
+	if(smfi_insheader(ctx, 0, (char *)"X-Virus-Status", st) != MI_SUCCESS)
+	    logg("^Failed to insert X-Virus-Status header\n");
     }
-    if(smfi_addheader(ctx, (char *)"X-Virus-Scanned", xvirushdr) != MI_SUCCESS)
-	logg("^Failed to add X-Virus-Scanned header\n");
-    if(smfi_addheader(ctx, (char *)"X-Virus-Status", st) != MI_SUCCESS)
-	logg("^Failed to add X-Virus-Status header\n");
 }
 
 enum CFWHAT {

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list