Re: Adding to configuration parameters

Damian <[email protected]>
Newsgroups gmane.mail.virus.amavis.user
Message-ID <[email protected]>
> My quesion is, can I just extend configuration parameters that were set
> in a previous file?
>
> For example, in my CentOS-file, I have added some lines to the default
> score_sender_maps. In Debian score_sender_maps is defined in
> 20-debian_defaults.

Amavis config is Perl code, so you can use Perl operators and functions 
to manipulate data structures. Now manipulating @score_sender_maps might 
be ugly or bad style, depending where you want your additional lines. 
For example, if you wanted additional lines inside the new_RE(), you 
could, with the current amavis code base, specify

> push @{$score_sender_maps[0]->{'.'}[0]}, [qr'^my additional regex$' => 
> 42];

However, this only works by exploiting knowledge of current amavis 
internals. If your additional lines do not short-circuit the existing 
ones, you might add them via

> push @score_sender_maps, ...
and obtain the desired results, but the ... depends on your specific use 
case.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.