usmannasir
2024-02-07 14:54:49 +05:00
parent 9e3c9f09a6
commit ca39cdbcc3
3 changed files with 18 additions and 12 deletions

View File

@@ -31,10 +31,6 @@ class httpProc:
templateName = 'baseTemplate/error.html'
return render(self.request, templateName, {'error_message': 'You are not authorized to access %s' % (self.function)})
###
if self.data == None:

View File

@@ -1515,6 +1515,7 @@ LogFile /var/log/clamav/clamav.log
@staticmethod
def FetchPostfixHostname():
try:
PostfixPath = '/etc/postfix/main.cf'
if os.path.exists(PostfixPath):
PostFixConf = open(PostfixPath, 'r').readlines()
@@ -1525,6 +1526,8 @@ LogFile /var/log/clamav/clamav.log
return hostname
else:
return 'localhost'
except:
return 'localhost'
@staticmethod
def reverse_dns_lookup(ip_address):

View File

@@ -76,6 +76,13 @@ class virtualHostUtilities:
except:
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)
####