[jira] [Created] (JAMES-4153) DKIMSign: signature template: allow for interpolating the domain

"Benoit Tellier (Jira)" <[email protected]>
Newsgroups gmane.comp.jakarta.james.devel
Message-ID <[email protected]>
Benoit Tellier created JAMES-4153:
-------------------------------------

             Summary: DKIMSign: signature template: allow for interpolating the domain
                 Key: JAMES-4153
                 URL: https://issues.apache.org/jira/browse/JAMES-4153
             Project: James Server
          Issue Type: Improvement
          Components: Mailet Contributions
            Reporter: Benoit Tellier


h2. Why?

I want to host several doains on a single Jmes instance. 
I want to be able tohost multiple domain in a dynamic way so I cannot have static confi for DKIM
I am OK with a single DKIM private key for the entire platform

Today DKIMSign do require a static domain for `d` token preventing me to reach DMARC allgnement

h2. Proposed solution

Allow interpolate the MAIL FROM domain, with fallback to a default domain if MAIL FROM: <>

{code:java}
            <mailet match="All" class="org.apache.james.jdkim.mailets.DKIMSign">
                <signatureTemplate>v=1; s=s1; d=%MAIL_FROM; h=from:subject:date:to:cc; a=rsa-sha256; bh=; b=;</signatureTemplate>
                <defaultDomain>linagora.com</defaultDomain>
                <privateKeyFilepath>file://secrets/dkim/dkim.key</privateKeyFilepath>
                <onMailetException>ignore</onMailetException>
            </mailet>
{code}

The default domain is optional, required when using %MAIL_FROM.

%MAIL_FROM is to be replaced with the mail from domin, or the default domain if none.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.