Created
November 11, 2020 18:09
-
-
Save dkittell/46c1e1403294a23cc3315cd14b723915 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# View current configuration | |
cat /etc/postfix/main.cf | grep inet_interfaces | |
# Backup current configuration to a date/time stamp formatted file | |
sudo cp /etc/postfix/main.cf /etc/postfix/main_`date +%Y_%m_%d_%H.%M.%S`.cf | |
# Make the change | |
sudo sed -i "s|inet_interfaces = all|inet_interfaces = 127.0.0.1|" /etc/postfix/main.cf | |
# Review the current configuration | |
cat /etc/postfix/main.cf | grep inet_interfaces | |
# Restart the service | |
sudo systemctl restart postfix | |
# Get the service status | |
sudo systemctl status postfix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment