Update linupx-scripts.sh
This commit is contained in:
@@ -478,8 +478,10 @@ POSTFIX_INSTALL(){
|
|||||||
case "$choice" in
|
case "$choice" in
|
||||||
[Nn]) INSTALL_MENU;;
|
[Nn]) INSTALL_MENU;;
|
||||||
* )
|
* )
|
||||||
|
echo
|
||||||
echo -e "${Green}Select default options upon install as config will be overwritten by script at the end${Color_Off}"
|
echo -e "${Green}Select default options upon install as config will be overwritten by script at the end${Color_Off}"
|
||||||
read -n 1 -s -p "Press any key to continue"
|
read -n 1 -s -p "Press any key to continue"
|
||||||
|
echo
|
||||||
|
|
||||||
$APTFUNC install -y postfix mailutils
|
$APTFUNC install -y postfix mailutils
|
||||||
cd /etc/postfix
|
cd /etc/postfix
|
||||||
@@ -489,11 +491,12 @@ POSTFIX_INSTALL(){
|
|||||||
echo -e -n "${idsCL[LightCyan]}Server is internal or external (I/e): ${idsCL[Default]}"
|
echo -e -n "${idsCL[LightCyan]}Server is internal or external (I/e): ${idsCL[Default]}"
|
||||||
read SERVERLOC
|
read SERVERLOC
|
||||||
|
|
||||||
|
if [ "${SERVERLOC}" = "" ]; then SERVERLOC=I; fi
|
||||||
|
|
||||||
mv /etc/postfix/main.cf /etc/postfix/main.cf.bak
|
mv /etc/postfix/main.cf /etc/postfix/main.cf.bak
|
||||||
|
|
||||||
case ${SERVERLOC} in
|
case ${SERVERLOC} in
|
||||||
[Ii]) wget https://git.schroedercity.com/voltron/Misc-Scripts/raw/branch/master/defaults/main.cf -O /etc/postfix/main.cf;;
|
[Ii]) wget https://git.schroedercity.com/voltron/Misc-Scripts/raw/branch/master/defaults/main.cf -O /etc/postfix/main.cf;;
|
||||||
|
|
||||||
[Ee])
|
[Ee])
|
||||||
echo
|
echo
|
||||||
echo -e -n "${idsCL[LightCyan]}Username for scity.us domain email: ${idsCL[Default]}"
|
echo -e -n "${idsCL[LightCyan]}Username for scity.us domain email: ${idsCL[Default]}"
|
||||||
@@ -506,6 +509,7 @@ POSTFIX_INSTALL(){
|
|||||||
echo "mail.scity.us ${USERNAME}@scity.us:${PASSWORD}" > /etc/postfix/sasl_passwd
|
echo "mail.scity.us ${USERNAME}@scity.us:${PASSWORD}" > /etc/postfix/sasl_passwd
|
||||||
sudo chmod 600 /etc/postfix/sasl_passwd
|
sudo chmod 600 /etc/postfix/sasl_passwd
|
||||||
sudo postmap /etc/postfix/sasl_passwd
|
sudo postmap /etc/postfix/sasl_passwd
|
||||||
|
sudo rm -f /etc/postfix/sasl_passwd
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -516,16 +520,12 @@ POSTFIX_INSTALL(){
|
|||||||
read pfhostname
|
read pfhostname
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ "${pfhostname}" = "" ]; then
|
if [ "${pfhostname}" = "" ]; then pfhostname=${hostname}; fi
|
||||||
pfhostname=${hostname}
|
|
||||||
fi
|
|
||||||
|
|
||||||
read -p "Default from email (portion before @scity.us, Default = \"${hostname}\"): " pffromemail
|
read -p "Default from email (portion before @scity.us, Default = \"${hostname}\"): " pffromemail
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ "${pffromemail}" = "" ]; then
|
if [ "${pffromemail}" = "" ]; then pffromemail=${hostname}; fi
|
||||||
pffromemail=${hostname}
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i "s/<<HOSTNAME>>/${pfhostname}/g" main.cf
|
sed -i "s/<<HOSTNAME>>/${pfhostname}/g" main.cf
|
||||||
sed -i "s/<<FROMEMAIL>>/${pffromemail}/g" sender_canonical
|
sed -i "s/<<FROMEMAIL>>/${pffromemail}/g" sender_canonical
|
||||||
|
|||||||
Reference in New Issue
Block a user