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'm trying to send emails through my server but it's not working.

I just setup this server and it's running ubuntu 10.04 lts

When I try to send an email it's telling me

Unable to connect to mail server: Connection refused(111)

I have no idea what to do.

Thanks :)

share|improve this question
up vote 1 down vote accepted

1) stop your firewall 2) post the output of "telnet localhost 25" 3) what mailserver are you using? post the conf file.


share|improve this answer
I'm a complete noob and have no idea how to disable my firewall (i forget which one i installed as a matter of fact) Don't know what mail server im using, no idea how to post the config file or the output of telnet llocalhost 25 :D Sorry I've never done this stuff before :( – Belgin Fish Jul 23 '10 at 17:07

If you google for "Ubuntu 10.04 disable firewall", you will find this page which says that you can run:

sudo ufw disable

to disable the firewall. This needs to be done from a Terminal. The documentation about using the terminal is quite helpful, and tells you how to open one if you don't know already. You can also type 1kstep's command there:

telnet localhost 25

and show the output that they requested. If you connect successfully then you can quit telnet again by pressing Ctrl-] (hold Ctrl, tap ] once, release Ctrl), then enter, then Ctrl-d.

Read the Ubuntu documentation on Postfix. Near the top of that page it says that the configuration file is stored at /etc/postfix/ You can open this file in gedit and then copy & paste the configuration.

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.