At 10:35 6.04.2000, Jan Stifter wrote:
 >hello all,
 >i start qmail-smtpd with
 >
 >*** beg of qmail-smtpd
 ># /sbin/init.d/qmail-smtpd
 ># symbolic links in
 ># /sbin/rc2.d
 >export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
 >
 >case "$1" in
 >    start)
 >        echo "Starting qmail-smtpd."
 >    supervise /var/lock/svc/qmail-smtpd tcpserver -q
 >-x/etc/tcp.smtp.cdb\
 >    -u101 -g101 0 smtp /var/qmail/bin/qmail-smtpd 2>&1 | \
 >    setuser qmaill accustamp | \
 >    setuser qmaill tailocal >> /var/log/qmail.log &
 >        ;;
 >    stop)
 >        echo -n "Stopping qmail-smtpd..."
 >        svc -dx /var/lock/svc/qmail-smtpd
 >        echo "ok"
 >        ;;
 >    *)
 >        echo "Usage: $0 {start|stop}"
 >        exit 1
 >        ;;
 >esac
 >
 >exit 0
 >*** end of qmail-smtpd
 >
 >1. the logging with >> is not very nice and i am looking for a nice
 >and simple other possibility.

I think I am using a newer version of the daemontools than you, but here's 
what I do.

I have an /etc/init.d/qmail file which has the following lines:

/usr/local/bin/supervise /var/qmail/supervise/tcpserver \
| /usr/local/bin/multilog t s1677741 n30 /usr/qmail/log/tcpserver &

The supervise/tcpserver/run file has the following:

exec /usr/local/bin/tcpserver -x /etc/tcp.smtp.cdb \
-v -u 65536 -g 7025 0 smtp \
/var/qmail/ifi-bin/mailserver.sh 2>&1

The mailserver.sh file then runs ofmipd or qmail-smtpd depending on where 
the connection is coming from.  All logged output is then put in
/usr/qmail/log/tcpserver

 >2. the file qmail.log is always 0 (no logging) even though i telnet to
 >port 25 and send myself succesfully a mail.

As far as I know, qmail-smtpd doesn't generate any logging output - other 
elements of the qmail program log disposition of mail.  In order to get 
logging from tcpserver you need to supply the -v flag.

 >3. this machine is a secondary MX receiver, so i would like to know,
 >how much emails qmail-smtpd received, but qmail-send did not already
 >send them to the main MX mail-server. the mails are in the queue, but
 >how can i get the number of mails there?

If you log tcpserver activity, you can see how many machines connected to 
your host.  The other normal qmail logs should show you how many mails were 
delivered, and where.

regards,
Will
__________________________________________________________________________

   "I was going to be a Neo-Deconstructivist, but Mom wouldn't let me..."

  multimedia laboratorium                              [EMAIL PROTECTED]
  institut fuer informatik                        (pgp id)        F703D035
  der universitaet zuerich                        (office) +41  1 635 4346
  winterthurerstr. 190                            (fax)    +41  1 635 6809
  ch-8057 zuerich                                 (mobile) +41 76 372 0913
  switzerland                                     www.ifi.unizh.ch/~harris
__________________________________________________________________________

Reply via email to