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 try install Mail server on Ubuntu, I've installed dovecot server.

  • telnet localhost 110 - correct
  • telnet 110 - correct

When I send email:

echo "Testicek" | mail -s "Dovecot test"

And connect to the box, I found it, so it's correct.

But when I send email from outside (forexample Gmail), to is returned:

The recipient server did not accept our requests to connect. Learn more at [ (1): Connection refused]

In log isn't something error, so I don't know where I can find problem, but I think so, it can be in setting of domain:

   1800 A 31.31.73.***
 * 1800 A 31.31.73.***

Subdomains is correctly serving on apache (LAMP stack) and send email via Squirrelmail was resulted correct domain too.

share|improve this question
Do you actually have an MTA installed? – womble Aug 25 '11 at 9:57
I've installed Postfix – frosty22 Aug 25 '11 at 10:21
Maybe I found problem - when I try telnet localhost 25, it's correct, but from outside telnet 25, it's return Connection refused, but for telnet 110 its correct too – frosty22 Aug 25 '11 at 10:25

I am no postfix or ubuntu expert, but I see the same thing often on CentOS with sendmail; for security, the MTA is configured not to listen on any address other than localhost by default.

This thread suggests that the trick is to change the line

inet_interfaces = all

in /etc/postfix/

Frosty, it might be worth your reading around a bit to discover the distinction between sending email, which is done via the MTA, and reading email, which is usually done with a POP and/or IMAP daemon. The two functions are almost completely unrelated to each other, and you may find maintaining your mail server is easier if you do some background reading on which daemon(s) provide which service.

share|improve this answer
Thanks, I make dpkg-reconfigure postfix, and now I have inet_interfaces = all, but it still not work ;( Only from localhost it works, echo "Testicek" | mail -s "Next test" – frosty22 Aug 25 '11 at 13:32
I make dpkg-reconfigure postfix and now it works, but I think that setting is same - I don't know hot, but it works :) Thanks all! – frosty22 Aug 25 '11 at 15:45

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.