home · contact · privacy
WIP.
[config] / all_new_2018 / setup_mail.sh
diff --git a/all_new_2018/setup_mail.sh b/all_new_2018/setup_mail.sh
new file mode 100755 (executable)
index 0000000..29ea604
--- /dev/null
@@ -0,0 +1,10 @@
+#/bin/sh
+set -e
+
+echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections
+echo "postfix postfix/mailname string $(hostname -f)" | debconf-set-selections
+apt install postfix
+mkdir -p /etc/dovecot/conf.d/
+echo "ssl_cert = </etc/letsencrypt/live/$(hostname -f)/fullchain.pem" > /etc/dovecot/conf.d/99-ssl-certs.conf
+echo "ssl_key = </etc/letsencrypt/live/$(hostname -f)/privkey.pem" >> /etc/dovecot/conf.d/99-ssl-certs.conf
+apt install dovecot-imapd