Skip to content

Instantly share code, notes, and snippets.

@lepinkainen
Last active December 26, 2015 04:49
Show Gist options
  • Save lepinkainen/7096456 to your computer and use it in GitHub Desktop.
Save lepinkainen/7096456 to your computer and use it in GitHub Desktop.
Have postfix listen only to loopback interface
# Keep postfix running
service { "postfix":
ensure => 'running',
enable => 'true',
}
# Allow connections from localhost only
augeas { "postfix_localhost_only":
context => "/files/etc/postfix/main.cf/",
changes => [
"set inet_interfaces 127.0.0.1",
],
notify => Service['postfix'], # Restart postfix service if configuration changes
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment