Mod:Postfix Updated Config.sh
fixed mkdir, various typos and existing CMS/site detection
This commit is contained in:
@@ -37,10 +37,9 @@ EOF
|
||||
##--------------##
|
||||
|
||||
adduser postfix opendkim
|
||||
mkdir /etc/opendkim/keys
|
||||
mkdir -p /etc/opendkim/keys
|
||||
chown opendkim:opendkim /etc/opendkim/keys -R
|
||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/config/opendkim.conf -o /etc/opendkim.conf
|
||||
dkimname sed 's/\..*$//' <<< "$url"
|
||||
cat <<EOF > /etc/opendkim/TrustedHosts
|
||||
127.0.0.1
|
||||
::1
|
||||
@@ -60,7 +59,7 @@ if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
$odksec=$(sed 's/\..*$//' <<< $hostname)
|
||||
odksec=$(sed 's/\..*$//' <<< $hostname)
|
||||
sudo --user opendkim mkdir /etc/opendkim/keys/"$hostname"
|
||||
sudo --user opendkim opendkim-genkey -r -D /etc/opendkim/keys/"$hostname" -d "$hostname" -s $odksec
|
||||
echo ""$odksec"._domainkey."$hostname" "$hostname":"$odksec":/etc/opendkim/keys/"$hostname"/"$odksec".private" >> /etc/opendkim/KeyTable
|
||||
@@ -84,8 +83,9 @@ systemctl start postfix opendkim
|
||||
systemctl enable postfix opendkim
|
||||
|
||||
#if using Append module run for existing cms/sites
|
||||
if [ -z "${postfixappended}" ]; then
|
||||
for sitename in /etc/ICTM/sites/*; do
|
||||
if [ ! -z "${postfixappended}" ]; then
|
||||
for file in /etc/ICTM/sites/*; do
|
||||
sitename="${file##*/}"
|
||||
domain=${sitename//_/.}
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/appendCMS-preconf.sh)
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/appendCMS-conf.sh)
|
||||
|
||||
Reference in New Issue
Block a user