#!/bin/bash #---------------- # Testing postfix #---------------- set -e # reconfigure postfix debconf-set-selections <<< "postfix postfix/mailname string localhost" 2>&1 debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'" 2>&1 # install and modify hostname localhost apt-get install -y postfix 2>&1 hostname --fqdn > /etc/mailname service postfix restart 2>&1 python3 `dirname $0`/test-postfix.py 2>&1 # Check set-permissions postfix set-permissions