post_install_sid: Ensure Postfix only listen on localhost.
This commit is contained in:
parent
1a8046bf51
commit
27c7b7776b
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
###########################################################
|
||||
|
||||
###########################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user