Athon Solo
05-04-2004, 08:24 PM
Hi all,
My installation seems OK except that I do not recieve emails from qmailstats, whether I run it manually or via the cron job. I've checked the emails and they appear to be correct.
I shutdown qmail, cleared the logs and loaded it back up again, ran qmailstats and the following appeared in /var/log/qmail/qmail-send/current:
@40000000409821e416aaf4a4 new msg 99564
@40000000409821e416ab5a34 info msg 99564: bytes 454 from <root@mail.sensoreddomain.net> qp 4841 uid 0
@40000000409821e4356cbc24 end msg 99564
This suggests that the email is being sent by the script, but that, for some reason, qmail isn't processing it.
Nothing ever appears on the account, watching via webmail, mozilla and /home/vpopmail/domains/sensoreddomain.net/postmaster/new and cur
Can anyone shed some light on what might be going wrong, or atleast any other logs I can look at to investigate further?
I can send emails to and from the account fine.
----
I took another look this morning and I think I know why the script doesn't work. I believe that only the output of the last command is being sent to qmail-inject. So I've altered the script to output to a file, then sent that file to qmail-inject and it works!
Here's the new script:
#!/bin/sh
# Qmailanalog invocation script
PATH=/usr/local/qmailanalog/bin:/var/qmail/bin:/bin:/usr/bin:/usr/local/bin
QMAILSTATS="/tmp/q.$$"
umask 077
cat /var/log/qmail/qmail-send/* /var/log/qmail/qmail-pop3d/* /var/log/qmail/qmail-smtpd/* | matchup | tai64n2tai > $QMAILSTATS 5>/dev/null
DATE=`date +'%D'`
echo "To: server_admin@my-domain.net" >> qmailstats.email
echo "From: postmaster@my-domain.net" >> qmailstats.email
echo "Subject: [SERVER] Nightly Qmail Stats Report for $DATE" >> qmailstats.email
echo "" >> qmailstats.email
zoverall < $QMAILSTATS >> qmailstats.email
zfailures < $QMAILSTATS >> qmailstats.email
zdeferrals < $QMAILSTATS >> qmailstats.email
cat qmailstats.email | qmail-inject
rm -f $QMAILSTATS
rm -f qmailstats.email
Regards,
Athon Solo
My installation seems OK except that I do not recieve emails from qmailstats, whether I run it manually or via the cron job. I've checked the emails and they appear to be correct.
I shutdown qmail, cleared the logs and loaded it back up again, ran qmailstats and the following appeared in /var/log/qmail/qmail-send/current:
@40000000409821e416aaf4a4 new msg 99564
@40000000409821e416ab5a34 info msg 99564: bytes 454 from <root@mail.sensoreddomain.net> qp 4841 uid 0
@40000000409821e4356cbc24 end msg 99564
This suggests that the email is being sent by the script, but that, for some reason, qmail isn't processing it.
Nothing ever appears on the account, watching via webmail, mozilla and /home/vpopmail/domains/sensoreddomain.net/postmaster/new and cur
Can anyone shed some light on what might be going wrong, or atleast any other logs I can look at to investigate further?
I can send emails to and from the account fine.
----
I took another look this morning and I think I know why the script doesn't work. I believe that only the output of the last command is being sent to qmail-inject. So I've altered the script to output to a file, then sent that file to qmail-inject and it works!
Here's the new script:
#!/bin/sh
# Qmailanalog invocation script
PATH=/usr/local/qmailanalog/bin:/var/qmail/bin:/bin:/usr/bin:/usr/local/bin
QMAILSTATS="/tmp/q.$$"
umask 077
cat /var/log/qmail/qmail-send/* /var/log/qmail/qmail-pop3d/* /var/log/qmail/qmail-smtpd/* | matchup | tai64n2tai > $QMAILSTATS 5>/dev/null
DATE=`date +'%D'`
echo "To: server_admin@my-domain.net" >> qmailstats.email
echo "From: postmaster@my-domain.net" >> qmailstats.email
echo "Subject: [SERVER] Nightly Qmail Stats Report for $DATE" >> qmailstats.email
echo "" >> qmailstats.email
zoverall < $QMAILSTATS >> qmailstats.email
zfailures < $QMAILSTATS >> qmailstats.email
zdeferrals < $QMAILSTATS >> qmailstats.email
cat qmailstats.email | qmail-inject
rm -f $QMAILSTATS
rm -f qmailstats.email
Regards,
Athon Solo