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
netstat -tunlp | grep :25
(No info could be read for "-p": geteuid()=1000 but you should be root.)
tcp        0      0    *               LISTEN      -
tcp6       0      0 :::25                   :::*                    LISTEN      -

i am having problem sending mails with postfix. I can send it by SSL and port 465 but not with port 25. When I use port 25 i can't get any error in /var/log/mail.log or mail.err

Port is opened:

telnet 25
Connected to
Escape character is '^]'.
220 ESMTP Postfix

when i send by roundcube mail i get this:

Jul 15 10:06:07 ubuntu-server postfix/smtpd[9272]: lost connection after UNKNOWN from localhost[] Jul 15 10:06:07 ubuntu-server postfix/smtpd[9272]: disconnect from localhost[]

generally error

SMTP Error (-1): Connection to server failed


my /etc/hosts      localhost        ubuntu-server

what can be wrong? Is etc/hosts correct?

share|improve this question
You can connect to your server on port 25, the telnet shows us that, and Postfix is listening. What happens when you try to send a mail? It probably gives your client an error message. – Ladadadada Jul 14 '12 at 21:55
in roundcube i get SMTP Error (-1): Connection to server failed. – senzacionale Jul 15 '12 at 7:55
Can you, from the server, telnet out to a mail server on 25 just to make sure that there's nothing else in the chain that's blocking the SMTP traffic? – gravyface Jul 15 '12 at 13:42
up vote 4 down vote accepted

I think you've typoed in a config file. See what I get when I do:

[madhatta@risby iplayer]$ telnet 25
Connected to
Escape character is '^]'.
220 ESMTP Postfix

Note the incorrect spelling of the domain name in the ESMTP header. If your server really does believe that it's the authoritative mail repository for, it'll probably refuse to accept mail for, because it'll regard that as foreign traffic and thus relaying. When sending via SSL, you're probably also doing SMTP AUTH, and would therefore be allowed to relay. Though who knows what it's doing with mail it then accepts for your real domain?

If this does turn out to be the correct explanation, may I applaud you for not obscuring the domain name in your original question. That's a common enough practice on SF, but it's deeply annoying to those of us who'd like to help, as it blinds us to many channels of investigation.

share|improve this answer
Let me second that applause. It's so very much easier to help when you have the full data. – Jenny D Jul 15 '12 at 9:54
@MadHatter sorry domain is I changed sudo hostname but I still can not send mails in port 25. What must be my /etc/hots file maybe is here problem? – senzacionale Jul 15 '12 at 10:27
+1 for applauding – adamo Jul 15 '12 at 10:47
+1 for +1ing the applause. – gravyface Jul 15 '12 at 13:41

Most likely your Internet Service Provider is blocking outgoing connections on port 25. This is very common with residential cable and ADSL connections.

share|improve this answer
we have business conections and it works until 3 days ago. Now we changed domain and it sop working... – senzacionale Jul 15 '12 at 7:34
Did you actually ask your ISP? Maybe they changed something on the same day. – Michael Hampton Jul 15 '12 at 13:51

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.