Ricardo,

Sorry for a late reply.

> DUH moment here... I am trying to use disclaimers for incoming messages in
> this case. After looking more carefully in the logs, the policy bank is
> being called, but no mangling happens since it's not a local domain. I
> found a reference to add the following within the policy bank, but Mark
> mentioned there could be undesirable effects: local_domains_map => [1];
> Is there a safer way to do this other than removing the restriction in the
> code?

General speak:

The most general and cleanest way is to list all local domains in the
@local_domains_map, either as an ACL or hash lookup table, or as SQL
or LDAP records, one for each local domain. Letting amavisd know the
direction of a message (inbound, outbound, internal-to-internal) is
needed for several features, such as adding of X-Spam header fields,
adding address extensions, DKIM signing/verifying, pen pals, disclaimers).

If you set up a policy bank which is guaranteed to only be invoked for
mail to local recipients (e.g. by mail routing topology), then it is
safe to set local_domains_map=>[1] within such policy bank. If this
can not be guaranteed (e.g. message may have a local and a remote
recipient), then using this approach is not advised.


> I'm testing how to add disclaimers.  We have a server that sends
> notifications and need to add a couple of lines of text.

For a disclaimer to be added, $allow_disclaimers flag needs to be set,
and a *sender* needs to be in @local_domains_map. If your notifications
server only uses few and fixed sender addresses, it suffices to
only list these domains in @local_domains_map. Better yet, let such
messages (and only them) trigger a policy bank which sets
allow_disclaimers=>1, local_domains_map=>[1], and this is all
that is needed, and is safe, as no other mail will be hitting such
policy bank.

  Mark

------------------------------------------------------------------------------
_______________________________________________
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