From 51b07402a5717b7055adb557fcc4aa0ca5f61387 Mon Sep 17 00:00:00 2001 From: xarraxyl <110544951+xarraxyl@users.noreply.github.com> Date: Fri, 30 Aug 2024 22:17:24 +0200 Subject: [PATCH] Restore the original sed command --- adddomain.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adddomain.sh b/adddomain.sh index d398f3b..2138d6c 100755 --- a/adddomain.sh +++ b/adddomain.sh @@ -27,7 +27,7 @@ echo "*@$new_domain $subdom._domainkey.$new_domain" >> /etc/postfix/dkim/signing systemctl reload opendkim postfix # Print out DKIM TXT entry. -pval="$(tr -d '\n' <"/etc/postfix/dkim/$new_domain/$subdom.txt" | sed "s/k=rsa.*p=/k=rsa; p=/;s/\"\s*\"//g;s/\"\s*.*//g" | grep -o 'p=.*')" +pval="$(tr -d '\n' <"/etc/postfix/dkim/$new_domain/$subdom.txt" | sed sed "s/k=rsa.* \"p=/k=rsa; p=/;s/\"\s*\"//;s/\"\s*).*//" | grep -o 'p=.*')" dkimentry="$subdom._domainkey.$new_domain TXT v=DKIM1; k=rsa; $pval" dmarcentry="_dmarc.$new_domain TXT v=DMARC1; p=reject; rua=mailto:dmarc@$new_domain; fo=1"