Two Parameters: The script now accepts two arguments:
$1: The new domain you are adding.
$2: The existing mail service domain.
Variable Assignment:
- new_domain="$1" assigns the first parameter to the new domain being added.
- mail_service_domain="$2" assigns the second parameter to the existing mail service domain.
- maildomain="$subdom.$mail_service_domain" constructs the mail domain using the existing mail service domain.
Error Checking:
- The script now checks that both parameters are provided before proceeding, ensuring the script is called correctly.
DKIM, DMARC, SPF, and MX Records:
- The DNS records generated now correctly reflect the new domain and the existing mail service domain.