From 67c084cb12482db86b52ae9f3ea0a4782198fbe1 Mon Sep 17 00:00:00 2001 From: cmharper <1422608+cmharper@users.noreply.github.com> Date: Sun, 14 Apr 2019 10:06:24 +0100 Subject: [PATCH] Check if mta-sts user exists before adding --- setup/mail-postfix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/mail-postfix.sh b/setup/mail-postfix.sh index 361478b3..253c7230 100755 --- a/setup/mail-postfix.sh +++ b/setup/mail-postfix.sh @@ -230,7 +230,7 @@ chmod a+r /var/lib/mailinabox/mta-sts.txt # install the postfix MTA-STS resolver hide_output /usr/bin/pip3 install postfix-mta-sts-resolver # add a user to use solely for MTA-STS resolution -useradd -c "Daemon for MTA-STS policy checks" mta-sts -s /usr/sbin/nologin +id -u mta-sts &>/dev/null || useradd -c "Daemon for MTA-STS policy checks" mta-sts -s /usr/sbin/nologin # create systemd services for MTA-STS cat > /etc/systemd/system/postfix-mta-sts-daemon@.service << EOF [Unit]