LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   qmail not receiving mail sent from remote host (http://www.linuxquestions.org/questions/linux-software-2/qmail-not-receiving-mail-sent-from-remote-host-367519/)

ohcarol 09-27-2005 11:14 AM

qmail not receiving mail sent from remote host
 
Hi,

I have installed qmail in my redhat linux machine along with vpopmail so that I can provide mail account to my user. My problem is that I can receive mail in my maildir sent from localhost that is using my own smtp server. But mail sent from another remote host can't be recived by my mail server. Can you tell me what's problem in my qmail.

david_ross 09-27-2005 12:18 PM

Does your DNS addresses resolve correctly from the remote host?

Do you have any firewall rules in place?

What error do you get when you try to connect and deliver from a remote host?

ohcarol 09-28-2005 01:47 AM

qmail problem
 
Yes my DNS address is resovled probperly when I do dig mail.host.com it shows the ip address of my mail server.
I tried to send message from remote host doing telnet smtp.hos.com 25
and it says messages accepted for delivery.
However messsage is bounced back. with the follwing message.


Hi. This is the qmail-send program at abc.host.net
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<carol@host.com>:
Sorry, I wasn't able to establish an SMTP connection. (#4.4.1)
I'm not going to try again; this message has been in the queue too long.

=====================================================

However I can received mail send using my local smtp server. Can anyone tell me why is remote mail not received? Do I need to open access in my cisco firewall access list to allow connection to my smtp server from globally?

david_ross 09-28-2005 12:17 PM

Well if the telnet to port 25 succeded then your firewall is obviously ok so there shouldn't be anything needing changed there.

Can you show us what your config is like:
grep "" /var/qmail/control/*

Are the services running ok - can you post the output from:
ps -ef | grep mail
qmailctl stat

ohcarol 09-29-2005 12:32 AM

Hereis the output of my qmail control file

# grep "" /var/qmail/control/*

/var/qmail/control/checkpassword:checkvpw
/var/qmail/control/concurrencyincoming:20
/var/qmail/control/defaultdelivery:./Maildir/
/var/qmail/control/defaultdomain:com.np
/var/qmail/control/locals:localhost
/var/qmail/control/me:lumbini.com.np
/var/qmail/control/plusdomain:com.np
/var/qmail/control/rcpthosts:localhost
/var/qmail/control/rcpthosts:lumbini.com.np
/var/qmail/control/smtpgreeting:smtp.lumbini.com.np
/var/qmail/control/timeoutremote:120
/var/qmail/control/virtualdomains:lumbini.com.np:myusers
/var/qmail/control/virtualdomains:lumbini.com.np:lumbini.com.np

#ps -e |grep mail

root 552 550 0 Sep28 ? 00:00:00 supervise qmail-send
root 554 550 0 Sep28 ? 00:00:00 supervise qmail-smtpd
root 556 550 0 Sep28 ? 00:00:01 supervise qmail-pop3d
qmaill 558 555 0 Sep28 ? 00:00:00 /usr/local/bin/multilog t /var/l
qmails 559 552 0 Sep28 ? 00:00:03 qmail-send
qmaild 560 554 0 Sep28 ? 00:00:00 /usr/local/bin/tcpserver -v -R -
qmaill 561 553 0 Sep28 ? 00:00:00 /usr/local/bin/multilog t /var/l
qmaill 563 557 0 Sep28 ? 00:00:00 /usr/local/bin/multilog t /var/l
root 578 559 0 Sep28 ? 00:00:00 qmail-lspawn ./Maildir/
qmailr 579 559 0 Sep28 ? 00:00:00 qmail-rspawn
qmailq 580 559 0 Sep28 ? 00:00:00 qmail-clean
root 22251 17514 0 11:18 pts/2 00:00:00 grep mail


===========================================================
One thing I have not made DNS entry for my smtp server "smtp.lumbini.com.np" in my ISP dns server. Do I need to made dns entry for smtp.lumbini.com.np too to receive mail from remote host?

david_ross 09-29-2005 02:33 PM

If the mx record for lumbini.com.np resolves to smtp.lumbini.com.np then you will need to make an A record for it.

I think you'll also need to add the domain to locals:
echo lumbini.com.np >> /var/qmail/control/locals

ohcarol 09-30-2005 01:12 AM

My MX record for lumbini.com.np resolves to mail.lumbini.com.np. I also added lumbini.com.np to locals file. Still not solved.
When I do :

# host lumbini.com.np
lumbini.com.np has address xxx.xx.xx.xx
lumbini.com.np mail is handled (pri=10) by mail.lumbini.com.np
lumbini.com.np mail is handled (pri=20) by ns1.myispdns.com.np


Which shows that MX of my domain is pointed to mail.lumbini.com.np.


STill I am not receiving any mail sent from remote host. Or is the router firewall blocking smtp connection to my host?

david_ross 09-30-2005 01:02 PM

Is mail.lumbini.com.np the real address? I don't seem to be able to resolve it.

ohcarol 10-02-2005 12:16 AM

Sorry, actually "mail.baayu.com.np" is the real host.
Please try.

david_ross 10-02-2005 05:11 AM

Well, I've just tried to deliver a message to your postmaster address, see if you get this one:
Code:

rossy - trigger - Sun Oct 02 11:08:26
~> telnet krishna.wlink.com.np 25
Trying 202.79.32.34...
Connected to krishna.wlink.com.np.
Escape character is '^]'.
220 krishna.wlink.com.np ESMTP qmail-smtpd ready
HELO
MAIL FROM:david_ross AT linuxquestions.net
250 krishna.wlink.com.np Hi [84.45.139.87] [84.45.139.87].
250 david_ross AT linuxquestions.net, sender OK
RCPT TO: postmaster AT baayu.com.np
250 postmaster AT baayu.com.np, recipient ok
DATA
354 go ahead
subject: testing by david_ross from LQ

This is a test.

.

250 Queued!

The AT is just to obscure the addresses.

ohcarol 10-02-2005 05:47 AM

I didn't get any mail at my postmaster address. and "krishna.wlink.com.np" is my isp dns address.

thank you

david_ross 10-02-2005 07:35 AM

Sorry, I took the wrong host from the MX record. I can't even get a response from mail.baayu.com.np, it just times out. Is it connected to the internet and not firewalled?

ohcarol 10-02-2005 10:31 AM

yes it's connected to the internet and running up. and also I have open acess to my smtp server in my linux box.

ACCEPT tcp ------ 0.0.0.0/0 xxx.xx.xx.xx * -> 25


And in my cisco router access-list

permit tcp host xxx.xx.xx.xx any eq smtp
permit tcp any eq smtp host xxx.xx.xx.xx
permit tcp any host xxx.xx.xx.xx eq smtp


Even I cannot get mail sent from my ISP network. I think you can ping my domain.

While I do tcpdump in my server I can see request comming to my server's smtp port.

21:26:59.888407 eth0 > baayu.com.np.smtp > smtp5.wlink.com.np.18843: S 1210081289:1210081289(0) ack 818152708 win 32120 <mss 1460,nop,nop,timestamp 937586 357506637,nop,wscale 0> (DF)
21:27:06.085988 eth0 < smtp5.wlink.com.np.18842 > baayu.com.np.smtp: S 43429644:43429644(0) win 65535 <mss 1460>
21:27:06.086100 eth0 > baayu.com.np.smtp > smtp5.wlink.com.np.18842: S 1212269194:1212269194(0) ack 43429645 win 32120 <mss 1460,nop,nop,timestamp 938206 357506637,nop,wscale 0> (DF)
21:27:06.092160 eth0 < smtp5.wlink.com.np.18843 > baayu.com.np.smtp: S 818152707:818152707(0) win 65535 <mss 1460>
21:27:06.092229 eth0 > baayu.com.np.smtp > smtp5.wlink.com.np.18843: S 1210081289:1210081289(0) ack 818152708 win 32120 <mss 1460,nop,nop,timestamp 938207 357506637,nop,wscale 0> (DF)
21:28:00.134854 lo > baayu.com.np.5188 > baayu.com.np.smtp: . 1:1(0) ack 1 win 31072 <nop,nop,timestamp 943611 943611> (DF)
21:28:00.134854 lo < baayu.com.np.5188 > baayu.com.np.smtp: . 1:1(0) ack 1 win 31072 <nop,nop,timestamp 943611 943611> (DF)
21:28:00.141843 lo > baayu.com.np.smtp > baayu.com.np.5188: P 1:30(29) ack 1 win 31072 <nop,nop,timestamp 943612 943611> (DF)

21:28:19.460725 eth0 > baayu.com.np.smtp > smtp5.wlink.com.np.18843: S 1210081289:1210081289(0) ack 818152708 win 32120 <mss 1460,nop,nop,timestamp 945544 357506637,nop,wscale 0> (DF)
21:28:19.460795 eth0 > baayu.com.np.smtp > smtp5.wlink.com.np.18842: S 1212269194:1212269194(0) ack 43429645 win 32120 <mss 1460,nop,nop,timestamp 945544 357506637,nop,wscale 0> (DF)

david_ross 10-02-2005 12:20 PM

If you run "netstat -nlp" do you see port 25 in use by qmail?

ohcarol 10-02-2005 07:04 PM

This is the output of my netstat command

#netstat -npl

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN -
tcp 0 0 202.79.53.76:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN -


All times are GMT -5. The time now is 08:02 AM.