mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-31 07:09:57 +02:00
refactoring: split helper functions into smaller scripts (#2420)
This commit is contained in:
parent
2927cc47c7
commit
b61dfe1e24
41 changed files with 389 additions and 396 deletions
|
@ -1,7 +1,7 @@
|
|||
#! /bin/bash
|
||||
|
||||
# shellcheck source=../scripts/helper-functions.sh
|
||||
. /usr/local/bin/helper-functions.sh
|
||||
# shellcheck source=../scripts/helpers/index.sh
|
||||
source /usr/local/bin/helpers/index.sh
|
||||
|
||||
DATABASE=${DATABASE:-/tmp/docker-mailserver/postfix-relaymap.cf}
|
||||
|
||||
|
@ -32,8 +32,8 @@ DOMAIN="${1}"
|
|||
HOST="${2}"
|
||||
PORT="${3}"
|
||||
|
||||
[[ -z ${DOMAIN} ]] && { __usage ; errex 'No domain specified' ; }
|
||||
[[ -z ${HOST} ]] && { __usage ; errex 'No relay host specified' ; }
|
||||
[[ -z ${DOMAIN} ]] && { __usage ; _errex 'No domain specified' ; }
|
||||
[[ -z ${HOST} ]] && { __usage ; _errex 'No relay host specified' ; }
|
||||
[[ -z ${PORT} ]] && PORT=25
|
||||
|
||||
if grep -qi "^@${DOMAIN}" "${DATABASE}" 2>/dev/null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue