post_install_sid: Ensure Postfix only listen on localhost.

This commit is contained in:
gardouille 2015-11-22 19:13:38 +01:00
parent 1a8046bf51
commit 27c7b7776b
3 changed files with 8 additions and 0 deletions

View File

@ -29,6 +29,7 @@
* Update README.md
* Disable BackupPC installation until a good configuration for BackupPC, Apache2/Nginx and Postfix.
* Disable OpenSSH-Server: A workstation doesn't really need a SSH server.
* Ensure Postfix only listen on localhost.
### 0.3.0

View File

@ -298,6 +298,7 @@ iface enp0s25 inet dhcp
##### Configuration
* Ensure to forward root's mail to new user email address.
* Ensure Postfix only listen on localhost.
#### Internet tools for X11

View File

@ -594,6 +594,12 @@ if [ ! "$(grep "root: .*${new_user_mail}" /etc/aliases)" ]; then
sed -i "s/^root: /root: ${new_user_mail} /" /etc/aliases
newaliases
fi
# Ensure Postfix only listen on localhost
if [ -f /etc/postfix/main.cf ] && [ !"$(grep 'inet_interfaces = localhost' /etc/postfix/main.cf)" ]; then
sed -i 's/\(inet_interfaces\).*/\1 = localhost/' /etc/postfix/main.cf
systemctl restart postfix
fi
###########################################################
###########################################################