Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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, etc. is correcly on apache (lamp) and send email via Squirrelmail is correct too.

Thanks for help!

share|improve this question

Port 110 is for POP3 which is only relevent for connecting to a POP3 server for downloading email.

For email to land on your server, you're talking about SMTP. This is what both your client and external relays use to move messages around the internet. SMTP uses port 25.

Dovecot has nothing to do with how emails land on your server. For this you need a Mail Transfer Agent like postfix. This is a SMTP server that will listen for external connections and route emails accordingly.

Install that from the command line (it'll walk you through some configuration options). You'll want to research the configuration because it can get a little complicated and you don't want to be an open relay (that is, you only want to accept email for your domains, and not forward on emails from spammers)

share|improve this answer
Yes, I have installed postfix. 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:26
Sounds like postfix or the firewall is the issue then. Assuming the firewall isn't an issue, you can reconfigure postfix with sudo dpkg-reconfigure postfix. Pick Internet site and make sure you specify the domains you want to handle email for. – Oli Aug 25 '11 at 11:35
Thanks, I make reconfigure, but it still dont work ;( Only from localhost 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

I've got the same problem: can receive mails and consult them only if they are sent from the same machine on which run the mail servers. I solved it by adding a MX record in the DNS which indicates that all should be routed to the mail server at 14400 IN MX 0
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.