Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

unable to telnet to localhost

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


michael at hudsonstreet

Nov 13, 2010, 6:34 PM

Post #1 of 6 (1910 views)
Permalink
unable to telnet to localhost

I am stumped.

Dave sills installation check script shows no issues.

[root [at] Perseus0 ~]# qmailctl stat
/service/qmail-send: up (pid 16236) 129 seconds
/service/qmail-send/log: up (pid 16243) 129 seconds
/service/qmail-smtpd: up (pid 16893) 1 seconds
/service/qmail-smtpd/log: up (pid 16239) 129 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0


[root [at] Perseus0 ~]# cat /etc/tcp.smtp
127.:allow,RELAYCLIENT=""

I can successfully inject mail at the command line usin
/var/qmail/bin/qmail-inject

However all telnet connection to localhost are refused.
[root [at] Perseus0 ~]# telnet
telnet> open
(to) 127.0.0.1 25
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet>

Content of my /var/qmail/supervise/qmail-smtpd/run file

#!/bin/sh QMAILDUID=`id -u qmaild` NOFILESGID=`id -g qmaild` MAXSMTPD=`cat
/var/qmail/control/concurrencyincoming` LOCAL=`head -1
/var/qmail/control/me` if [. -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z
"$MAXSMTPD" -o -z "$LOCAL" ]; then echo QMAILDUID, NOFILESGID, MAXSMTPD, or
LOCAL is unset in echo /var/qmail/supervise/qmail-smtpd/run exit 1 fi if [ !
-f /var/qmail/control/rcpthosts ]; then echo "No
/var/qmail/control/rcpthosts!" echo "Refusing to start SMTP listener because
it'll create an open relay" exit 1 fi exec /usr/local/bin/softlimit -m
2000000 \ /usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c
"$MAXSMTPD" \ -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp
/var/qmail/bin/qmail-smtpd 2>&1




--
--
Regards,
Michael


amb-sendok-1292295117.mafgibafcjopnknfehjk at bradfo

Nov 13, 2010, 6:51 PM

Post #2 of 6 (1863 views)
Permalink
Re: unable to telnet to localhost [In reply to]

Thus said Michael DiMartino on Sat, 13 Nov 2010 21:34:38 EST:

> /service/qmail-smtpd: up (pid 16893) 1 seconds

This shows that qmail-smtpd is not running properly. It should have more
than 1 second of run time. What do your qmail-smtpd logs say? What
about:

ps auxwww | grep readproctitle

Andy


hugo.monteiro at fct

Nov 13, 2010, 6:58 PM

Post #3 of 6 (1856 views)
Permalink
Re: unable to telnet to localhost [In reply to]

On 11/14/2010 02:34 AM, Michael DiMartino wrote:
> I am stumped.
>
> Dave sills installation check script shows no issues.
>
> [root [at] Perseus0 ~]# qmailctl stat
> /service/qmail-send: up (pid 16236) 129 seconds
> /service/qmail-send/log: up (pid 16243) 129 seconds
> /service/qmail-smtpd: up (pid 16893) 1 seconds
> /service/qmail-smtpd/log: up (pid 16239) 129 seconds
> messages in queue: 0
> messages in queue but not yet preprocessed: 0
>
>
> [root [at] Perseus0 ~]# cat /etc/tcp.smtp
> 127.:allow,RELAYCLIENT=""
>
> I can successfully inject mail at the command line usin
> /var/qmail/bin/qmail-inject
>
> However all telnet connection to localhost are refused.
> [root [at] Perseus0 ~]# telnet
> telnet> open
>
> (to) 127.0.0.1 25
> Trying 127.0.0.1...
> telnet: connect to address 127.0.0.1 <http://127.0.0.1>: Connection
> refused
> telnet>
>
>
> Content of my /var/qmail/supervise/qmail-smtpd/run file
>
> #!/bin/sh
>
> QMAILDUID=`id -u qmaild`
> NOFILESGID=`id -g qmaild`
> MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
> LOCAL=`head -1 /var/qmail/control/me`
>
> if [. -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z
> "$LOCAL" ]; then
> echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
> echo /var/qmail/supervise/qmail-smtpd/run
> exit 1
> fi
>
> if [ ! -f /var/qmail/control/rcpthosts ]; then
> echo "No /var/qmail/control/rcpthosts!"
> echo "Refusing to start SMTP listener because it'll create an open relay"
> exit 1
> fi
>
> exec /usr/local/bin/softlimit -m 2000000 \
> /usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c
> "$MAXSMTPD" \
> -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd 2>&1
>
>
>
>
>
> --
> --
> Regards,
> Michael

Is tcpserver really listening on port 25? try

netstat -tlpn | grep :25

or maybe you have a firewall activated? Assuming it's a Linux machine,
iptables -L will tell you about the current rules.

Also check for errors from readproctitle with ps auxww|grep readproc

regards,

Hugo Monteiro.

--
fct.unl.pt:~# cat .signature

Hugo Monteiro
Email : hugo.monteiro [at] fct
Telefone : +351 212948300 Ext.15307
Web : http://hmonteiro.net

Divisão de Informática
Faculdade de Ciências e Tecnologia da
Universidade Nova de Lisboa
Quinta da Torre 2829-516 Caparica Portugal
Telefone: +351 212948596 Fax: +351 212948548
www.fct.unl.pt apoio [at] fct

fct.unl.pt:~# _


thibs at thibs

Nov 14, 2010, 6:21 AM

Post #4 of 6 (1856 views)
Permalink
Re: unable to telnet to localhost [In reply to]

Hello

As already said, this indicates the smtpd service is NOT running

> > /service/qmail-send/log: up (pid 16243) 129 seconds
> > /service/qmail-smtpd: up (pid 16893) 1 seconds

Try to see what's wrong with following command :

tai64nlocal < /var/qmail/supervise/qmail-smtpd/log/main/current

You can find on http://qmailrocks.thibs.com/test-qmail.php some test to
check if your services are OK

Regards

Thibault


scott at screaming-tech

Nov 14, 2010, 2:33 PM

Post #5 of 6 (1845 views)
Permalink
RE: unable to telnet to localhost [In reply to]

It may help to find out why the service is dying after a second – you can do
this if you issue a ‘qmailctl stop’, then go into your /service/qmail-smtpd
directory and issue a ./run manually to see what the output is. I’m
guessing that if you add a ‘1’ in front of your softlimit, it may resolve
your issue.



-Scott

Screaming Technologies, Inc.

scott [at] screaming-tech

(p) 215.867.9931

(c) 215.431.8357

(f) 267.988.9075



From: Hugo Monteiro [mailto:hugo.monteiro [at] fct]
Sent: Saturday, November 13, 2010 9:59 PM
To: Michael DiMartino
Cc: qmail [at] list
Subject: Re: unable to telnet to localhost



On 11/14/2010 02:34 AM, Michael DiMartino wrote:

I am stumped.



Dave sills installation check script shows no issues.



[root [at] Perseus0 ~]# qmailctl stat

/service/qmail-send: up (pid 16236) 129 seconds

/service/qmail-send/log: up (pid 16243) 129 seconds

/service/qmail-smtpd: up (pid 16893) 1 seconds

/service/qmail-smtpd/log: up (pid 16239) 129 seconds

messages in queue: 0

messages in queue but not yet preprocessed: 0





[root [at] Perseus0 ~]# cat /etc/tcp.smtp

127.:allow,RELAYCLIENT=""



I can successfully inject mail at the command line usin
/var/qmail/bin/qmail-inject







However

all telnet connection to localhost are refused.

[root [at] Perseus0

~]# telnet

telnet>

open





(to) 127.0.0.1 25

Trying

127.0.0.1...

telnet:

connect to address 127.0.0.1:

Connection refused

telnet>











Content of my /var/qmail/supervise/qmail-smtpd/run file







#!/bin/sh







QMAILDUID=`id -u qmaild`



NOFILESGID=`id -g qmaild`



MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`



LOCAL=`head -1 /var/qmail/control/me`







if [. -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z

"$LOCAL" ]; then



echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in



echo /var/qmail/supervise/qmail-smtpd/run



exit 1



fi







if [ ! -f /var/qmail/control/rcpthosts ]; then



echo "No /var/qmail/control/rcpthosts!"



echo "Refusing to start SMTP listener because it'll create an open

relay"



exit 1



fi







exec /usr/local/bin/softlimit -m 2000000 \



/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c

"$MAXSMTPD" \



-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd

2>&1




















--
--
Regards,
Michael


Is tcpserver really listening on port 25? try

netstat -tlpn | grep :25

or maybe you have a firewall activated? Assuming it's a Linux machine,
iptables -L will tell you about the current rules.

Also check for errors from readproctitle with ps auxww|grep readproc

regards,

Hugo Monteiro.



--
fct.unl.pt:~# cat .signature

Hugo Monteiro
Email : hugo.monteiro [at] fct
Telefone : +351 212948300 Ext.15307
Web : http://hmonteiro.net

Divisão de Informática
Faculdade de Ciências e Tecnologia da
Universidade Nova de Lisboa
Quinta da Torre 2829-516 Caparica Portugal
Telefone: +351 212948596 Fax: +351 212948548
www.fct.unl.pt apoio [at] fct

fct.unl.pt:~# _


michael at hudsonstreet

Nov 14, 2010, 3:46 PM

Post #6 of 6 (1839 views)
Permalink
Re: unable to telnet to localhost [In reply to]

The issue was resolved by increasing the softlimit.

Thanks for everyone's help.

Sent from my iPhone

On Nov 14, 2010, at 5:33 PM, "Scott Higginbotham" <scott [at] screaming-tech>
wrote:

It may help to find out why the service is dying after a second – you can do
this if you issue a ‘qmailctl stop’, then go into your /service/qmail-smtpd
directory and issue a ./run manually to see what the output is. I’m
guessing that if you add a ‘1’ in front of your softlimit, it may resolve
your issue.



-Scott

Screaming Technologies, Inc.

scott [at] screaming-tech

(p) 215.867.9931

(c) 215.431.8357

(f) 267.988.9075



*From:* Hugo Monteiro [mailto:hugo.monteiro [at] fct]
*Sent:* Saturday, November 13, 2010 9:59 PM
*To:* Michael DiMartino
*Cc:* qmail [at] list
*Subject:* Re: unable to telnet to localhost



On 11/14/2010 02:34 AM, Michael DiMartino wrote:

I am stumped.



Dave sills installation check script shows no issues.



[root [at] Perseus0 ~]# qmailctl stat

/service/qmail-send: up (pid 16236) 129 seconds

/service/qmail-send/log: up (pid 16243) 129 seconds

/service/qmail-smtpd: up (pid 16893) 1 seconds

/service/qmail-smtpd/log: up (pid 16239) 129 seconds

messages in queue: 0

messages in queue but not yet preprocessed: 0





[root [at] Perseus0 ~]# cat /etc/tcp.smtp

127.:allow,RELAYCLIENT=""



I can successfully inject mail at the command line usin
/var/qmail/bin/qmail-inject





However

all telnet connection to localhost are refused.

[root [at] Perseus0

~]# telnet

telnet>

open



(to) 127.0.0.1 25

Trying

127.0.0.1...

telnet:

connect to address 127.0.0.1:

Connection refused

telnet>







Content of my /var/qmail/supervise/qmail-smtpd/run file





#!/bin/sh



QMAILDUID=`id -u qmaild`

NOFILESGID=`id -g qmaild`

MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`

LOCAL=`head -1 /var/qmail/control/me`



if [. -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z

"$LOCAL" ]; then

echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in

echo /var/qmail/supervise/qmail-smtpd/run

exit 1

fi



if [ ! -f /var/qmail/control/rcpthosts ]; then

echo "No /var/qmail/control/rcpthosts!"

echo "Refusing to start SMTP listener because it'll create an open

relay"

exit 1

fi



exec /usr/local/bin/softlimit -m 2000000 \

/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c

"$MAXSMTPD" \

-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd

2>&1














--
--
Regards,
Michael


Is tcpserver really listening on port 25? try

netstat -tlpn | grep :25

or maybe you have a firewall activated? Assuming it's a Linux machine,
iptables -L will tell you about the current rules.

Also check for errors from readproctitle with ps auxww|grep readproc

regards,

Hugo Monteiro.

--

fct.unl.pt:~# cat .signature



Hugo Monteiro

Email : hugo.monteiro [at] fct

Telefone : +351 212948300 Ext.15307

Web : http://hmonteiro.net



Divisão de Informática

Faculdade de Ciências e Tecnologia da

Universidade Nova de Lisboa

Quinta da Torre 2829-516 Caparica Portugal

Telefone: +351 212948596 Fax: +351 212948548

www.fct.unl.pt apoio [at] fct



fct.unl.pt:~# _

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.