From effc74a288ee7e4d0a83bbf3335ba10f95eb7b8a Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sun, 21 Jul 2019 20:21:50 -0400 Subject: [PATCH] various email improvements --- brc | 2 +- distro-end | 41 ++++++++++++++++++++++++------ mail-setup | 21 ++++++++++----- subdir_files/sieve/lists.sieve | 1 + subdir_files/sieve/liststest.sieve | 1 + 5 files changed, 50 insertions(+), 16 deletions(-) diff --git a/brc b/brc index 9e9752c..cdfac01 100644 --- a/brc +++ b/brc @@ -2154,7 +2154,7 @@ if [[ $- == *i* ]]; then case $return in - 0) ps_color="$(get_term_color blue)" + 0) ps_color="$(get_term_color purple)" ps_char='\$' ;; 1) ps_color="$(get_term_color green)" diff --git a/distro-end b/distro-end index bc334d6..91ae7e3 100755 --- a/distro-end +++ b/distro-end @@ -725,20 +725,45 @@ EOF p update fi - # needed for false positive in checkrestart s dd of=/etc/apt/preferences.d/debian-goodies <$t < 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 = ", header :contains "list-id" "", header :contains "list-id" "", + header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "", diff --git a/subdir_files/sieve/liststest.sieve b/subdir_files/sieve/liststest.sieve index dd5bb1a..d17fb1e 100644 --- a/subdir_files/sieve/liststest.sieve +++ b/subdir_files/sieve/liststest.sieve @@ -42,6 +42,7 @@ if anyof ( header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "", + header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "", header :contains "list-id" "", -- 2.30.2