Adding to configuration parameters

Damian amavis at
Wed Sep 1 11:47:38 CEST 2021

> 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 

More information about the amavis-users mailing list