Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)

Status
Not open for further replies.

cejohnsonsr

Technical User
Sep 11, 2010
14
US
I followed Life With qmail for installation on a Compaq laptop running Ubuntu 10.04.01 64 bit.

Everything went fine until testing. All of the local send & receive tests succeeded. I can receive mail from from a remote host (my yahoo account).

Testing outbound mail failed. I cant get any mail delivered off of my own local network. The error from the log /var/log/qmail/current is:

Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)

I've read all I could find, but nothing seems to apply. I'm pretty sure it has to do with the /etc/tcp.smtp file. I'm not sure how to adjust that. I've tried a couple of entries that didn't work, but then again, I'm not certain how entries should be formatted. The only example I've found is the one in LWQ & it doesn't offer much in the way of explanation. If there is other documentation I haven't found it.

Hope someone can help.

Thanx,

Ed
 
The error message is a little vague, but seems to indicate a refusal on the part of the recipient to accept your mail. Is your network connection perchance a dynamic IP from your ISP? If so, this may be why you are being blocked. Some providers, yahoo being one that comes to mind won't accept mail from a server running a dynamic IP address. I think that hotmail is a little more forgiving with regards to the connecting servers, so you might want to try that. Another possibility is that you are on a RBL (run time black list). You might want to do some domain checking against things like spamcop to make sure you are not.

One thing to try that would at least give you more insight is to try to telnet into your yahoo account and use the credentials that would be supplied by your server.
 
Well I'm not on Spamcop's blacklist.

The ip address of the server is private but the ip of the router is public. I had a friend telnet into my server on ports 25 & 80.

I was able to connect to a couple of different smtp mail servers on port 25 so I don't think port blocking is the problem.

I wasn't able to get very far that way because I'm not that good with manual email yet (again). I got the ehlo & mail from: & rcpt to: & data commands through ok. When I try to input some text I get an error:

501 Failure No message body set g_allow_bodyless TRUE, or fix faulty mail client

The commands after data were:

subject: test
some text here for a test
. <------- Error came after the full stop on a line by itself.

I'm not all that good with manual mail commands. I haven't tried any of this in several years.

If anyone wants to work through this with me, I promise I'm not too stupid (or proud) to follow instructions (& learn).

I'd still like to know what the entries in tcp.smtp are supposed to look like & hopefully be able to figure out which entries would be appropriate for my network.

Thanks again for any help.

Ed
 
Ok, we've ruled a couple of things out. That is good. Using a private IP for the computer and a public IP on the router will work just fine. You didn't mention if the public IP is static or dynamic. If it is a dynamic IP that could be your problem and if it is one way to rule that out would be to relay your mail through your ISP's SMTP server. If you do, mail will still be sent and received by your server, it will just use your ISP as the first hop so that other MTAs will accept it.

As far as the telnet goes, how far did you get with telnet into sending yourself something via yahoo?

For the commands, the list should go like this:
1: EHLO your.domain
2: MAIL FROM: you@your.domain
3: RCPT TO: you@your.yahoo.address
4: DATA
5: SUBJECT: put the subject here
6: Now, press enter 2 times. You won't see a response.
7: Now, type the subject
8: Put the period (.) on the blank line.
9: QUIT

Each valid step should give you a 220 code. These should be the steps that your server goes through when connecting to Yahoo and hopefully you will see the same error code so that we can tell what step is the problem.

Anyway, hang in there and keep at it. It has been both my experience and observation that getting mail servers up and running takes a lot of trial and error.

Note, I just tested the above procedure on my own server and it worked with the exception of the subject appearing.


 
Well I was able to send myself an email via telnet per your instructions. I can't get connected to a Yahoo mail server. So I'm guessing port 25 isn't blocked. At least for now. My ISP is in the process of switching all accounts to IMAP on a gmail server. The server I just telneted to won't be there much longer. I'd feel a lot better if I could get connected to a server other than the one my ISP uses.

Also, qmail still isn't able to establish an SMTP session with ANY mail server. No outbound mail from qmail-send.

I'm really at a loss here. Everything but outbound mail works as advertised. I can telnet out on port 25. I've had a friend telnet in on port 25. I've scanned from the inside & been scanned from the outside & port 25 always shows open.

If anyone has any ideas I'm completely open to suggestion.

Ed
 
When you tried to connect to yahoo via telnet, where did it fail and what error message did you get?

Go to this site: and do a lookup of your IP. Does it tell you that your IP is static or dynamic?

If it does NOT say static, most ISPs will NOT accept your mail.

What address are you using to try and telnet into yahoo? I tried yahoo.com on port 25 and received nothing. If you use smtp.mail.yahoo.com you will get an "530 authentication required - for help go to notice when you try.

I just sent myself a message to my yahoo account and it used the following: g.mx.mail.yahoo.com [98.137.54.238] :25 which appears to be their inbound server.

This brings up another possibility: does your email server have access to a proper DNS that will obtain the MX records (ie, the mail servers)? What address is it trying to connect to when it makes a connection to yahoo?
 
Ok. I got an email to go outbound. Finally!!!! I had to enter a relay server in smtproutes. I really didn't want to do that. I would much prefer that outbound mail be routed via DNS lookup. That will be the subject of my next question, which I will post as:

DNS vs. SMTPROUTES?

Ed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top