Title: RE: SMTP doesn't respond

Here is the script I'm using (straight out of "Life with Qmail"):

#!/bin/sh

PATH=/var/qmail/bin:/usr/local/bin:/usr/bin:/bin
export PATH

case "$1" in
  start)
    echo -n "Starting qmail: svscan"
    cd /var/qmail/supervise
    nohup env - PATH="$PATH" svscan &
    echo $! > /var/run/svscan.pid
    echo "."
    ;;
  stop)
    echo -n "Stopping qmail: svscan"
    kill `cat /var/run/svscan.pid`
    echo -n " qmail"
    svc -dx /var/qmail/supervise/*
    echo -n " logging"
    svc -dx /var/qmail/supervise/*/log
    echo "."
    ;;
  stat)
    cd /var/qmail/supervise
    svstat * */log
    ;;
  doqueue|alrm)
    echo "Sending ALRM signal to qmail-send."
    svc -a /var/qmail/supervise/qmail-send
    ;;
  queue)
    qmail-qstat
    qmail-qread
    ;;
  reload|hup)
    echo "Sending HUP signal to qmail-send."
    svc -h /var/qmail/supervise/qmail-send
    ;;
  pause)
    echo "Pausing qmail-send"
    svc -p /var/qmail/supervise/qmail-send
    echo "Pausing qmail-smtpd"
    svc -p /var/qmail/supervise/qmail-smtpd
    ;;
  cont)
    echo "Continuing qmail-send"
    svc -c /var/qmail/supervise/qmail-send
    echo "Continuing qmail-smtpd"
    svc -c /var/qmail/supervise/qmail-smtpd
    ;;
  restart)
    echo "Restarting qmail:"
    echo "* Stopping qmail-smtpd."
    svc -d /var/qmail/supervise/qmail-smtpd
    echo "* Sending qmail-send SIGTERM and restarting."
    svc -t /var/qmail/supervise/qmail-send
    echo "* Restarting qmail-smtpd."
    svc -u /var/qmail/supervise/qmail-smtpd
    ;;
  cdb)
    tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
    chmod 644 /etc/tcp.smtp*
    echo "Reloaded /etc/tcp.smtp."
    ;;
  help)
    cat <<HELP
   stop -- stops mail service (smtp connections refused, nothing goes out)
  start -- starts mail service (smtp connection accepted, mail can go out)
  pause -- temporarily stops mail service (connections accepted, nothing leaves
   cont -- continues paused mail service
   stat -- displays status of mail service
    cdb -- rebuild the tcpserver cdb file for smtp
restart -- stops and restarts smtp, sends qmail-send a TERM & restarts it
doqueue -- sends qmail-send ALRM, scheduling queued messages for delivery
 reload -- sends qmail-send HUP, rereading locals and virtualdomains
  queue -- shows status of queue
   alrm -- same as doqueue
    hup -- same as reload
HELP
    ;;
  *)
    echo "Usage: $0 {start|stop|restart|doqueue|reload|stat|pause|cont|cdb|queu
|help}"
    exit 1
    ;;
esac

exit 0

I haven't gotten a handle on qmail logging yet. Where are the log files stored? I look at /var/log/qmail and the files that are there contain these lines:

from /var/log/qmail/current

@400000003b1518da292b19c4 status: local 0/10 remote 0/20

from /var/log/qmail/smtpd/current

@400000003b1518da3494b75c tcpserver: status: 0/0

I don't think there is a load balancer problem with SMTP, as there is another mail server running sendmail right beside this one. It's just that it was setup by somebody else, who no longer works here, and I'm much more a fan of qmail than I am of sendmail, so we're moving forward with qmail installs now.

If I can provide any further information to you, please let me know.

Thanks,

Mark

-----Original Message-----
From: Charles Cazabon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 12:19
To: '[EMAIL PROTECTED]'
Subject: Re: SMTP doesn't respond


Mark Douglas <[EMAIL PROTECTED]> wrote:
>
> The server is using a private ip address (192.168.x.x) behind a load
> balancer. The load balancer runs NAT so the server can send data out. The
> load balancer also contains a routable ip address, for which, all traffic
> passes back to the private ip. There is a DNS entry for the routable ip, but
> not for the private ip.

This could be part of the problem.

> The qmail server is setup with the same name as the
> DNS entry for the routable ip. As qmail runs on DNS entries, I would assume
> this would make everything ok. It doesn't. When I telnet to the localhost on
> port 25, I get a connection and it just sits there. No response, ever.

Ever?  Or not in the first 60 seconds?  Or what?

> Below is the output of qmail-showctl just to make sure I haven't done
> anything wrong. Any suggestions?

This looks good (thanks for including it).  What would help would be a copy of
the script you're using to start qmail-smtpd.  tcpserver may be trying a
reverse lookup on your IP address and timing out, as well as some other DNS
lookups which happen.  They can all be fixed with changes to your qmail-smtpd
script.

Also, are any error messages ending up in the qmail-smtpd log?  Does outgoing
mail work?  Are there errors in the main qmail log?

I've tried to telnet to the SMTP port myself (thanks for using real DNS
information and not obscuring it), and you seem to be correct -- I've got a
connection, but not the welcome banner, even after several minutes.  If it's a
problem with your qmail-smtpd script, there should be errors in the log from
the tcpserver instance for it.  Another possibility, I suppose, is that the
load balancer is somehow broken in regards to SMTP?

Charles
--
-----------------------------------------------------------------------
Charles Cazabon                            <[EMAIL PROTECTED]>
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
Any opinions expressed are just that -- my opinions.
-----------------------------------------------------------------------

Reply via email to