added tagfile and make use of it in modules

This commit is contained in:
2021-12-15 10:55:18 +01:00
parent 925d32c2b6
commit a79d079cac
15 changed files with 81 additions and 31 deletions

View File

@@ -13,7 +13,7 @@
# * MAIL_RELAY: Name of the mail relay server
# ------------------------------------------------------------------------------
export VER_conf_mail="0.0.4"
export VER_conf_mail="0.0.5"
export DEP_conf_mail="upgrade_dist"
conf_mail()
@@ -21,11 +21,17 @@ conf_mail()
prnt I "Installation de postfix..."
pkginst postfix
local pfmain="/etc/postfix/main.cf"
prnt I "Configuration de postfix..."
installfile postfix/main.cf /etc/postfix/main.cf
installfile postfix/main.cf $pfmain
tagfile $pfmain
sed -i -e "s/@HOSTNAME@/$HOSTNAME/" -e "s/@REALM@/$REALM/" \
-e "s/@MAIL_RELAY@/$MAIL_RELAY/" /etc/postfix/main.cf
-e "s/@MAIL_RELAY@/$MAIL_RELAY/" $pfmain
tagfile /etc/mailname
echo $HOSTNAME.$REALM > /etc/mailname
svc_restart postfix
}