qmail smtp server connects, but does nothing

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:

@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.

6 Replies

Is your local DNS resolver working correctly (nslookup yahoo.com type deal)?

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

[BIG SMILE] :D

It's (quasi) working now.

@caker:

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````
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:

!/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
````

@jsalloum:

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.

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

should hvae been

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

-Chris

:) I'm learning a lot today.

Thanks again!

j.

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

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct