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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to receive incoming mail thru qmail 1

Status
Not open for further replies.

techtalk

IS-IT--Management
Oct 20, 2002
2
US
Hi Folks
I have qmail running on my Redhat linux 8.0 Pentium box. I have a dedicated IP address for my machine. The outgoing email works fine. The incmong email from outside never gets in. I checked the maillog file for qmail and there is no activity there.

I also have changed my firewall settings using lokkit to allow for SMTP incoming mail.

Don't know what else to do.

Any suggestions are greatly appreciated.

Thanks a lot.

yogi
 
a) Run "ps aux" to make sure qmail is running; you should see a list of program like:

qmail-send
qmail-smtpd
qmail-lspawn
qmail-rspawn
qmail-clean

.. also run and "netstat -na" to make sure qmail is listening on port 25. On a BSD System, it would show a line that looks like:

tcp4 0 0 *.25 *.* LISTEN

Linux is probably a little different.. but you should see a line that shows it is listening on 25.

b) Make sure you can connect to your machine from outside. You can try connecting from localhost first, to make sure Qmail itself is accepting connections:

# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.domainname.com.
Escape character is '^]'.
220 domainname.com ESMTP
quit
221 domainname.com
Connection closed by foreign host.

c) If you tried step B and it worked fine, you need to try to connect from a REMOTE location.. from another machine. If you have a shell on a machine somewhere else, try repeating the connection test from there.

If this fails, it is one of two things: Either you have incorrect firewall rules between your machine and the outside world somewhere, or your ISP filters incoming port 25 connections. Some ISP's block outgoing port 25 to stop spammers, but usually not incoming. It's best to check though; some block it so you wont run any servers. You need to call your ISP and ask them if they do block port 25 connections. Some do. If they do, you need to get an exemption from them or it obviously wont work.

d) If you tried step C and you could connect to the mailserver from outside, but are still not recieving mail - you need to check your DNS records and make sure you have an MX entry. For example:

jshanley@who:~/ > host -t mx domainname.com
domainname.com mail is handled (pri=10) by mail.domainname.com
domainname.com mail is handled (pri=20) by mailq.domainname.com

If you dont see at least one ".. mail is handled by.." line when you run "host -t mx domainname.com", you've forgotten to add an MX record for mail to your DNS. You need to add one before other servers know where to deliver your mail. For example:

mail.domainname.com A 1.2.3.4
domainname.com MX 10 mail.domainname.com

A complete explanation of how to setup DNS and MX records is outside the scope of this answer; there are plenty of DNS resources on the web. Hope this helps; if you still can't solve the problem, send more detail and I'll take a look.

-J


 
Hi J
Thanks a lot for the detailed answer.
Checked for ps aux|grep qmail and it seems to be running.
I did the netstat -na|grep 25 and got the following response.
unix 2 [ ACC ] STREAM LISTENING 2111 /tmp/orbit-yogi/linc-41b-0-3916a369325a5
unix 2 [ ACC ] STREAM LISTENING 2312 /tmp/orbit-yogi/linc-426-0-251cd0e85647c

Tried telnet localhost 25 and got the following response.
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

So there is no point going any further than this.

I feel really stuck. Any ideas? I have tried disabling the firewall as well allowing for incoming mails. Nothing seems to work.

Really appreciated.


 
unix 2 [ ACC ] STREAM LISTENING 2111
unix 2 [ ACC ] STREAM LISTENING 2312

Looks like something is listening on port 2111 and port 2312, but Qmail does not normally use those ports; it wants to use port 25/tcp.

You might want to look at your qmail logs to see if Qmail is generating errors. Usually, those logs would be at:

/var/log/qmail/current
/var/log/qmail/smtpd/current

So you could do:

tail /var/log/qmail/current (and)
tail /var/log/qmail/smtpd/current

.. to see the last few lines of each logfile.

Remember, the location of your logfile(s) depends on if you followed the instructions at LifeWithQmail.org or if you did something different. I would strongly suggest following the directions at


- because they are proven to work. You could always go back and re-adjust the system later after you get it working.

Also, I'd go back and edit your post above, and remove your IP number from the public messageboard. You never know who's reading. :|

Feel free to email me if you need more help. ( tektips@wiretapped.us ) .. it'll automatically forward to my normal mailbox.

-J
 
techtalk,
Try to telnet the email server from outside network not internally.
Secondly, try not to telnet "localhost" because qmail might have binded to your particular IP address to listen therefore telneting localhost won't work,
Try,
# Telnet <Mail server's IP> 25
And wait for the greeting message( don't forget, not from inside, from outside)
We need to confirm if this is a internal or external firewall issue first.
 
I follow all the steps from a to d, everything seems ok.
I have no firewall -F, nothing in hosts.allow and hosts.deny
I can POP3 email from server.
I can send via shell account.
I can telnet to port 25, i can use &quot;HELO&quot;,&quot;MAIL&quot;,&quot;RCPT&quot; and &quot;DATA&quot;, but after few mins, email reject back to sender,
I have nothing in logs /var/log/qmail/smtpd?
Outlook to smtp is dead.

Don't know why?
 
I'm having the same problem. I can telnet localhost 25 internally, but external machine can't telnet. Checked that TCP is listening to 25. qmail is running. But I noticed that my MX record has nothing, not even one line. Could it be the problem cause?
 
check your firewall settings, ipchains -F should clear them all. Then try again and post back.
 
I'm actually a newbie. using RH9, I don't know where to find ipchains and firewall.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top