From 75baac8d60a62ab7dcf7b563470945826e2d2582 Mon Sep 17 00:00:00 2001 From: downtownallday Date: Fri, 6 Oct 2023 05:50:16 -0400 Subject: [PATCH] Update rsyslog's postfix configuration, which creates a socket in postfix's chroot --- setup/mods.available/move-postfix-queue-to-user-data.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setup/mods.available/move-postfix-queue-to-user-data.sh b/setup/mods.available/move-postfix-queue-to-user-data.sh index 5cfed112..389153f5 100755 --- a/setup/mods.available/move-postfix-queue-to-user-data.sh +++ b/setup/mods.available/move-postfix-queue-to-user-data.sh @@ -55,7 +55,14 @@ change_queue_directory() { mkdir -p "$(dirname "$where")" mv "$cur" "$where" /usr/sbin/postconf -e "queue_directory=$where" - systemctl start postfix + + # change rsyslog so chrooted postfix services can log at the + # new location + tools/editconf.py /etc/rsyslog.d/postfix.conf -s "\$AddUnixListenSocket=$where/dev/log" + systemctl restart rsyslog + + # re-run setup/mail-users.sh so the new queue_directory is used + source setup/mail-users.sh echo "New postfix queue directory: $where (was: $cur)" }