Best strategy to debug recipient domains?

Mark Martinec Mark.Martinec+amavis at ijs.si
Mon Apr 11 16:41:02 CEST 2011


> Sorry, no good, will send another one...

This one should be better:

--- amavisd.orig	2011-02-02 22:11:30.000000000 +0100
+++ amavisd	2011-04-11 16:39:54.513792634 +0200
@@ -334,5 +334,5 @@
       @whitelist_sender_maps @blacklist_sender_maps @score_sender_maps
       @author_to_policy_bank_maps @signer_reputation_maps
-      @message_size_limit_maps @debug_sender_maps
+      @message_size_limit_maps @debug_sender_maps @debug_recipient_maps
       @bypass_virus_checks_maps @bypass_spam_checks_maps
       @bypass_banned_checks_maps @bypass_header_checks_maps
@@ -1911,5 +1911,5 @@
     @whitelist_sender_maps @blacklist_sender_maps @score_sender_maps
     @author_to_policy_bank_maps @signer_reputation_maps
-    @message_size_limit_maps @debug_sender_maps
+    @message_size_limit_maps @debug_sender_maps @debug_recipient_maps
     @bypass_virus_checks_maps @bypass_spam_checks_maps
     @bypass_banned_checks_maps @bypass_header_checks_maps
@@ -17690,5 +17690,12 @@
       $msginfo->originating(c('originating')); # may have changed by a p.b.load
     }
-    debug_oneshot(1)  if lookup2(0,$sender, ca('debug_sender_maps'));
+    { my $debsendrm = ca('debug_sender_maps');
+      my $debrecipm = ca('debug_recipient_maps');
+      if (@$debsendrm && lookup2(0, $sender, $debsendrm) ||
+          @$debrecipm && grep(lookup2(0, $_->recip_addr, $debrecipm),
+                                      @{$msginfo->per_recip_data})) {
+        debug_oneshot(1);
+      }
+    }
     # check_mail() expects open file on $fh, need not be rewound
     Amavis::check_mail_begin_task();
@@ -18633,4 +18640,7 @@
           $orcpt = orcpt_encode($addr)  if !defined $orcpt;
         }
+        if (lookup2(0,$addr_unq, ca('debug_recipient_maps'))) {
+          debug_oneshot(1, $self->{proto} . "< $cmd");
+        }
         my($recip_size_limit); my($mslm) = ca('message_size_limit_maps');
         $recip_size_limit = lookup2(0,$addr_unq,$mslm)  if @$mslm;



Mark


More information about the amavis-users mailing list