Super User is a question and answer site for computer enthusiasts and power users. 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 am using postfix for outgoing mails (collection from machines on and forwarding to my ISP's mail machine) and I have trouble accessing postfix for sending mails. The machine I use for postfix is a debian system, kernel 2.6.32, squeeze (it's also my squid proxy).

There are probably many reasons why postfix might not work as desired, but I'd like to rule out settings in hosts.allow or hosts.deny. Thus, my question:

Does postfix have its own way to listen for mails (in the same way, for example, squid has for listening on, port 3128 or 8080 as configured in squid's own config files), or do I have to enable something system-wide, e.g. by modifying hosts.allow or hosts.deny?

Some more details along my main question:

  • hosts.allow contains

  • hosts.deny contains

  • ping or ssh to the postfix machine run just fine.

  • Squid, on the same machine, listens as it should; telnet to the http ports 3128 or 8080 is o.k.:
    $ telnet 3128
    Connected to
    Also, squid runs just fine as a proxy.

  • Telnet to port 25 is not successful:
    $ telnet 25
    telnet: Unable to connect to remote host: Connection refused

  • DNS lookup seems to be o.k., too: For instance, both squid and apt-get find everything they need.

Am I correct when I assume that postfix itself will start listening on port 25 once its is set up correctly and hosts.allow/.deny have nothing to do with it?

share|improve this question
up vote 2 down vote accepted

using hosts.allow or host.deny means white- and blacklisting of hosts. You should try empty files if your other roles are fine.

Check your config:

  • What is the output of the command postconf -n?

  • Can you access your machine via ssh and ping? (is your network connection fine?)
  • Can you telnet your machine on port 25? (postfix listens usually on port 25)
  • Does your DNS-lookup work (on the postfix machine)?
share|improve this answer
Thanks. I am still looking into postfix', but I have put more info into the original question to address the issues you listed. – zebonaut Dec 18 '11 at 11:43
an output of postconf -n should help contributers very well. – ppuschmann Dec 21 '11 at 16:36
For some reason, the command postconf does not exist with my installation of postfix (debian 2.6.32). Anyhow, thanks for answering the particular question; indeed, no changes to hosts.allow/.deny were necessary; what fixed the problem was making sure that in, the home subnet is mentioned along "mynetworks", and the network interface connected to the home subnet is mentioned along "inet_interfaces". – zebonaut Dec 23 '11 at 17:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .