Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 want to make Postfix unable to receive mail. I just want to be able to send mail with Postfix, not the other way around. Is that possible? If so, can anyone tell me how to do that? Thanks.

share|improve this question
up vote 6 down vote accepted

Inside your (/etc/postfix/)

inet_interfaces =

This way it only listen to localhost (via loopback). Make sure you restart (or reload) the server after change.

share|improve this answer
Setting it to loopback-only would be better, as that includes IPv6 too (if ipv6 is enabled in inet_protocols). Using is not a problem here, but I myself do care about such things. – grawity Oct 13 '09 at 13:21
Thanks. This is what I ended up doing. Basically, my clients are using Google Apps and I need postfix just for the PHP mail() command. Thanks again. – willbeeler Oct 13 '09 at 15:40
This does not prevent postfix from receiving mail from localhost. – user130370 Nov 17 '12 at 20:43
dpkg-reconfigure postfix

Choose satellite system.

Provide your ISP's smtp server as the smarthost.

Preferrably choose a valid domain name to mask local adresses.

When asked about which subnets to listen on, provide only the loopback interface's

Similarly, only provide localhost (and optionally the hostsname) as final mail destination.

The system will now support a minimum of local mail delivery, accept no mail from external hosts and send all outgoing mail through the smarthost.

share|improve this answer

you can also block the incoming port 25 with iptables

share|improve this answer
swatting flies with a sledgehammer.. I like it... :) – falstro Oct 13 '09 at 17:13
LOL @ roe. I'm sure it works though. :D – willbeeler Oct 15 '09 at 17:19

Coolwater and Roy are correct, by default 'Satellite' will still internally deliver full addresses for your own hostname. This is wrong for anyone with third party or external MX records. Many options available in reconfigure are not available during install.

So if you want mail to 'fred' to be delivered locally but not fred@my.domain.ext then edit mydestination in /etc/postfix/ or possibly /usr/share/postfix/

mydestination =, localhost

and (to strictly address the question) only send fully qualified mail. The system may still send local mail (cron output etc.) but handling these (aliases, redirection, masquerading, /dev/null) is beyond the scope of the OP's question.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.