X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=mail-setup;h=b8440fbfc7fc3684678f851273128102a238cfe4;hp=2af69b27f7411710b2b2efce87bccbc7c528d575;hb=effc74a288ee7e4d0a83bbf3335ba10f95eb7b8a;hpb=ae54f4cd08815de501151c10083e74294609558a diff --git a/mail-setup b/mail-setup index 2af69b2..b8440fb 100755 --- a/mail-setup +++ b/mail-setup @@ -50,6 +50,8 @@ EOF # hamburger -> preferences -> preferences -> advanced tab -> config editor button -> security.ssl.enable_ocsp_must_staple = false # background: ovecot does not yet have ocsp stapling support # reference: https://community.letsencrypt.org/t/simple-guide-using-lets-encrypt-ssl-certs-with-dovecot/2921 +# +# for phone, same thing but username alerts, pass in ivy-pass. ####### @@ -69,7 +71,7 @@ EOF # # dovecot password, i just need 1 as I\'m the only user # mkdir /p/c/filesystem/etc/dovecot -# echo "iank:$(doveadm pw -s ssha256)::::::" >/p/c/filesystem/etc/dovecot/users +# echo "iank:$(doveadm pw -s ssha256)::::::" >>/p/c/filesystem/etc/dovecot/users # conflink @@ -197,7 +199,7 @@ pi() { # package install apt-get -y install --purge --auto-remove "$@" } -postmaster=$u +postmaster=alerts mxhost=mail.iankelling.org mxport=587 forward=$u@$mxhost @@ -218,11 +220,11 @@ fi if [[ $HOSTNAME == $MAIL_HOST ]]; then # afaik, these will get ignored because they are routing to my own # machine, but rm them is safer - rm -f $(eval echo ~$postmaster)/.forward /root/.forward + rm -f $(eval echo ~$u)/.forward /root/.forward else # this can\'t be a symlink and has permission restrictions # it might work in /etc/aliases, but this seems more proper. - install -m 644 {-o,-g}$postmaster <(e $forward) $(eval echo ~$postmaster)/.forward + install -m 644 {-o,-g}$u <(e $forward) $(eval echo ~$u)/.forward fi @@ -687,10 +689,10 @@ EOF # sieve option, we wouldn\'t need this, but I\'d rather not modify a # default config if not needed. This won\'t work as a symlink in /a/c # unfortunately. - sudo -u $postmaster /a/exe/lnf -T sieve/main.sieve $(eval echo ~$postmaster)/.dovecot.sieve + sudo -u $u /a/exe/lnf -T sieve/main.sieve $(eval echo ~$u)/.dovecot.sieve + # we set this later in local.conf sed -ri -f - /etc/dovecot/conf.d/10-mail.conf <<'EOF' -1i mail_location = maildir:/m/md:LAYOUT=fs:INBOX=/m/md/INBOX /^\s*mail_location\s*=/d EOF @@ -744,11 +746,16 @@ ssl_cert =