mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-12-16 13:29:42 +01:00
This commit resolves the issue where CyberPanel attempts to configure email/DKIM settings even when email services were explicitly disabled during custom installation, causing hostname SSL setup and website creation to fail with "No such file or directory: '/etc/postfix/main.cf'" errors. Changes: - Added emailServicesInstalled() utility function to check for /home/cyberpanel/postfix marker - OnBoardingHostName(): Wrap email operations (issueSSLForMailServer, postfix commands) with checks - OnBoardingHostName(): Allow hostname setup to complete without email services - issueSSLForMailServer(): Add early return if email services not installed - issueSSLForMailServer(): Verify /etc/postfix directory exists before operations - issueSSLForMailServer(): Check /etc/postfix/main.cf exists before reading - setupAutoDiscover(): Add early return if email services not installed - setupAutoDiscover(): Check /etc/postfix/main.cf exists before accessing - mailUtilities.configureOpenDKIM(): Verify main.cf exists before configuration Impact: - Hostname SSL setup now completes successfully without email components - Website creation works correctly on custom installs without email - No more file not found errors for /etc/postfix/main.cf - Graceful degradation: operations skip email setup with log messages Fixes: Custom installation hostname SSL 404 error Fixes: Website creation DKIM failure on custom installs Related: Ticket #RMKRFFGKC
105 KiB
105 KiB