Nuno,

> Is it possible to define defang_maps_by_ccat in the policy back?

Yes.

> I want to have something like:
>
> $policy_bank{'DEFANG'} = {  # those configured to send mail to port 10026
>    %{$policy_bank{'DEFAULT'}},
>    defang_spam => 1,
>    log_level => 5,
>    defang_maps_by_ccat => { +CC_SPAM => [ 'attach' ] } ,
> };
>
> So that all mails marked as spam get defang using the attach method..
> If i put the conf outside the policy bank it works fine.
>
> $defang_maps_by_ccat{+CC_SPAM} = [ 'attach' ];
>
> But i want it to be only in the DEFANG policy bank..

Btw, keep in mind that recipient needs to be local
for defanging to work.


Here is a problem:
  { +CC_SPAM => ... }
The perl '=>' operator is too damn clever, the '+' is not
sufficient to prevent it from quoting its left-hand side.
One needs to use &CC_SPAM or (CC_SPAM), or just avoid
a '=>' and use a comma when building a hash:

$policy_bank{'DEFANG'} = {
  log_level => 5,
  defang_maps_by_ccat => { CC_SPAM, [ 'attach' ] };
};

or:

$policy_bank{'DEFANG'} = {
  log_level => 5,
  defang_maps_by_ccat => { &CC_SPAM => [ 'attach' ] };
};


Mark

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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/

Reply via email to