Christian Roessner reported:

> Amavis does not remove existing X-Scanned-headers
> My header is twice there.
> 
> amavisd.conf:
>   $remove_existing_x_scanned_headers = 1;

Indeed. Here is a fix:

--- amavisd.orig        2010-12-19 23:09:58.579956779 +0100
+++ amavisd     2010-12-21 17:20:08.575585307 +0100
@@ -13343,8 +13343,10 @@
   if ($extra_code_antivirus) {
   # $hdr_edits->delete_header('X-Amavis-Alert');  # it does not hurt to keep it
-    my($vsc) = c('X_HEADER_LINE');
-    $hdr_edits->delete_header($vsc)
+    my($am_hdr_fld_head) = c('X_HEADER_TAG');
+    my($am_hdr_fld_body) = c('X_HEADER_LINE');
+    $hdr_edits->delete_header($am_hdr_fld_head)
       if c('remove_existing_x_scanned_headers') &&
-         defined $vsc && $vsc =~ /^[!-9;-\176]+\z/;
+         defined $am_hdr_fld_body && $am_hdr_fld_body ne '' &&
+         defined $am_hdr_fld_head && $am_hdr_fld_head =~ /^[!-9;-\176]+\z/;
   }
   for ('X-Spam-Checker-Version') {


Thanks for the bug report.

  Mark

------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 Please visit http://www.ijs.si/software/amavisd/ regularly
 For administrativa requests please send email to rainer at openantivirus dot 
org

Reply via email to