Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using postfix for outgoing mails (collection from machines on 192.168.1.0/24 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 192.168.1.0/24, 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
    ALL: 192.168.1.0/255.255.255.0

  • hosts.deny contains
    ALL: PARANOID

  • 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 192.168.1.1 3128
    Trying 192.168.1.1...
    Connected to 192.168.1.1.
    Also, squid runs just fine as a proxy.

  • Telnet to port 25 is not successful:
    $ telnet 192.168.1.1 25
    Trying 192.168.1.1...
    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 main.cf is set up correctly and hosts.allow/.deny have nothing to do with it?

share|improve this question

1 Answer 1

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' main.cf, 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 main.cf, 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

Your Answer

 
discard

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.