LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   qmail and telnet problem (https://www.linuxquestions.org/questions/linux-server-73/qmail-and-telnet-problem-595399/)

Fedora 6 10-29-2007 03:43 AM

qmail and telnet problem
 
Dear friends ... could u please help me to solve my problem

I,ve installed qmail,courier-imap,vpop mail

I try to do telnet i got the follows:

#telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
telnet: Unable to connect to remote host: Connection refused

#telnet 127.0.0.1 2525
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
220 linux.work ESMTP


I want to do telnet on port 25 not 2525 .. so what to do ???
Thanks in advance

acid_kewpie 10-29-2007 04:00 AM

well nothing is listening on that 25, OR you are firewalled. have you told qmail to listen on 2525 for some odd reason? does "telnet 127.0.0.1 25" not work... your localhost address is using an ipv6 address, but i doubt that's relevant at all.

Fedora 6 10-29-2007 04:08 AM

Thank you my friend for rapid reply
I've changed the port to 25 ... but there is a new problem..

( telnet 127.0.0.1 25 ) is working but
(telnet 192.168.1.29 25 ) is not working ..

192.168.1.29 is my server IP address
so what to do ????
Thanks

acid_kewpie 10-29-2007 04:11 AM

as above, sound like a firewall to me, or qmail is still not listening on the right IP address. it's pretty common to make servers only listen to the loopback by default, so as not to be an open relay.

Fedora 6 10-29-2007 04:37 AM

Thanks ... but what should i do ???

ghostdancer 10-29-2007 05:46 AM

Quote:

Originally Posted by Fedora 6 (Post 2940675)
Thanks ... but what should i do ???

Check your /etc/hosts and make sure contain a line like:

Code:

127.0.0.1              localhost
This should resolve your localhost to 127.0.0.1

As for external IP, this is your firewall setup. I thought there is some kind of gui application for firewall setup?

It has been long time since I play with Redhat 7.x and 9 (before Fedora). But I remember there is an application for us to configure the firewall rules. There should be a newer version of this application, and use it to open your port 25 access.

Fedora 6 10-29-2007 05:52 AM

I did : # /etc/init.d/iptables stop
flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]

But i get the same wrong ...even i stoped firewall
So waht to do ???

ghostdancer 10-29-2007 06:46 AM

I am not sure why.

qmail does not tie itself to any IP address. Can you show me how you start qmail?

Fedora 6 10-29-2007 07:25 AM

I used: # chkconfig --level 345 qmail on

error reading information on service qmail: No such file or directory

I used : # chkconfig qmail on

error reading information on service qmail: No such file or directory

What that means ??? didn't i installed qmail correctly ????
I use Fedora core 6

please advise me
Thanks

Fedora 6 10-29-2007 07:26 AM

Also I used : # /etc/init.d/qmail start
-bash: /etc/init.d/qmail: No such file or directory

Am i right or what ???

Fedora 6 10-29-2007 07:37 AM

I send a message to my external mail at yahoo and it delivered ....

# echo to: shadows14@yahoo.com | /var/qmail/bin/qmail-inject

I recieved it ... so qmail is running ... right ???

ghostdancer 10-29-2007 08:05 AM

Did you install qmail yourself?

Try this:

Code:

$> ps -elf | grep qmail
Paste the output in your next post.

By the way, I am a bit confuse. If you are able to change from port 2525 to port 25, then why is it you can't show us your qmail start up script? How did you configure the SMTP port?

Fedora 6 10-30-2007 01:37 AM

#ps -elf | grep qmail



0 S root 2126 2124 0 78 0 - 373 - 06:27 ? 00:00:00 super
vise qmail-smtpd
0 S root 2128 2124 0 78 0 - 373 - 06:27 ? 00:00:00 super
vise qmail-send
0 S root 2130 2124 0 78 0 - 373 - 06:27 ? 00:00:00 super
vise qmail-pop3d
4 S qmails 2132 2128 0 84 0 - 417 - 06:27 ? 00:00:00 qmail
-send
4 S qmaill 2133 2131 0 83 0 - 375 pipe_w 06:27 ? 00:00:00 multi
log t ./main
4 S qmaill 2134 2129 0 83 0 - 376 pipe_w 06:27 ? 00:00:00 multi
log t s999999 ./main
4 S qmaill 2135 2127 0 78 0 - 375 pipe_w 06:27 ? 00:00:00 multi
log t ./main
4 S root 2136 2130 0 84 0 - 379 342033 06:27 ? 00:00:00 tcpse
rver -vR -l 0 0 110 qmail-popup mail.linux.work checkpassword qmail-pop3d Maildi
r
0 S root 2140 2132 0 85 0 - 408 - 06:27 ? 00:00:00 qmail
-lspawn ./Maildir/
4 S qmailr 2141 2132 0 84 0 - 408 - 06:27 ? 00:00:00 qmail
-rspawn
4 S qmailq 2142 2132 0 85 0 - 406 pipe_w 06:27 ? 00:00:00 qmail
-clean
0 R root 2287 2163 0 80 0 - 971 - 06:28 pts/0 00:00:00 grep
qmail

ghostdancer 10-30-2007 03:43 AM

OK. From your post, your are using daemontools and ucspi-tcp to run your qmail tasks. However, there is a missing task in your list. There is no qmail-smtpd. Below is how my system usually would be:

Code:

$> ps -elf | grep qmail
0 S root      2040  2038  0  78  0 -  354 -      14:26 ?        00:00:00 supervise qmail-pop3d
0 S root      2042  2038  0  78  0 -  353 -      14:26 ?        00:00:00 supervise qmail-smtpd
0 S root      2044  2038  0  78  0 -  354 -      14:26 ?        00:00:00 supervise qmail-send
4 S root      2048  2040  0  81  0 -  360 -      14:26 ?        00:00:00 /usr/local/bin/tcpserver -v -R -H -l 0 0 110 /var/qmail/bin/qmail-popup FQDN /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir
4 S qmaill    2049  2041  0  83  0 -  390 pipe_w 14:26 ?        00:00:00 /usr/local/bin/multilog t /var/log/pop3d
4 S qmaill    2050  2043  0  83  0 -  389 pipe_w 14:26 ?        00:00:00 /usr/local/bin/multilog t /var/log/smtpd
4 S qmails    2051  2044  0  78  0 -  398 -      14:26 ?        00:00:00 qmail-send
4 S qmaill    2054  2045  0  83  0 -  390 pipe_w 14:26 ?        00:00:00 /usr/local/bin/multilog t /var/log/qmail
4 S qmaild    2055  2042  0  84  0 -  404 -      14:26 ?        00:00:00 /usr/local/bin/tcpserver -v -D -H -l sendQuick.Messenger -x /etc/tcp.smtp.cdb -c 20 -u 1005 -g 1005 0 smtp /var/qmail/bin/qmail-smtpd
0 S root      2060  2051  0  85  0 -  389 -      14:26 ?        00:00:00 qmail-lspawn ./Maildir
4 S qmailr    2061  2051  0  85  0 -  388 -      14:26 ?        00:00:00 qmail-rspawn
4 S qmailq    2062  2051  0  85  0 -  386 pipe_w 14:26 ?        00:00:00 qmail-clean

Notice there is an entry indicating qmail-smtpd in my system. For yours, it does not exist. There is a line indicating 'supervise qmail-smtpd', but there is no line showing qmail-smtpd itself. Since you mentioned that telnet to 127.0.0.1 works, this mean, something else is listening at the SMTP port.

I need more information regarding your system. Can you do the following commands (post the output in your next post):

Code:

$> netstat -ap | grep tcp | grep smtp
This command should let us know which task is listening at SMTP port.

Code:

$> ls -l /service/
This should list down all the tasks that is being executed/monitored by 'supervise'.

Do you have qmailctl installed? If you have, run:

Code:

$> qmailctl stat
If this is not install, get it from: http://www.lifewithqmail.org/lwq.html#start-qmail. I install it into /usr/sbin directory.

By the way, you have not explained how you able to change from port 2525 to port 25 of your SMTP service.

Fedora 6 10-31-2007 01:25 AM

Dear friend ... thank u for your help

my run script was like that :

#!/bin/sh
exec env - PATH="/var/qmail/bin:$PATH" \
envuidgid qmaild \
tcpserver -U -vR -l 0 -x rules.cdb 0 2525 \
rblsmtpd -a antirbl.tomclegg.net \
-r relays.ordb.org \
-r bl.spamcop.net \
qmail-smtpd `cat /var/qmail/control/me` cmd5checkpw true \
2>&1
EOF

so i just changed 2525 to 25 .

Any way
I reinstalled qmail like mentioned in qmailrocks ...
Every thing is fine as mentioned there but I still can't make a telnet on 192.168.1.28 on port 25 or 110 from the local network
( from my machine it does work )
So please can you tell what is the problem
Thanks in advance .


All times are GMT -5. The time now is 11:05 AM.