#!/bin/bash # install.sh [...] # Enter the internal address to which system email usually goes here INT_ADDRESS= # EXT_ADDRESS define the external address of the server to which to send the encrypted system messages. Important: You need a public GPG key on the keyserver for this address ($KEYSERVER_ADDRESS, see Line 9) EXT_ADDRESS= # The URL of the keyserver KEYSERVER_ADDRESS= # Install dependencies apt-get install sudo gpg python-gpgme # Create the system user without home directory and without login permission adduser --system --no-create-home --disabled-login zeyple # Download the Python script zeyple.py wget https://github.com/infertux/zeyple/blob/master/zeyple/zeyple.py # Download configuration file wget https://github.com/infertux/zeyple/blob/master/zeyple/zeyple.conf.example # Set up a directory under /etc for configuration file and key management mkdir -p /etc/zeyple/keys && chmod 700 /etc/zeyple/keys && chown zeyple: /etc/zeyple/keys # Fetch the public key from the keyserver for $EXT_ADDRESS and import with gpg sudo -u zeyple gpg --homedir /etc/zeyple/keys --keyserver $KEYSERVER_ADDRESS --search $EXT_ADDRESS # Move the example configuration file to /etc/zeyple mv zeyple.conf.example /etc/zeyple/zeyple.conf # Move zeyple.py to /usr/local/bin and apply user rights mv zeyple.py /usr/local/bin/zeyple.py chmod 744 /usr/local/bin/zeyple.py && chown zeyple: /usr/local/bin/zeyple.py # Create logfile and set user rights touch /var/log/zeyple.log && chown zeyple: /var/log/zeyple.log # Prepare Postfix for Zeyple: expand main.cf and master.cf to include filter entries cd /etc/postfix cat >> master.cf <> main.cf <> recipient_canonical<> main.cf <