Koozali.org: home of the SME Server

Not getting daily report from spamfilter-stats contrib?

hamdodger

Not getting daily report from spamfilter-stats contrib?
« 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?

Offline Curly

  • ****
  • 114
  • +0/-0
Not getting daily report from spamfilter-stats contrib?
« Reply #1 on: July 27, 2007, 07:19:31 PM »
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)
.......................................

hamdodger

Not getting daily report from spamfilter-stats contrib?
« Reply #2 on: July 27, 2007, 07:28:17 PM »
Are the .s log files generated on a daily basis or are they a per email log file?

Offline Curly

  • ****
  • 114
  • +0/-0
Not getting daily report from spamfilter-stats contrib?
« Reply #3 on: July 27, 2007, 10:22:01 PM »
The files are generated when the log file reaches a certain size, somewhere around 5000000 bytes.
.......................................

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Not getting daily report from spamfilter-stats contrib?
« Reply #4 on: July 27, 2007, 11:02:00 PM »
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:
Code: [Select]
# 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:
Code: [Select]
# 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...

hamdodger

Not getting daily report from spamfilter-stats contrib?
« Reply #5 on: July 27, 2007, 11:08:37 PM »
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.

hamdodger

Not getting daily report from spamfilter-stats contrib?
« Reply #6 on: July 28, 2007, 09:12:50 PM »
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.

Offline brianr

  • *
  • 990
  • +2/-0
Not getting daily report from spamfilter-stats contrib?
« Reply #7 on: July 28, 2007, 10:42:16 PM »
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
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

hamdodger

Not getting daily report from spamfilter-stats contrib?
« Reply #8 on: July 28, 2007, 10:44:57 PM »
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 ~]#

Offline brianr

  • *
  • 990
  • +2/-0
Not getting daily report from spamfilter-stats contrib?
« Reply #9 on: July 28, 2007, 11:00:38 PM »
oops. sorry, that should have been:

cat /var/log/qpsmtpd/current | grep "\`" | wc
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

hamdodger

Not getting daily report from spamfilter-stats contrib?
« Reply #10 on: July 28, 2007, 11:11:21 PM »
Ah OK.  Here's the results:

[root@mailserver ~]# cat /var/log/qpsmtpd/current | grep "\`" | wc
    303    4579   72129
[root@mailserver ~]#

Offline brianr

  • *
  • 990
  • +2/-0
Not getting daily report from spamfilter-stats contrib?
« Reply #11 on: July 29, 2007, 05:24:44 AM »
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
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........