Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Vítězslav Dvořák
ISPConfig 3
Commits
3d42af06
Commit
3d42af06
authored
Sep 16, 2020
by
Vítězslav Dvořák
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#5741 - valid DKIM record for bind on create & update mail doman
parent
18bdde00
Pipeline
#5172
passed with stage
in 7 minutes and 44 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
interface/web/mail/mail_domain_edit.php
interface/web/mail/mail_domain_edit.php
+7
-1
interface/web/mail/templates/mail_domain_edit.htm
interface/web/mail/templates/mail_domain_edit.htm
+3
-1
No files found.
interface/web/mail/mail_domain_edit.php
View file @
3d42af06
...
...
@@ -219,7 +219,13 @@ class page_action extends tform_actions {
$sql
=
"SELECT domain, dkim_private, dkim_public, dkim_selector FROM mail_domain WHERE domain_id = ?"
;
$rec
=
$app
->
db
->
queryOneRecord
(
$sql
,
$app
->
functions
->
intval
(
$_GET
[
'id'
]));
$dns_key
=
str_replace
(
array
(
'-----BEGIN PUBLIC KEY-----'
,
'-----END PUBLIC KEY-----'
,
"
\r
"
,
"
\n
"
),
''
,
$rec
[
'dkim_public'
]);
$dns_record
=
$rec
[
'dkim_selector'
]
.
'._domainkey.'
.
$rec
[
'domain'
]
.
'. 3600 TXT v=DKIM1; t=s; p='
.
$dns_key
;
$keyparts
=
str_split
(
'v=DKIM1; t=s; p='
.
$dns_key
,
200
);
array_walk
(
$keyparts
,
function
(
&
$value
,
$key
)
{
$value
=
'"'
.
$value
.
'"'
;
}
);
$dkim_txt
=
implode
(
''
,
$keyparts
);
$dns_record
=
$rec
[
'dkim_selector'
]
.
'._domainkey.'
.
$rec
[
'domain'
]
.
'. 3600 IN TXT '
.
$dkim_txt
;
$app
->
tpl
->
setVar
(
'dkim_selector'
,
$rec
[
'dkim_selector'
],
true
);
$app
->
tpl
->
setVar
(
'dkim_private'
,
$rec
[
'dkim_private'
],
true
);
$app
->
tpl
->
setVar
(
'dkim_public'
,
$rec
[
'dkim_public'
],
true
);
...
...
interface/web/mail/templates/mail_domain_edit.htm
View file @
3d42af06
...
...
@@ -134,7 +134,9 @@
dkim_selector
:
dkim_selector
,
type
:
"
create_dkim
"
},
function
(
data
)
{
var
dns
=
data
[
'
dkim_selector
'
]
+
'
._domainkey.
'
+
data
[
'
domain
'
]
+
'
. 3600 TXT v=DKIM1; t=s; p=
'
+
data
[
'
dns_record
'
];
var
dkim_txt
=
'
v=DKIM1; t=s; p=
'
+
data
[
'
dns_record
'
].
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
);
var
dns
=
data
[
'
dkim_selector
'
]
+
'
._domainkey.
'
+
data
[
'
domain
'
]
+
'
. 3600 IN TXT
'
+
dkim_txt
.
match
(
new
RegExp
(
'
.{1,
'
+
'
200
'
+
'
}
'
,
'
g
'
)).
map
(
chunk
=>
'
"
'
+
chunk
+
'
"
'
).
join
(
''
);
$
(
"
#dkim_selector
"
).
val
(
data
.
dkim_selector
);
$
(
"
#dkim_public
"
).
val
(
data
.
dkim_public
);
$
(
"
#dkim_private
"
).
val
(
data
.
dkim_private
);
...
...
Vítězslav Dvořák
@vitex
mentioned in merge request
ispconfig/ispconfig3!1178 (closed)
·
Sep 16, 2020
mentioned in merge request
ispconfig/ispconfig3!1178 (closed)
mentioned in merge request ispconfig/ispconfig3!1178
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment