I’m not sure if amavis will allow you to do an include as you are suggesting. 
Someone else can maybe chime in on that. Have you considered using opendkim 
instead of amavis to accomplish this? This will give you the separate file 
functionality you are looking for.


From: amavis-users 
[mailto:[email protected]] On 
Behalf Of Jonathan Sélea
Sent: Thursday, February 1, 2018 5:37 AM
To: [email protected]
Subject: "Split config" into multiple files

Hi,

I in the process of creating a mailrelay for thousands of email users and 
thousands of domains. The idea is to sign the messages with a DKIM key (and 
also ARC) in that relay because Exchange 2013 does not have support for it yet.
I have searched the man pages and net after a answer to this, but was unable to 
find it (if it is due to my incompetence or the fact that amavis does not have 
that function - I dont know)

I know that I can generate the .pem files with amavisd-new genrsa filename.pem 
1024 (for example) and then define the keys in /etc/amavis/conf.d/50-users like 
this:


dkim_key("DOMAIN.TLD", "SELECTOR", "/PATH/TO/PEM.FILE");

@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 },
} );


What I want to do is to create separate files containing this:

dkim_key("DOMAIN.TLD", "SELECTOR", "/PATH/TO/PEM.FILE");

@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 },
} );

Can I make amavis include all the configfiles in a certain catalogue? For 
example "/etc/amavis/domains/*"
(Like apache does with the "Include" directive, probably the easiest way to 
describe it)

Many thanks!

Reply via email to