automate the primary_hostname setup

Added Logic to Derive primary_hostname: After the server hostname ($servername) is set, we added code to derive the Exim primary_hostname as mail.<base domain>. This extracts the base domain from the hostname (e.g., server.example.com → example.com, or server.example.co.uk → example.co.uk for multi-part TLDs), sets primary_hostname to mail.<base domain>, and uses a fallback of mail.example.com if the base domain is invalid.

Updated Exim Configuration Section: Modified the "Configure Exim" section to set the derived primary_hostname in /etc/exim4/exim4.conf.template by replacing the placeholder with the calculated value using sed. This ensures Exim uses the correct primary_hostname (e.g., mail.example.com) during initial setup.

These changes automate the primary_hostname setup, improving email delivery reliability by ensuring the HELO matches the rDNS, without requiring additional user input.
This commit is contained in:
Nirvana 2025-05-16 21:53:21 +01:00 committed by GitHub
commit 64608d5246
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

File diff suppressed because it is too large Load diff