Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

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 '127.0.0.1' 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
add comment

Your Answer

 
discard

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