X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=mail-setup;h=30c987f457ec1bfb895071300276f2614420b0cf;hb=72c18f3a6a7f1ed0ca16af654a1f804ab96e1ff9;hp=22d1e3ddd3d4bdbfffa37142e4a6de720b50275d;hpb=f46ee5570766081a5a73ce0d2132c8a06ee966fb;p=distro-setup diff --git a/mail-setup b/mail-setup index 22d1e3d..30c987f 100755 --- a/mail-setup +++ b/mail-setup @@ -3,6 +3,15 @@ # Copyright (C) 2019 Ian Kelling # SPDX-License-Identifier: AGPL-3.0-or-later + +# shellcheck disable=SC2254 # makes for a lot of unneeded quotes + + +# perusing through /el/mainlog without test messages: +# &!testignore|jtuttle| +# +#&! testignore|jtuttle|eximbackup|/usr/sbin/exim4 -bpu + # todo: check new macro DKIM_TIMESTAMPS # todo: check if REMOTE_SMTP_INTERFACE or REMOTE_SMTP_TRANSPORTS_HEADERS_REMOVE can simplify my or fsfs config @@ -328,9 +337,19 @@ soff () { done } sre() { + local enabled for service; do m systemctl restart $service - m systemctl enable $service; + # Optimization for exim, + # is-enabled: 0m0.015s + # enable: 0m0.748s + # It is related to this message: + # exim4.service is not a native service, redirecting to systemd-sysv-install. + # Executing: /lib/systemd/systemd-sysv-install enable exim4 + enabled=$(systemctl is-enabled $service 2>/dev/null ||:) + if [[ $enabled != enabled ]]; then + m systemctl enable $service + fi done } mailhost() { @@ -1258,7 +1277,7 @@ delay_warning_condition = ${if or {\ # enable 587 in addition to the default 25, so that # i can send mail where port 25 is firewalled by isp -daemon_smtp_ports = 25 : 587 +daemon_smtp_ports = 25 : 587 : 10025 # default of 25, can get stuck when catching up on mail smtp_accept_max = 400 smtp_accept_reserve = 100 @@ -1318,7 +1337,7 @@ u /etc/exim4/conf.d/data_local_acl <<'EOF' # those docs are rather old and I see a 110k spam message # pretty quickly looking through my spam folder. -warn +#warn !hosts = +iank_trusted remove_header = X-Spam_score: X-Spam_score_int : X-Spam_bar : X-Spam_report @@ -1730,6 +1749,7 @@ if mailhost; then # # setup chgrp www-data in ./conflink pi-nostart radicale + m usermod -a -G radicale iank u /etc/systemd/system/radicale.service.d/override.conf <