Hi there !

1.) Is there a way that qmail also logs what it exactly does when
delivering
    mail ? I think of logging the SMTP commands etc.

2.) How can i log the POP3 Messages generated by QMail ?
    My POP3 Logs are empty ..

3.) I need a script/program that parses the SMTP log and calculates how
many MB
    of mail a set of users produced. 

4.) Here is my /etc/rc.d/init.d/qmail-init script , Red Hat 6.0, 2.2.12

#!/bin/sh
#
# /etc/init.d/qmail-init : start or stop the qmail mail subsystem.
#
# Written by Christian Hudon <[EMAIL PROTECTED]>
# fixed by Adam McKenna :p

PATH=$PATH:/usr/bin:/usr/local/bin:/var/qmail/bin
USERID=501    # CHANGE THIS TO YOUR QMAILD UID!!!
GROUPID=500  # CHANGE THIS TO YOUR NOFILES GID!!!

case "$1" in
    start)
        echo -n "Starting mail-transfer agent: qmail"

# note: the following command limits the amount of virtual memory
available to qmail.  
# That means that if a message comes in that is greater than (max avail.
mem) + 2048, 
# qmail will not be able to deliver it.  Removing this line can enable a
remote denial of service.
# man qmail-smtpd for information on how to use control files to limit
the size of incoming
# messages.

        ulimit -v 30000

        csh -cf '/var/qmail/rc &'

        # smptp
        supervise /var/lock/qmail-smtpd tcpserver -c400 -v -x/etc/tcp.smtp.cdb
-u$USERID -g$GROUPID 0 25 \
        rblsmtpd qmail-smtpd 2>&1 | setuser qmaill accustamp | \
        setuser qmaill cyclog -s5000000 -n5 /var/log/qmail/qmail-smtpd &

        # pop 3
        tcpserver 0 pop-3 /var/qmail/bin/qmail-popup localhost \
        /usr/local/bin/checkvpw /var/qmail/bin/qmail-pop3d Maildir/ & 
        echo "."

        ;;
    stop)
        echo -n "Stopping mail-transfer agent: qmail"
        PID=`ps -eo pid,comm | awk '{ if ($2 == "qmail-send") print $1}'`
        kill -TERM $PID
        svc -dx /var/lock/qmail-smtpd
        echo "."
        ;;
    restart)
        $0 stop
        $0 start
        ;;
    reload|force-reload)
        echo "Reloading 'locals' and 'virtualdomains' control files."
        PID=`ps -eo pid,comm | awk '{ if ($2 == "qmail-send") print $1}'`
        kill -HUP $PID
        ;;
    *)
        echo 'Usage: /etc/init.d/qmail {start|stop|restart|reload}'
        exit 1
esac

exit 0


--

Is everything OK with this script? 
THERE IS NOWHERE AN EXACTLY DOCUMENTATION ON A FUNCTIONAL QMAIL-BOOTUP
SCRIPT !
POP3 IS MENTIONED NOWHERE ... :-(

Thanks a lot !
  Thomas

Reply via email to