"Split config" into multiple files

Jonathan Sélea jonathan at selea.se
Thu Feb 1 11:37:15 CET 2018


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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20180201/1d844d81/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20180201/1d844d81/attachment.sig>


More information about the amavis-users mailing list