From 17bf1cac2220a521152c0cdffb546fba12b624a6 Mon Sep 17 00:00:00 2001 From: Luc de Louw Date: Sat, 15 Dec 2018 16:51:32 +0100 Subject: [PATCH] Providing a Systemd unit file and a description how to use it on RHEL7 and clones --- contrib/README.md | 25 +++++++++++++++++++++++++ contrib/postfix-mta-sts.service | 14 ++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 contrib/README.md create mode 100644 contrib/postfix-mta-sts.service diff --git a/contrib/README.md b/contrib/README.md new file mode 100644 index 0000000..03093a5 --- /dev/null +++ b/contrib/README.md @@ -0,0 +1,25 @@ +# Usage + +The default Python version in RHEL7 (and clones) is too old, you need at least 3.5 to run postfix-mta-sts. However, Python 3.6 is availale in the Software collections + +For other distributions please edit the Systemd Unit file accordingly + +# Create a User (and Group) to run MTA-STS +```bash +useradd -c "Daemon for MTA-STS policy checks" mta-sts -s /sbin/nologin +``` + +# Systemd Unit file + +Place the provided file to /etc/systemd/system and reload the system daemon + +```bash +systemctl daemon-reload +``` + +To enable MTA-STS on system startup run + +```bash +systemctl enable mta-sts.service +``` + diff --git a/contrib/postfix-mta-sts.service b/contrib/postfix-mta-sts.service new file mode 100644 index 0000000..7efa6cc --- /dev/null +++ b/contrib/postfix-mta-sts.service @@ -0,0 +1,14 @@ +[Unit] +Description=Postfix MTA STS daemon +After=syslog.target network.target + +[Service] +Type=simple +User=mta-sts +Group=mta-sts +# This is the ExecStart path for RHEL7 using python 36 from the Software collections. +# You may use a different python interpreter on other distributions +ExecStart=/opt/rh/rh-python36/root/bin/mta-sts-daemon + +[Install] +WantedBy=multi-user.target