mmv

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

commit 44d13d1f82e2cee20548a1f46b7fab30c099677d
parent 9e89a950e862d05b8cc190f4a4642b393d7e4f72
Author: Petar Yotsev <petar@yotsev.xyz>
Date:   Tue, 14 Dec 2021 10:49:20 +0000

Bug fixes

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

diff --git a/mmv b/mmv @@ -24,12 +24,12 @@ failure() { \ # register domain # -[ test -f /etc/mail/maindom ] || firstuse="false" +[ -f /etc/mail/maindom ] || firstuse="false" [ $firstuse = "true" ] && -echo "$domain" >> /etc/mail/maindom +echo "$domain" > /etc/mail/maindom -grep "$domain" /etc/mail/domains > /dev/null || +grep -q "$domain" /etc/mail/domains > /dev/null || echo "$domain" >> /etc/mail/domains # @@ -155,7 +155,7 @@ success "Configured rspamd" [ $firstuse = "true" ] && pub_key=$(grep -v -e "---" /etc/mail/dkim/public.key | tr -d '\n' ) && -mkdir -p dns && +mkdir -p /etc/mail/dns && 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