X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=all_new_2018%2Fsetup_scripts%2Fsetup_mail.sh;fp=all_new_2018%2Fsetup_scripts%2Fsetup_mail.sh;h=7b256b7c66943a403a564982fcadc06c1ca32646;hb=e8da7564122f157748e9a8f62e9066123d9d63ad;hp=c8d4254dc20f9c924fb437334bb8f3d989ac1e24;hpb=7823df99c3e51c9591bf2c5a2a0071163c6b4832;p=config diff --git a/all_new_2018/setup_scripts/setup_mail.sh b/all_new_2018/setup_scripts/setup_mail.sh index c8d4254..7b256b7 100755 --- a/all_new_2018/setup_scripts/setup_mail.sh +++ b/all_new_2018/setup_scripts/setup_mail.sh @@ -64,6 +64,20 @@ echo "${mail_domain}" > /etc/mailname # 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 +cp "${config_tree_prefix}/user_files/dovecot.sieve" /home/plom/.dovecot.sieve +chown plom:plom /home/plom/.dovecot.sieve + +# In addition to our postfix server receiving mails, we funnel mails from a +# POP3 account into dovecot via fetchmail. It might make sense to adapt the +# ~/.dovecot.sieve to move mails targeted to the fetched mail account to their +# own mbox. +apt install -y fetchmail +cp "${config_tree_prefix}/user_files/fetchmailrc" /home/plom/.fetchmailrc +chown plom:plom /home/plom/.fetchmailrc +systemctl daemon-reload +systemctl start fetchmail.timer + +# Final advice to user. 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 @@ -71,3 +85,4 @@ if [ "${add_dkim_record}" -eq "1" ]; then cat "${dkim_selector}.txt" fi echo "TODO: passwd plom" +echo "TODO: adapt /home/plom/.dovecot.sieve and /home/plom/.fetchmailrc"