Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set up Postfix in a local development environment and do not want mails to go out of the local network; nor do I want Postfix to expect mail coming in from outside of the network. I changed inet_interfaces = localhost, but mail is still being sent outside of the network, even after restarting Postfix.

OS: Ubuntu 9.10

Any ideas?

share|improve this question
up vote 1 down vote accepted

You can set the interface it binds to when attempting to send messages with smtp_bind_address and have it bind to '' so that when it attempts to connect anywhere it'll fail. However this will simply cause the mail to defer until it gives up (5 days be default if I recall correctly).

The better solution is to set mydestination to the local domains it should allow mail for, and then change smtpd_recipient_restrictions to permit_auth_destination and nothing else. This will cause postfix to reject all mail that isnt destined for local delivery, no matter who is sending it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.