mmv

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

commit 34cba1cef397a943a44e54e14db1a99f03ea68b7
parent 7196ee8bdee7c89e5bad92095251d0e3a3bb5a83
Author: Petar Yotsev <petar@yotsev.xyz>
Date:   Sat, 30 Mar 2024 22:48:01 +0200

Update package versions for obsd 7.4 + minor fixes

Fix MX record creation for secondary domains
Fix status report at end of script
Restart only relevant daemons instead of whole server after cert update

Diffstat:
Mfiles/daily.local | 6+++++-
Mmmv | 6+++---
2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/files/daily.local b/files/daily.local @@ -1 +1,5 @@ -acme-client -v <maildom> && reboot +acme-client -v <maildom> && +rcctl restart httpd && +rcctl restart smtpd && +rcctl restart dovecot + diff --git a/mmv b/mmv @@ -38,7 +38,7 @@ success "Setting up email for the first time" pkg_add -u && pkg_add -I opensmtpd-extras opensmtpd-filter-rspamd dovecot \ - dovecot-pigeonhole rspamd-3.2 redis sieve tor && + dovecot-pigeonhole rspamd-3.6p0 redis tor && success "Installed required software" || failure "Failed to install required software" @@ -204,7 +204,7 @@ success "Adding domain $domain to existing setup" maindom="$(cat /etc/mail/maindom)" mkdir /etc/mail/dns/$domain -echo "$domain. IN MX 0 $maindom." > /etc/mail/dns/$domain/mx && +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 && success "Wrote relevant dns records in /etc/mail/dns/$domain/" || failure "Failed to write relevant dns records in /etc/mail/dns/$domain/" @@ -217,4 +217,4 @@ fi [ $failed = "false" ] && success "Done!" || -failure"Installation incomplete, check the errors and correct them!" +failure "Installation incomplete, check the errors and correct them!"