Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Jun 01, 2004 4:11 pm 
Offline
Senior Newbie

Joined: Tue Jun 01, 2004 4:03 pm
Posts: 15
Location: Toronto, Canada
Has anyone ever had a problem with qmail where the smtp server *connects* but then does nothing at all?

I had big problems caused by copying and pasting the /var/qmail/supervise/qmail-smtpd/run code from the qmailrocks.org website. The quotation marks were translating into different ASCII characters and the lines were wrapping at odd points, so the script wasn't running properly. But once I corrected all of the ' marks and the wrap problems, the logs seem fine and the smtp servers listens on port 25. But I'm stuck.

I'm running RH9, and I have an smtp server that is listening on port 25. It answers, but then it does nothing. No 220 greeting... it just sits there. And it'll sit there forever, so far as I can tell. I'm fairly sure that the domain name thing isn't the problem because the smtp server should at least answer *something* when you telnet into it via the IP address directly -- according to the RFC rules, and qmail abides by those fairly closely.

There's no firewall getting in the way (yet -- there's nothing on the server so I really don't need one until I get this working...)

Sendmail is uninstalled, Postfix is stopped as a service... there are no other smtp servers listening (netstat indicates it, and when the run script wasn't working, nothing would answer on port 25)...

I've checked the log. /var/log/qmail/qmail-smtpd/current says:

Code:
@4000000040baab492dcf41bc tcpserver: status: 0/0 


If I clear the log and stop and start qmail, that line gets added another time so I know that it's not left over. I've run the tcpserver command from /var/qmail/supervise/qmail-smtpd/run by hand and it returns the same 0/0 status.

I don't know... does anyone have any ideas?
Thank you in advance for you help! :)
j.


Last edited by jsalloum on Wed Jun 02, 2004 1:38 am, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Tue Jun 01, 2004 4:18 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
Is your local DNS resolver working correctly (nslookup yahoo.com type deal)?


Top
   
 Post subject:
PostPosted: Tue Jun 01, 2004 4:23 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
Doing a little googling, it looks like the second 0 in status 0/0 is the maximum number of concurrent TCP connections, which you have set to zero.

url 1 (google cache)

From other finds:

/service/qmail-smtpd/run:
=========================

#!/bin/sh
QMAILDUID='id -u qmaild'
NOFILESGID='id -g qmaild'
MAXSMTPD='cat /var/qmail/control/concurrencyincoming'
exec /usr/local/bin/softlimit -m 2000000 \
/usr/local/bin/tcpserver -v -R -l 0 -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd 2>&1


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

Does this file exist?

-Chris


Top
   
 Post subject:
PostPosted: Tue Jun 01, 2004 5:33 pm 
Offline
Senior Newbie

Joined: Tue Jun 01, 2004 4:03 pm
Posts: 15
Location: Toronto, Canada
[BIG SMILE] :D

It's (quasi) working now.

caker wrote:
Doing a little googling, it looks like the second 0 in status 0/0 is the maximum number of concurrent TCP connections, which you have set to zero.


Interesting -- I'm unfamiliar enough with perl that this would have taken me forever without your assistance. Thank you kindly. I completely thought that status 0/0 was the equivalent of a DOS errorlevel where 0 means nothing is wrong... right, I won't take that for granted again.

Here's what I've done: I added 'echo' to the front of the exec command in /var/qmail/supervise/qmail-smtpd/run and found out, like you noted, that the contents of the concurrencyincoming file were not being reported propertly. The file exists, and the spelling and path are exactly the same... but for some reason the script printed the MAXSMTPD variable as text instead of executing the command and printing the contents of the cat command:

Code from /var/qmail/supervise/qmail-smtpd/run:
exec /usr/local/bin/softlimit -m 30000000 /usr/local/bin/tcpserver -v -R -l head -1 /var/qmail/control/me -x /etc/tcp.smtp.cdb -c cat /var/qmail/control/concurrencyincoming -u id -u vpopmail -g id -g vpopmail 0 smtp /var/qmail/bin/qmail-smtpd mail.horrox.ca /home/vpopmail/bin/vchkpw /usr/bin/true

So... I just commented out the original MAXSMTPD line in the script (below) and put the contents of the concurrencyincoming line there directly, and now it works. The line I added (for anyone else that gets this problem) was
Code:
MAXSMTPD=30


So... now I'm curious... why would perl have printed the full text 'cat /var/qmail/control/concurrencyincoming' instead of inserting the file's contents or an error message? I copied the script right off qmailrocks.org so I can't be the only person to have this setup...

I'm very grateful for your help on that!
j.

(For reference) The original /var/qmail/supervise/qmail-smtpd/run script:
Code:
#!/bin/sh
QMAILDUID='id -u qmaild'
NOFILESGID='id -g qmaild'
MAXSMTPD='cat /var/qmail/control/concurrencyincoming'
exec /usr/local/bin/softlimit -m 2000000 \
/usr/local/bin/tcpserver -v -R -l 0 -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd 2>&1


Top
   
 Post subject:
PostPosted: Tue Jun 01, 2004 6:03 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
jsalloum wrote:
So... now I'm curious... why would perl have printed the full text 'cat /var/qmail/control/concurrencyincoming' instead of inserting the file's contents or an error message? I copied the script right off qmailrocks.org so I can't be the only person to have this setup...

You wanted back ticks (`) not single quotes ('). Backticks in perl execue the shell commands, quotes are just a string literal.

Code:
MAXSMTPD='cat /var/qmail/control/concurrencyincoming' 

should hvae been
Code:
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming` 


-Chris


Last edited by caker on Tue Jun 01, 2004 6:14 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Tue Jun 01, 2004 6:06 pm 
Offline
Senior Newbie

Joined: Tue Jun 01, 2004 4:03 pm
Posts: 15
Location: Toronto, Canada
:) I'm learning a lot today.
Thanks again!
j.


Top
   
 Post subject:
PostPosted: Tue Jun 01, 2004 6:14 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
Wherever I copied mine from also had the incorrect quotes. Maybe someone's email client converted them, or some strange conversion happened somewhere in the translation.

The other two 'id' lines are also wrong in both our examples...

-Chris


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group