bug fix: dkim permissions

This commit is contained in:
usmannasir
2023-09-24 17:44:30 +04:00
parent d87a8d8b99
commit 964141fcf2
5 changed files with 32 additions and 8 deletions

View File

@@ -2832,7 +2832,7 @@ class CloudManager:
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command) ProcessUtilities.executioner(command)
command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command, None, True) ProcessUtilities.executioner(command, None, True)
## ##
@@ -2855,7 +2855,7 @@ class CloudManager:
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command) ProcessUtilities.executioner(command)
command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command, None, True) ProcessUtilities.executioner(command, None, True)
for website in Websites.objects.all(): for website in Websites.objects.all():
@@ -2903,7 +2903,7 @@ class CloudManager:
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command) ProcessUtilities.executioner(command)
command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command, None, True) ProcessUtilities.executioner(command, None, True)
from websiteFunctions.models import ChildDomains from websiteFunctions.models import ChildDomains

View File

@@ -665,7 +665,7 @@ class MailServerManager(multi.Thread):
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command) ProcessUtilities.executioner(command)
command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command, None, True) ProcessUtilities.executioner(command, None, True)
import tldextract import tldextract
@@ -733,7 +733,7 @@ class MailServerManager(multi.Thread):
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command) ProcessUtilities.executioner(command)
command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command, None, True) ProcessUtilities.executioner(command, None, True)
import tldextract import tldextract

View File

@@ -120,9 +120,12 @@ class DNS:
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command) ProcessUtilities.executioner(command)
command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command, None, True) ProcessUtilities.executioner(command, None, True)
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command)
import tldextract import tldextract
extractDomain = tldextract.extract(domain) extractDomain = tldextract.extract(domain)
@@ -529,7 +532,7 @@ class DNS:
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command) ProcessUtilities.executioner(command)
command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command, None, True) ProcessUtilities.executioner(command, None, True)
import tldextract import tldextract

View File

@@ -314,7 +314,7 @@ class mailUtilities:
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command) ProcessUtilities.executioner(command)
command = 'chown cyberpanel:cyberpanel /usr/local/CyberCP/lib/python3.10/site-packages/tldextract/.suffix_cache/urls/*.tldextract.json' command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
ProcessUtilities.executioner(command, None, True) ProcessUtilities.executioner(command, None, True)
import tldextract import tldextract

View File

@@ -0,0 +1,21 @@
import re
def extract_domain_parts(domain):
# Use a regular expression to extract the domain parts
pattern = r'(?:\w+\.)?(\w+)\.(\w+)'
match = re.match(pattern, domain)
if match:
subdomain = match.group(1)
top_level_domain = match.group(2)
return subdomain, top_level_domain
else:
return None, None
# Example usage
domain = "sub.example.ae"
subdomain, top_level_domain = extract_domain_parts(domain)
print("Subdomain:", subdomain)
print("Top-Level Domain:", top_level_domain)