David, > *** Amavis send to recipients has Passed BANNED !
Similar to my previous example, but this one shows how to block mail as banned: sub checks { my($self,$conn,$msginfo) = @_; for my $r (@{$msginfo->per_recip_data}) { # $r->add_contents_category(CC_VIRUS,0) if !$r->bypass_virus_checks; $r->add_contents_category(CC_BANNED,0) if !$r->bypass_banned_checks; $r->banning_reason_short('my-reason'); $r->banned_parts(['MAIL']); } # $msginfo->virusnames(['my-virus-name1', 'my-virus-name2']); # $msginfo->add_contents_category(CC_VIRUS,0); $msginfo->add_contents_category(CC_BANNED,0); } Note a slight difference between virus and banned: virus names are global ($msginfo), a per-recipient set of names need not be set for the time being ($r->virusnames); whereas banned reasons are typically per-recipient, and a global setting is currently ignored ($msginfo->banning_reason_short). Mark ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/