Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Qmail SMTP server problem

Status
Not open for further replies.

Andersond

Technical User
Jul 30, 2002
25
GB
I am having difficulty getting the Qmail SMTP process to start. Below is a copy of the run file. Has anyone any ideas as to what the possible problem(s) could be?

#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTP=`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
 
Andersond,

Right off the top, this block of code:

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


looks like it needs quotes around the strings that are to be echo'd. Is this from LifeWithQmail? What error message do you get?



Wishdiak
 
Wishdiak

Yes, the code is from LifeWithQmail. I am not getting an error message as such. When I do a qmailctl stat the smtp process is always sitting on 0 seconds. Presumably this suggests that the SMTP server has not started correctly?

Andersond
 
Andersond,

It sounds like one of two things. Either (1) your script is broken in some way or (2) qmail-smtp is already running and the qmail-smtp process that your script is trying to start dies on startup, but keeps trying ad nauseum.

Try 'ps -aux | grep qmail' from the command line and see if there's more than one qmail-smtp process.



Wishdiak
 
Wishdiak

There is a 'supervise qmail-smtpd' running. Is this the SMTP server? Also, I cannot telnet to the SMTP port 25 which is another pointer to the SMTP not running.

Andersond
 
Andersond,

Just to be sure you don't have some other process running on port 25, do 'nmap localhost'. If port 25 isn't listed, then it sounds like your smtp run script has a bug or two. Check it over and then 'qmailctl restart'.



Wishdiak
 
Wishdiak,

I have tracked down another smtp start-up script and it is working fine. Another query awaits!

David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top