<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:-moz-fixed;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.moz-txt-tag
        {mso-style-name:moz-txt-tag;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"> amavis-users [mailto:amavis-users-bounces+dino.edwards=mydirectmail.net@amavis.org]
<b>On Behalf Of </b>Jonathan Sélea<br>
<b>Sent:</b> Thursday, February 1, 2018 5:37 AM<br>
<b>To:</b> amavis-users@amavis.org<br>
<b>Subject:</b> "Split config" into multiple files<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"-moz-fixed",serif">Hi,
<br>
<br>
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.
<br>
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)
<br>
<br>
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:
<br>
<br>
<br>
dkim_key("DOMAIN.TLD", "SELECTOR", "/PATH/TO/PEM.FILE"); <br>
<br>
@dkim_signature_options_bysender_maps = ( { <br>
    "DOMAIN.TLD"  => { d => "DOMAIN.TLD", a => 'rsa-sha256', ttl => 10*24*3600 },
<br>
    '.' => { a => 'rsa-sha256', c => 'relaxed/simple', ttl => 30*24*3600 }, <br>
} ); <br>
<br>
<br>
What I want to do is to create separate files containing this: <br>
<br>
dkim_key("DOMAIN.TLD", "SELECTOR", "/PATH/TO/PEM.FILE"); <br>
<br>
@dkim_signature_options_bysender_maps = ( { <br>
    "DOMAIN.TLD"  => { d => "DOMAIN.TLD", a => 'rsa-sha256', ttl => 10*24*3600 },
<br>
    '.' => { a => 'rsa-sha256', c => 'relaxed/simple', ttl => 30*24*3600 }, <br>
} ); <br>
<br>
Can I make amavis include all the configfiles in a certain catalogue? For example "<span class="moz-txt-tag"><i>/</i></span><i>etc/amavis/domains<span class="moz-txt-tag">/</span></i>*"
<br>
(Like apache does with the "Include" directive, probably the easiest way to describe it)
<br>
<br>
Many thanks! <o:p></o:p></span></p>
</div>
</div>
</body>
</html>