hi all
I'm a new user and i found this post from the archive because i have the "same" 
problem whith amavisd 2.4.2 + postfix + squirrel + amavisdnewsql

>
>> The problem is when an email is sent to multiple users, one or more of
>> which use the normal bsmtp quarantine. Amavis marks the email as spam,
>> then because at least one user has a kill level under the level of the
>> spam email, the email gets quarantined
>
>Yes, the mail gets quarantined.
>
>> and not forwarded on via smtp to the mailbox user.
>
>No, quarantining a mail does not automatically disable passing it on to 
>recipient. Recipients with kill level above the spam score should still
>be receiving it, only those recipients with a low kill level will not
>receive it. The mail does get quarantined, but that is beside the point,
>there is only one quarantining action per message, not one
>per-recipient.
>
>> The spam ends up showing up in their (still accessible) database-based
>> quarantine
>
>Yes. But quarantine is not supposed to be directly accessible to
>recipients, because quarantine is per-message, not per-recipient.

Here i disagree, if preference, white/black and passing criteria
 are per recipient why not quarantining ?, of course , bsmtp may be 
obsolete, but smtp and sql method seems to have same problem.
IMHO including passed recipients in quarantined mail is incorrect so i
written this simple, maybe hugly, patch that strips out passed recipient
before "dropping" the message.
this is well working with amavis 2.4.2 and bsmtp method, please consider
per recipient message quarantine in future versons.

thanks for your time
        Paolo

--- amavisd.orig        2007-12-05 18:01:14.198519528 +0100
+++ amavisd     2007-12-05 18:33:57.649036049 +0100
@@ -8613,6 +8613,9 @@
     if ($quarantine_method =~ /^(bsmtp|sql):/i) {
       my(@recips);  # copy recipient addresses and DSN info
       for my $r (@{$msginfo->per_recip_data}) {
+        if ($r->recip_destiny ne D_DISCARD)
+                {do_log(5,'do_quarantine: skip recipient <%s>',$r->recip_addr);
+                next;}
         my($recip_obj) = Amavis::In::Message::PerRecip->new;
         $recip_obj->recip_addr($r->recip_addr);
         $recip_obj->dsn_notify($r->dsn_notify);
@@ -8707,6 +8710,9 @@
   my($spam_level) = $msginfo->spam_level;
   my(@q_addr,@a_addr);  # get per-recipient quarantine address(es) and admins
   for my $r (@{$msginfo->per_recip_data}) {
+    if ($r->recip_destiny ne D_DISCARD)
+       {do_log(5,'do_notify_and_quarantine: skip recipient <%s>',$rec);
+       next ; }
     my($rec) = $r->recip_addr;
     my($rec_ccat,$rec_ccat_min) = $r->main_contents_category;
     my($bypassed,$tag_level,$tag2_level,$kill_level,$do_tag2,$do_kill);


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to