mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
bug fix: dkim permissions
This commit is contained in:
@@ -2832,7 +2832,7 @@ class CloudManager:
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
|
||||
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)
|
||||
|
||||
##
|
||||
@@ -2855,7 +2855,7 @@ class CloudManager:
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
|
||||
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)
|
||||
|
||||
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'
|
||||
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)
|
||||
|
||||
from websiteFunctions.models import ChildDomains
|
||||
|
||||
@@ -665,7 +665,7 @@ class MailServerManager(multi.Thread):
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
|
||||
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)
|
||||
|
||||
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'
|
||||
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)
|
||||
|
||||
import tldextract
|
||||
|
||||
@@ -120,9 +120,12 @@ class DNS:
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
|
||||
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)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
import tldextract
|
||||
|
||||
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'
|
||||
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)
|
||||
|
||||
import tldextract
|
||||
|
||||
@@ -314,7 +314,7 @@ class mailUtilities:
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
|
||||
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)
|
||||
|
||||
import tldextract
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user