Hello All,

I know that Dale Walsh is on this list, so may be he'll give some inside
wisdom on amavis-stats config, or may be there any users that could tell me
wht the problem is.

I have mail server running Cyrus+Postfix+Web-cyradm and managing 2 virtual
domains on SLES9.

All mail related logs go to /var/log/mail.
# ls -l /var/log/mail
-rw-r-----  1 root root 6992487 Dec 27 16:09 /var/log/mail

Now, I've installed amavis-stats-0.1.22 like this:
./configure --enable-id-check --with-log-file=/var/log/mail
--with-user=wwwrun --with-group=root --prefix=/usr --mandir=/usr/share/man
--localstatedir=/var --sysconfdir=/etc
make
make install

Added to httpd.conf and restarted apache:
Include /usr/share/amavis-stats/amavis-stats.alias.conf

To run amavis-stats just do:

# /usr/sbin/amavis-stats start

I've made sure that in config file I have:
# vi /etc/amavis-stats.conf
$daemon_user    = 'wwwrun';   # (no default;  customary: wwwrun)
$daemon_group   = 'root';   # (no default;  customary: www)
$scan_logfile           = "/var/log/mail";
@my_domains             = qw(domain1.com domain2.com); 


And now for the problems I have:

1) It seems that per domain stats are not working I see on web-interface:
No statistics available.        
No statistics available.        
No statistics available.
# ls -l /var/lib/amavis-stats/domain1.com/
total 4
drwxr-x---  2 wwwrun root 168 Dec 27 14:55 .
drwxrwxr-x  4 wwwrun www  424 Dec 27 15:36 ..
-rw-r-----  1 wwwrun root   0 Dec 27 15:25 amavis-stats.count
-rw-r-----  1 wwwrun root   0 Dec 27 15:25 amavis-stats.seen
-rw-r-----  1 wwwrun root  57 Dec 27 15:25 amavis-stats.state
# ls -l /var/lib/amavis-stats/domain2.com/
total 4
drwxr-x---  2 wwwrun root 168 Dec 27 14:55 .
drwxrwxr-x  4 wwwrun www  424 Dec 27 15:36 ..
-rw-r-----  1 wwwrun root   0 Dec 27 15:25 amavis-stats.count
-rw-r-----  1 wwwrun root   0 Dec 27 15:25 amavis-stats.seen
-rw-r-----  1 wwwrun root  57 Dec 27 15:25 amavis-stats.state
# ls -l /var/lib/amavis-stats
total 161
drwxrwxr-x   4 wwwrun www    424 Dec 27 15:36 .
drwxr-xr-x  37 root   root  1000 Dec 27 13:09 ..
-rw-r-----   1 wwwrun root 21692 Dec 27 15:35 1.rrd
-rw-r-----   1 wwwrun root 21692 Dec 27 15:35 2.rrd
-rw-r-----   1 wwwrun root 21692 Dec 27 15:35 3.rrd
-rw-r-----   1 wwwrun root 21692 Dec 27 15:35 4.rrd
-rw-r-----   1 wwwrun root 21692 Dec 27 15:35 5.rrd
-rw-r-----   1 wwwrun root 21692 Dec 27 15:35 6.rrd
-rw-r-----   1 wwwrun root    28 Dec 27 15:35 amavis-stats.count
-rw-r-----   1 wwwrun root   101 Dec 27 15:35 amavis-stats.names
-rw-r-----   1 wwwrun root   144 Dec 27 15:35 amavis-stats.seen
-rw-r-----   1 wwwrun root    57 Dec 27 15:35 amavis-stats.state
drwxr-x---   2 wwwrun root   168 Dec 27 14:55 domain1.com
drwxr-x---   2 wwwrun root   168 Dec 27 14:55 domain2.com
# ls -l /var/cache/amavis-stats
total 52
drwxrwxr-x  4 wwwrun www   424 Dec 27 15:08 .
drwxr-xr-x  9 root   root  224 Dec 27 13:09 ..
drwxr-x---  2 wwwrun root   48 Dec 27 14:55 domain1.com
drwxr-x---  2 wwwrun root   48 Dec 27 14:55 domain2.com
-rw-r--r--  1 wwwrun www  5099 Dec 27 15:26 passed-daily.png
-rw-r--r--  1 wwwrun www  4834 Dec 27 15:13 passed-weekly.png
-rw-r--r--  1 wwwrun www  3100 Dec 27 15:04 passed-yearly.png
-rw-r--r--  1 wwwrun www  4837 Dec 27 15:26 sb-daily.png
-rw-r--r--  1 wwwrun www  4432 Dec 27 15:13 sb-weekly.png
-rw-r--r--  1 wwwrun www  3270 Dec 27 15:04 sb-yearly.png
-rw-r--r--  1 wwwrun www  3429 Dec 27 15:26 virus-daily.png
-rw-r--r--  1 wwwrun www  3467 Dec 27 15:13 virus-weekly.png
-rw-r--r--  1 wwwrun www  3191 Dec 27 15:04 virus-yearly.png

And I see that other users had this problem before:
http://www.mail-archive.com/amavis-user@lists.sourceforge.net/msg03183.html

On the other hand I see that it is working on Dale's demo site.

What could be the problem here?

2) I didn't find any way to feed amavis-stats my old logs for last week
(because I've got my mail log rotated and gzipped every night), for example:

This is not working:
(zcat =`ls -rt /var/log/mail-*.gz | tail -n 7`) | amavis-stats


# ls -rt /var/log/mail-*.gz | tail -n 7
/var/log/mail-20061220.gz
/var/log/mail-20061222.gz
/var/log/mail-20061223.gz
/var/log/mail-20061224.gz
/var/log/mail-20061225.gz
/var/log/mail-20061226.gz
/var/log/mail-20061227.gz

Is there any convenient way to feed old logs to amavis-stats?
Does setting $daemonize = 0; will enable this kind of behavior?

I've seen that "amavis-stats -r maillog.file" is not working anymore. Why?

3) I didn't find any reference for delaycompress in amavis-stats manual, but
I've seen on the web that some people recommend adding "delaycompress"
option to logrotate config.

Does amavis-stats knows to go to previously rotated log file and read info
from it?

May be it is a good idea to add something like "Incremental yes" option to
amavis-stats like webalizer have?

Taken from webalizer.conf:
-------------------------
# Incremental processing allows multiple partial log files to be used
# instead of one huge one.  Useful for large sites that have to rotate
# their log files more than once a month.  The Webalizer will save its
# internal state before exiting, and restore it the next time run, in
# order to continue processing where it left off.  This mode also causes
# The Webalizer to scan for and ignore duplicate records (records already
# processed by a previous run).  See the README file for additional
# information.  The value may be 'yes' or 'no', with a default of 'no'.
# The file 'webalizer.current' is used to store the current state data,
# and is located in the output directory of the program (unless changed
# with the IncrementalName option below).  Please read at least the section
# on Incremental processing in the README file before you enable this
option.

Incremental   yes
------------------

4) And finally:
Next week I'll probably try Mailgraph.
Does it have per domain stats?
What about delaycompress option for Mailgraph? Does it need to be set?



Best Regards,
Leon Kolchinsky



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to