X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=all_new_2018%2Fsetup_mail.sh;h=60eda3164151d63d8ffedf041186072defba7eb4;hb=ed70f670e0aa29022aa9fbab587e7638ad3a3ce2;hp=edd53194624ccd343e1d685f1dacd037c3350830;hpb=8f9ce114c43877b86921f52bce40f1d5d3c8ad92;p=config diff --git a/all_new_2018/setup_mail.sh b/all_new_2018/setup_mail.sh index edd5319..60eda31 100755 --- a/all_new_2018/setup_mail.sh +++ b/all_new_2018/setup_mail.sh @@ -31,6 +31,7 @@ fi # Link and adapt mail-server-specific /etc/ files. ./hardlink_etc.sh mail +sed -i "s/REPLACE_maildomain_ECALPER/${mail_domain}/g" /etc/mailutils.conf sed -i "s/REPLACE_Domain_ECALPER/${mail_domain}/g" /etc/opendkim.conf sed -i "s/REPLACE_Selector_ECALPER/${dkim_selector}/g" /etc/opendkim.conf sed -i "s/REPLACE_myhostname_ECALPER/$(hostname -f)/g" /etc/postfix/main.cf @@ -53,8 +54,12 @@ echo "ssl_key = > /etc/dovec echo "postfix postfix/mailname string ${mail_domain}" | debconf-set-selections echo "${mail_domain}" > /etc/mailname -# Everything should now be ready for installations. -apt install -y -o Dpkg::Options::=--force-confold postfix dovecot-imapd opendkim +# Everything should now be ready for installations. Note that we don't +# strictly need dovecot-lmtpd, as postfix will deliver mail to /var/mail/USER +# in any case, to be found by dovecot; we use it as a transport mechanism to +# allow for sophisticated stuff like dovecot-side sieve filtering (installed +# with dovecot-sieve). +apt install -y -o Dpkg::Options::=--force-confold postfix dovecot-imapd dovecot-lmtpd dovecot-sieve opendkim echo "TODO: Ensure MX entry for your system in your DNS configuration." echo "TODO: Ensure a proper SPF entry for this system in your DNS configuration; something like 'v=spf1 mx -all' mapped to your host." if [ "${add_dkim_record}" -eq "1" ]; then