mmv

mailserver bootstrap script
git clone git://git.yotsev.xyz/mmv.git
Log | Files | Refs | README | LICENSE

commit eada4ecd5cdf99825de0a5e95b5e7c9d0de50605
parent 34cba1cef397a943a44e54e14db1a99f03ea68b7
Author: Petar Yotsev <petar@yotsev.xyz>
Date:   Sat, 30 Mar 2024 23:25:20 +0200

Add DMARC DNS record for secondary domain

Diffstat:
Mmmv | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mmv b/mmv @@ -168,8 +168,7 @@ pub_key=$(grep -v -e "---" /etc/mail/dkim/public.key | tr -d '\n' ) && mkdir -p /etc/mail/dns/$domain && echo "mail._domainkey.$domain. IN TXT \"v=DKIM1;k=rsa;p=$pub_key\"" > /etc/mail/dns/$domain/dkim && echo "$domain. IN TXT \"v=spf1 mx -all\"" > /etc/mail/dns/$domain/spf && -echo "_dmarc.$domain. IN TXT -\"v=DMARC1;p=quarantine;pct=100;ruf=mailto:postmaster@$domain\"" > /etc/mail/dns/$domain/dmarc && +echo "_dmarc.$domain. IN TXT \"v=DMARC1;p=quarantine;pct=100;ruf=mailto:postmaster@$domain\"" > /etc/mail/dns/$domain/dmarc && echo "$domain. IN MX 0 $maildom." > /etc/mail/dns/$domain/mx && success "Wrote relevant dns records in /etc/mail/dns/$domain/" || failure "Failed to write relevant dns records in /etc/mail/dns/$domain/" @@ -206,6 +205,7 @@ maindom="$(cat /etc/mail/maindom)" mkdir /etc/mail/dns/$domain echo "$domain. IN MX 0 mail.$maindom." > /etc/mail/dns/$domain/mx && echo "$domain. IN TXT \"v=spf1 mx -all\"" > /etc/mail/dns/$domain/spf && +echo "_dmarc.$domain. IN TXT \"v=DMARC1;p=quarantine;pct=100;ruf=mailto:postmaster@$maindom\"" > /etc/mail/dns/$domain/dmarc && success "Wrote relevant dns records in /etc/mail/dns/$domain/" || failure "Failed to write relevant dns records in /etc/mail/dns/$domain/"