Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: hamdodger on July 27, 2007, 07:11:18 PM
-
I've followed all the instructions from install_howto.txt from http://mirror.contribs.org/smeserver/contribs/bread/mailstats/, but I don't receive a daily email report from the mailstats.cron job.
When I try to manually force a report using the following command:
/usr/bin/spamfilter-stats-7.pl /var/log/qpsmtpd/*.s /var/log/qpsmtpd/current
I get the following response:
Can't open /var/log/qpsmtpd/*.s: No such file or directory at /usr/bin/spamfilter-stats-7.pl line 259.
When I look in /var/log/qsmtpd I notice that no logs with the .s suffix are being generated.
Any ideas as to what's broken?
-
The files /var/log/qpsmtpd/*.s are older log-files, I suspect you'll have to wait a few days for it to work (or manually create dummy empty files)
-
Are the .s log files generated on a daily basis or are they a per email log file?
-
The files are generated when the log file reaches a certain size, somewhere around 5000000 bytes.
-
Some users in the past have found that /var/log/qpsmtpd fills up with files that end in ".u" instead of ".s".
Multilog files will end in ".u" if something happened that prevented the normal renaming process.
spamfilter-stats-7.pl can scan these files with no problem, but you have to tell it to do so.
The default mailstats.cron file looks like this:# Spam Filter Statistics Crond Entry
#+-----------------------Minute (0-59)
#| +-------------------Hour of Day (0-23)
#| | +---------------Day of Month (1-31)
#| | | +-----------Month of Year (1-12)
#| | | | +-------Day of Week (0=Sun,6=Sat)
#v v v v v
0 0 * * * root perl /usr/bin/spamfilter-stats-7.pl /var/log/qpsmtpd/*.s /var/log/qpsmtpd/current
If you change ".../*.s" to ".../*.[us]" you will process both .u and .s files. The result would look like this:# Spam Filter Statistics Crond Entry
#+-----------------------Minute (0-59)
#| +-------------------Hour of Day (0-23)
#| | +---------------Day of Month (1-31)
#| | | +-----------Month of Year (1-12)
#| | | | +-------Day of Week (0=Sun,6=Sat)
#v v v v v
0 0 * * * root perl /usr/bin/spamfilter-stats-7.pl /var/log/qpsmtpd/*.[us] /var/log/qpsmtpd/current
Lastly, the current version supports the "logterse" plugin - I don't know if that means it *requires* the logterse plugin, or not...
-
Currently the qpsmtpd directory is empty, except for the current, lock and state subdirectories. So I'm going to go on the previous assumption that I need to wait for more mail to arrive so that the requisite number needed to generate the .s log file will be generated.
-
So I subscribed to a couple if listservers, just to populate my mail spool faster. I received 250+ emails in the past 12 hours, and there are still no .s files being created in /var/log/qpsmtpd, nor am I getting the daily reports.
Any idea why the logs aren't being generated? I've checked perms on the script and cron job and they both look like they've got appropriate permissions.
-
forget the .s files - they are irrelevant, the script works ok just on the current log. however..
Have you got the "logterse" contrib installed? It comes with 7.2, but if earlier you can use the onstructions in my contrib area to install.
Try this:
cat /var/log/current | grep "\`" | wc
to see if there are any logterse lines in "current".
Cheers
Brian
-
This was the results:
[root@mailserver ~]# cat /var/log/current | grep "\'" | wc
cat: /var/log/current: No such file or directory
0 0 0
[root@mailserver ~]#
-
oops. sorry, that should have been:
cat /var/log/qpsmtpd/current | grep "\`" | wc
-
Ah OK. Here's the results:
[root@mailserver ~]# cat /var/log/qpsmtpd/current | grep "\`" | wc
303 4579 72129
[root@mailserver ~]#
-
ok, so you _have_ got logterse.
I think This ought to be dealt with in bugzilla
http://bugs.contribs.org/
Could you create an entry and put a link here?
I'd like a copy of the current log file, and also the results of:
ls -l /usr/bin/spamfilter-stats-7.pl
and
ls -l /etc/cron.d/mailstats.cron
Cheers
Brian