fixes to last commit
[distro-setup] / mail-setup
index 36b3ab57027418c56945b3767d3bb3beac04b29f..3ac3476c337be913ba03f3cee8a73bcafd51cef6 100755 (executable)
@@ -2120,6 +2120,7 @@ mail_cache_max_size = 50M
 # ian: %u is used for alerts user vs iank
 # https://doc.dovecot.org/configuration_manual/mail_location/Maildir/
 mail_location = maildir:/m/%u:LAYOUT=fs:INBOX=/m/%u/INBOX:INDEX=/var/dovecot-indexes/%u
+# note: i don't know if these need to be set, but this seems fine.
 mail_uid = iank
 mail_gid = iank
 
@@ -3343,6 +3344,12 @@ EOF
     # This name won\'t appear on From: lines of outgoing messages if rewriting is enabled.
     echo iankelling.org > /etc/mailname
 
+    # mail default domain.
+    u /etc/mailutils.conf <<'EOF'
+address {
+  email-domain iankelling.org;
+};
+EOF
 
     # mail.iankelling.org so local imap clients can connect with tls and
     # when they happen to not be local.
@@ -3803,7 +3810,8 @@ case $HOSTNAME in
     ;;
 esac
 
-# optimization, this only needs to run once.
+# optimization, this only needs to run once.  But, if we move to a
+# computer we haven't used much, we need to fetch a fresh cert.
 if ! openssl x509 -checkend $(( 60 * 60 * 24 * 3 )) -noout -in /etc/exim4/fullchain.pem; then
   m /a/bin/ds/mail-cert-cron -1 -i
   m systemctl --now enable mailcert.timer