Skip to content

Commit 69ab717

Browse files
author
Till Brehm
committed
Merge branch '6610-missing-dkim-public' into 'develop'
Resolve "manually added DKIM key creates empty DNS RR" Closes #6610 See merge request ispconfig/ispconfig3!1830
2 parents 57fdd61 + 4551d9c commit 69ab717

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

interface/web/mail/mail_domain_edit.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,11 @@ function onSubmit() {
331331
$this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]);
332332
}
333333

334+
// Extract the dkim public key if not submitted.
335+
if (!empty($this->dataRecord['dkim_private']) && empty( $this->dataRecord['dkim_public']) && function_exists('openssl_pkey_get_details')) {
336+
$this->dataRecord['dkim_public'] = openssl_pkey_get_details(openssl_pkey_get_private($this->dataRecord['dkim_private']))['key'];
337+
}
338+
334339
//* server_id must be > 0
335340
if(isset($this->dataRecord["server_id"]) && $this->dataRecord["server_id"] < 1) $app->tform->errorMessage .= $app->lng("server_id_0_error_txt");
336341

0 commit comments

Comments
 (0)