"Split config" into multiple files

Tilman Schmidt tschmidt at cardtech.de
Fri Feb 9 10:03:09 CET 2018


Am 01.02.2018 um 18:14 schrieb Matus UHLAR - fantomas:
>>>>> The config is perl, you can do whatever you want and perl allows.
> 
>>>> Did not know that, and I dont know perl either.
>>>> So I could theoretically include configs in a catalogue?
> 
>>> Yes. The debian package for example already splits the amavis config.
> 
> On 01.02.18 17:08, Jonathan Sélea wrote:
>> So theoretically, I could already create alot of configs called XXX-dkim
>> in the /etc/amavis/conf.d catalogue and amavis would accept it?
> 
> yes. Note that amavis will always read and process all those files.

Be aware, though, that if you do it like you initially suggested, each
of the code blocks

> @dkim_signature_options_bysender_maps = ( {
>     "DOMAIN.TLD"  => { d => "DOMAIN.TLD", a => 'rsa-sha256', ttl => 10*24*3600 },
>     '.' => { a => 'rsa-sha256', c => 'relaxed/simple', ttl => 30*24*3600 },
> } );

will overwrite the previous content of
@dkim_signature_options_bysender_maps, so only the last one will
actually be effective.
You'll have to code it in such a way that each *-dkim file adds its
"DOMAIN.TLD" entry to the array while preserving the existing content.

HTH
Tilman


More information about the amavis-users mailing list