mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 21:35:55 +01:00
add dkim keys to dns records during fetch
This commit is contained in:
@@ -7,15 +7,13 @@
|
|||||||
{% get_current_language as LANGUAGE_CODE %}
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<div id="page-title">
|
<div id="page-title">
|
||||||
<h2>{% trans "Terminal" %} - <a target="_blank" href="https://cyberpanel.net/docs/web-terminal/"
|
<h2>{% trans "Terminal" %} - <a target="_blank" href="https://cyberpanel.net/docs/web-terminal/"
|
||||||
style="height: 23px;line-height: 21px;"
|
style="height: 23px;line-height: 21px;"
|
||||||
class="btn btn-border btn-alt border-red btn-link font-red" title=""><span>{% trans "Web Terminal Docs" %}</span></a></h2>
|
class="btn btn-border btn-alt border-red btn-link font-red"
|
||||||
|
title=""><span>{% trans "Web Terminal Docs" %}</span></a></h2>
|
||||||
<p>{% trans "Execute your terminal commands." %}</p>
|
<p>{% trans "Execute your terminal commands." %}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -50,5 +48,4 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -617,6 +617,8 @@ class MailServerManager:
|
|||||||
command = "sudo cat " + path
|
command = "sudo cat " + path
|
||||||
privateKey = ProcessUtilities.outputExecutioner(command, 'opendkim')
|
privateKey = ProcessUtilities.outputExecutioner(command, 'opendkim')
|
||||||
|
|
||||||
|
DNS.createDKIMRecords(domainName)
|
||||||
|
|
||||||
data_ret = {'status': 1, 'fetchStatus': 1, 'keysAvailable': 1, 'publicKey': output[leftIndex:rightIndex],
|
data_ret = {'status': 1, 'fetchStatus': 1, 'keysAvailable': 1, 'publicKey': output[leftIndex:rightIndex],
|
||||||
'privateKey': privateKey, 'dkimSuccessMessage': 'Keys successfully fetched!',
|
'privateKey': privateKey, 'dkimSuccessMessage': 'Keys successfully fetched!',
|
||||||
'error_message': "None"}
|
'error_message': "None"}
|
||||||
|
|||||||
@@ -474,6 +474,8 @@ class DNS:
|
|||||||
leftIndex = output.index('(') + 2
|
leftIndex = output.index('(') + 2
|
||||||
rightIndex = output.rindex(')') - 1
|
rightIndex = output.rindex(')') - 1
|
||||||
|
|
||||||
|
if Records.objects.filter(domainOwner=zone, name="default._domainkey." + topLevelDomain).count() == 0:
|
||||||
|
|
||||||
record = Records(domainOwner=zone,
|
record = Records(domainOwner=zone,
|
||||||
domain_id=zone.id,
|
domain_id=zone.id,
|
||||||
name="default._domainkey." + topLevelDomain,
|
name="default._domainkey." + topLevelDomain,
|
||||||
@@ -489,6 +491,10 @@ class DNS:
|
|||||||
command = ' systemctl restart pdns'
|
command = ' systemctl restart pdns'
|
||||||
ProcessUtilities.executioner(command)
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
|
if ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu:
|
||||||
|
command = ' systemctl restart pdns'
|
||||||
|
ProcessUtilities.executioner(command)
|
||||||
|
|
||||||
## Add record to CF If sync enabled
|
## Add record to CF If sync enabled
|
||||||
|
|
||||||
dns = DNS()
|
dns = DNS()
|
||||||
|
|||||||
@@ -6805,4 +6805,5 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Java script code to git tracking ends here */
|
/* Java script code to git tracking ends here */
|
||||||
|
|||||||
Reference in New Issue
Block a user