Forum OpenACS Q&A: qmail problem

Collapse
Posted by Luis Garcia on

I have been trying to send e-mail from and to my server and I always get the same result... or the same error I should say:

Sorry, I wasn't able to establish an SMTP connection. (#4.4.1)

That happens when I send an e-mail to my yahoo account and when I send and e-mail from my yahoo account to my server.

I already know that the server IS running because the stat command went well. I also know that my firewall is open on ports 25 and 110. So that should be fine. The only thing I'm not sure about is wheter my domain name config is fine.

The configuration of myserver is this (change the assumed names for whatever you want):

Server name: home

Domain name: myname.com

I have this in the following qmail files:

file "locals": home.myname.com

file "me": home.myname.com

file "plusdomain": myname.com

file "rcpthosts": home.myname.com and I also put myname.com

This has been puzzling me for days and I woul like to fix it and have my e-mail working.

Thanks!

Collapse
2: Re: qmail problem (response to 1)
Posted by Luis Garcia on

Ok, I just found something else. I did netstat -l and got:

Proto Recv-Q Send-Q Local Address Foreign_Address State

tcp 0 0 localhost:smtp *:* LISTEN

Now, should I be getting that or myname.com:smtp?

Collapse
3: Re: qmail problem (response to 1)
Posted by Luis Garcia on
Don't know if this says something to someone; but I did this

home:~ # telnet localhost 25

and this is what I got:

Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 home.myname.com ESMTP Postfix

However, when I do telnet 192.168.1.2 25 it does not connect.

Hope that helps.

Collapse
4: Re: qmail problem (response to 1)
Posted by Victor Guerra on
I guess that you have another MTA Installed on your system, in this case it looks like POSTFIX is installed.

So stop the service of the MTA that its installed and then unistall the MTA, then removed the sendmail symbolic links, usually located in /usr/lib/sendmail and /usr/sbin, and then create the symbolic links but now pointing to the qmails's sendmail.

You have to doble check that exim, exim4, sendmail arenot instatlled as well.
After this restart, your service and try again to telnet to your mail server in port 25 and you shuold have something like:
% telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.yourdomain.com ESMTP

then type ehlo localhost

250-mail.yourdomain.com
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-STARTTLS
250-PIPELINING
250 8BITMIME

I hope this helps you :)

Regards,
Victor Guerra.

Collapse
5: Re: qmail problem (response to 1)
Posted by Luis Garcia on

OK, I did what Victor suggests. I am able to see this now:

% telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.yourdomain.com ESMTP

But when I do this

ehlo localhost

I get this:

bash: ehlo: command not found

So, I did not install something or I am missing that command.

I still don't know what is going on since I do this test:

% telnet 127.0.0.1 25

Trying 127.0.0.1...

Connected to 127.0.0.1.

Escape character is '^]'.

220 domain ESMTP

helo dude

250 domain

mail my_name@domain

250 ok

rcpt my_name@domain

250 ok

data

354 go ahead

Subject: testing

This is a test.
.

250 ok 812345679 qp 12345

quit

221 domain

Connection closed by foreign host.

%

and it all went well. Now where do I find my e-mails?

Also, I've done this:

% echo to: mailto:lgarcia3@yahoo.com | /var/qmail/bin/qmail-inject

and I have never gotten anything in my yahoo e-mail from my server??? ... this is !@#$%^& frustrating!

Last, but not least, is that I created the links and I was not sure neither how to call them nor where to make them point to. So I called them sendmail and they point to folder:

/qmail/supervise/qmail-send

Is this correct?

Anyway, thanks for any help.

Collapse
6: Re: qmail problem (response to 1)
Posted by Luis Garcia on
Well, let me correct something. When I do

ehlo localhost

I actually do get a response like this:

250-myserver.domain.com
250-PIPELINING
250 8BITMIME

So I guess it is fine then

Collapse
7: Re: qmail problem (response to 1)
Posted by Luis Garcia on

But I still need help with all the others! :)