mirror of
https://git.myvelabs.com/docker/myvemail.git
synced 2025-12-17 21:26:19 +00:00
Moved whitelist ahead of policyd-spf check
This commit is contained in:
parent
8d70e17909
commit
d3377b860a
5 changed files with 22 additions and 60 deletions
33
01-setup.sh
33
01-setup.sh
|
|
@ -1,14 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
# Fill in the following variables
|
||||
appname= #google
|
||||
proxyurl= #http://webapps.kvm
|
||||
proxyport= #4000
|
||||
domain= #www.google.com
|
||||
mailver= #latest/stable
|
||||
|
||||
# Exit on any error
|
||||
set -e
|
||||
|
||||
# Fill in the following variables
|
||||
appname=${appname} # google
|
||||
proxyurl=${proxyurl} # http://webapps.kvm
|
||||
proxyport=${proxyport} # 4000
|
||||
domain=${domain} # www.google.com
|
||||
mailver=${mailver} # latest/stable
|
||||
|
||||
# Abort if variables are missing
|
||||
for var in appname proxyurl proxyport domain
|
||||
do
|
||||
if [ -z ${!var} ]
|
||||
then
|
||||
echo "Variable ${var} does not exist, aborting..."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Check for subdomain
|
||||
if [ $(echo ${domain} | awk -F . '{print $3}') ]
|
||||
then
|
||||
|
|
@ -19,13 +29,6 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Variable check
|
||||
if [ -z ${appname} ] || [ -z ${proxyurl} ] || [ -z ${proxyport} ] || [ -z ${domain} ]
|
||||
then
|
||||
echo "Missing variable, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Figure out nginx conf directory
|
||||
if grep -q 'include.*conf.d' /etc/nginx/nginx.conf
|
||||
then
|
||||
|
|
@ -133,7 +136,7 @@ MYVEMAIL_PORT=${proxyport}
|
|||
|
||||
# Optional
|
||||
# Version: latest or stable (defaults to latest)
|
||||
MYVEMAIL_VERSION=${mailver}
|
||||
MYVEMAIL_VERSION=${mailver:-latest}
|
||||
|
||||
# Additional mail domains separated by commas
|
||||
MYVEMAIL_ADDMX=
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue