Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions conf/turnkey.d/postfix-local
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/bin/bash -e

if [[ ! "$HOSTNAME" ]]; then
echo "'$(basename "$0")' error: hostname not defined"
return 1
fatal() { "'$(basename "$0")' Error: $*" >&2; exit 1; }

if [[ -z "$HOSTNAME" ]]; then
fatal "Hostname not defined"
fi

if grep -q ':25' <(ss -tlnp); then
fatal "Port 25 is already in use - must be available to set up postfix"
fi

postconf -e inet_interfaces=localhost
Expand Down