I have set up a second mailrelay on a linux box. Mailrelaying appears to be
working fine. However, I don't get any loggings in the logfiles. Instead,
logging info is sent to the console that was used to start the qmail
daemons.
I have the following:
[root@yuclnx2 /root]# head -25 /etc/rc.d/init.d/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
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
When I do start qmail and telnet to the mailserver's port 25, I get the
following on the console:
[root@yuclnx2 init.d]# /etc/rc.d/init.d/qmail start
Starting qmail: svscan.
[root@yuclnx2 init.d]# tcpserver: status: 0/500
status: local 0/10 remote 0/100
tcpserver: status: 1/500
tcpserver: pid 1061 from 172.16.10.133
tcpserver: ok 1061 :172.16.10.36:25 :172.16.10.133::1045
new msg 354821
info msg 354821: bytes 195 from <[EMAIL PROTECTED]> qp 1064 uid 502
starting delivery 1: msg 354821 to remote [EMAIL PROTECTED]
status: local 0/10 remote 1/100
delivery 1: success:
195.162.196.21_accepted_message./Remote_host_said:_250_RAA21933_Message_acce
pted_for_delivery/
status: local 0/10 remote 0/100
end msg 354821
tcpserver: end 1061 status 0
tcpserver: status: 0/500
When I stop everything, I get:
[root@yuclnx2 init.d]# /etc/rc.d/init.d/qmail stop
Stopping qmail: svscan qmailstatus: exiting
loggingsvc: warning: unable to control /var/qmail/supervise/qmail-send/log:
file does not exist
svc: warning: unable to control /var/qmail/supervise/qmail-smtpd/log: file
does not exist
.
Some more info:
[root@yuclnx2 init.d]# cat /var/qmail/rc
#!/bin/sh
# Using splogger to send the log through syslog.
# Using qmail-local to deliver messages to ~/Mailbox by default.
#exec env - PATH="/var/qmail/bin:$PATH" \
#qmail-start ./Mailbox splogger qmail
exec env - PATH="/var/qmail/bin:$PATH" \
qmail-start "`cat /var/qmail/control/defaultdelivery`"
[root@yuclnx2 init.d]# ls -R -l /var/qmail/supervise/
/var/qmail/supervise/:
total 8
drwxr-xr-x 4 root root 4096 Jan 24 10:52 qmail-send
drwxr-xr-x 4 root root 4096 Jan 24 10:52 qmail-smtpd
/var/qmail/supervise/qmail-send:
total 12
drwxr-xr-x 3 root root 4096 Feb 1 15:28 log
-rwxr-xr-x 1 root root 29 Jan 23 11:28 run
drwx------ 2 root root 4096 Feb 1 17:07 supervise
/var/qmail/supervise/qmail-send/log:
total 12
-rwxr-xr-x 1 root root 89 Feb 1 15:00 run
-rwxr-xr-x 1 root root 120 Feb 1 14:59 run.bak
drwxr-xr-x 2 root root 4096 Feb 1 17:09 supervise
/var/qmail/supervise/qmail-send/log/supervise:
total 0
/var/qmail/supervise/qmail-send/supervise:
total 4
prw------- 1 root root 0 Feb 1 17:07 control
-rw------- 1 root root 0 Jan 24 10:52 lock
prw------- 1 root root 0 Jan 24 10:52 ok
-rw-r--r-- 1 root root 18 Feb 1 17:07 status
/var/qmail/supervise/qmail-smtpd:
total 12
drwxr-xr-x 3 root root 4096 Feb 1 15:01 log
-rwxr-xr-x 1 root root 305 Jan 23 15:37 run
drwx------ 2 root root 4096 Feb 1 17:07 supervise
/var/qmail/supervise/qmail-smtpd/log:
total 12
-rwxr-xr-x 1 root root 94 Feb 1 15:01 run
-rwxr-xr-x 1 root root 125 Feb 1 15:00 run.bak
drwxr-xr-x 2 root root 4096 Feb 1 17:09 supervise
/var/qmail/supervise/qmail-smtpd/log/supervise:
total 0
/var/qmail/supervise/qmail-smtpd/supervise:
total 4
prw------- 1 root root 0 Feb 1 17:07 control
-rw------- 1 root root 0 Jan 24 10:52 lock
prw------- 1 root root 0 Jan 24 10:52 ok
-rw-r--r-- 1 root root 18 Feb 1 17:07 status
[root@yuclnx2 init.d]# cat /var/qmail/supervise/qmail-send/
log run supervise
[root@yuclnx2 init.d]# cat /var/qmail/supervise/qmail-send/run
#!/bin/sh
exec /var/qmail/rc
[root@yuclnx2 init.d]# cat /var/qmail/supervise/qmail-send/log/run
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t
/var/log/qmail
[root@yuclnx2 init.d]# cat /var/qmail/supervise/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 -p -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd 2>&1
[root@yuclnx2 init.d]# cat /var/qmail/supervise/qmail-smtpd/log/run
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t
/var/log/qmail/smtpd
[root@yuclnx2 init.d]# ls /var/log/qmail/ -l -R
/var/log/qmail/:
total 4
drwxr-xr-x 2 qmaill root 4096 Jan 24 10:48 smtpd
/var/log/qmail/smtpd:
total 0
What am I overlooking ? What else should I look at ? This seems pretty
common to me...
-Filip