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 :)


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


  • 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 :( 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/main.cf. You can open this file in gedit and then copy & paste the configuration.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.