-[Install]
-WantedBy=timers.target
-EOF
- ser daemon-reload
- ser start mailcert
- sgo mailcert.timer
-
-
- # based on a little google and package search, just the dovecot
- # packages we need instead of dovecot-common.
- #
- # dovecot-lmtpd is for exim to deliver to dovecot instead of maildir
- # directly. The reason to do this is to use dovecot\'s sieve, which
- # has extensions that allow it to be almost equivalent to exim\'s
- # filter capabilities, some ways probably better, some worse, and
- # sieve has the benefit of being supported in postfix and
- # proprietary/weird environments, so there is more examples on the
- # internet. I was torn about whether to do this or not, meh.
- pi dovecot-core dovecot-imapd dovecot-sieve dovecot-lmtpd
-
- # if we changed 90-sieve.conf and removed the active part of the
- # 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.
- lnf -T sieve/main.sieve ~/.dovecot.sieve
-
- # we have a few config files which installing exim/dovecot overwrites,
- # and might as well have this before reading /etc/mailpass,
- # which this sets up too.
- conflink
-
- # begin setup passwd.client
- f=/etc/exim4/passwd.client
- s rm -f $f
- s touch $f
- s chmod 640 $f
- s chown root:Debian-exim $f
- # note: this will go away
- s cat /etc/mailpass| while read -r domain port pass; do
- # reference: exim4_passwd_client(5)
- printf "%s:%s\n" "$domain" "$pass" | s tee -a $f >/dev/null
- done
- # end setup passwd.client
-
- # https://blog.dhampir.no/content/make-exim4-on-debian-respect-forward-and-etcaliases-when-using-a-smarthost
- # i only need .forwards, so just doing that one.
- cd /etc/exim4/conf.d/router
- a=userforward
- b=${a}_higher_priority
- tmp=$(mktemp)
- of=175_$b
- # sed to make the router name unique
- sed -r s/^\\S+:/$b:/ 600_exim4-config_$a | s dd of=$tmp 2>/dev/null
- if ! diff -q $tmp $of &>/dev/null; then
- s dd if=$tmp of=$of >/dev/null
- fi
+# https://blog.dhampir.no/content/make-exim4-on-debian-respect-forward-and-etcaliases-when-using-a-smarthost
+# i only need .forwards, so just doing that one.
+cd /etc/exim4/conf.d/router
+b=userforward_higher_priority
+# replace the router name so it is unique
+sed -r s/^\\S+:/$b:/ 600_exim4-config_userforward >175_$b