Last active
November 5, 2016 15:32
-
-
Save dmitriysafronov/e962fec446c342006f20c5e35ec97c2e 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
#!/bin/bash | |
if [[ -z "$(hostname -d)" ]]; then | |
echo "Set up FQDN first!" | |
exit 0 | |
fi | |
echo "postfix postfix/mailname string $(hostname -f)" | debconf-set-selections | |
echo "postfix postfix/destinations string \$myhostname, $(hostname -s), localhost" | debconf-set-selections | |
echo $(hostname -f) > /etc/mailname | |
postconf -e "myhostname= $(hostname -f)" | |
postconf -e "mydestination= \$myhostname, $(hostname -s), localhost" | |
postconf -e "compatibility_level= 2" | |
service postfix reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment