mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-14 17:26:17 +01:00
possible resolution of https://community.cyberpanel.net/t/domain-that-you-have-provided-is-not-configured-as-rdns-for-your-server-ip-404/52190
This commit is contained in:
@@ -31,10 +31,6 @@ class httpProc:
|
|||||||
templateName = 'baseTemplate/error.html'
|
templateName = 'baseTemplate/error.html'
|
||||||
return render(self.request, templateName, {'error_message': 'You are not authorized to access %s' % (self.function)})
|
return render(self.request, templateName, {'error_message': 'You are not authorized to access %s' % (self.function)})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
if self.data == None:
|
if self.data == None:
|
||||||
|
|||||||
@@ -1515,6 +1515,7 @@ LogFile /var/log/clamav/clamav.log
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def FetchPostfixHostname():
|
def FetchPostfixHostname():
|
||||||
|
try:
|
||||||
PostfixPath = '/etc/postfix/main.cf'
|
PostfixPath = '/etc/postfix/main.cf'
|
||||||
if os.path.exists(PostfixPath):
|
if os.path.exists(PostfixPath):
|
||||||
PostFixConf = open(PostfixPath, 'r').readlines()
|
PostFixConf = open(PostfixPath, 'r').readlines()
|
||||||
@@ -1525,6 +1526,8 @@ LogFile /var/log/clamav/clamav.log
|
|||||||
return hostname
|
return hostname
|
||||||
else:
|
else:
|
||||||
return 'localhost'
|
return 'localhost'
|
||||||
|
except:
|
||||||
|
return 'localhost'
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def reverse_dns_lookup(ip_address):
|
def reverse_dns_lookup(ip_address):
|
||||||
|
|||||||
@@ -76,6 +76,13 @@ class virtualHostUtilities:
|
|||||||
except:
|
except:
|
||||||
CurrentHostName = ''
|
CurrentHostName = ''
|
||||||
|
|
||||||
|
if not skipRDNSCheck:
|
||||||
|
if not os.path.exists('/home/cyberpanel/postfix'):
|
||||||
|
message = 'This server does not come with postfix installed. [404]'
|
||||||
|
print(message)
|
||||||
|
logging.CyberCPLogFileWriter.statusWriter(tempStatusPath, message)
|
||||||
|
logging.CyberCPLogFileWriter.writeToFile(message)
|
||||||
|
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user