> -----Original Message-----
> From: Jerzy Sakol [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 09, 2007 1:27 PM
> To: Leon Kolchinsky
> Subject: Re: [AMaViS-user] amavis-stats
> 
> >From: "Leon Kolchinsky" <[EMAIL PROTECTED]>
> >Sent: Tuesday, January 09, 2007 11:15 AM
> 
> 
> > I'd suggest to install newer version of amavis-stats (originally by Mark
> > Lawrence, since 0.1.14 maintained by Dale Walsh) from
> > http://osx.topicdesk.com/downloads/
> >
> 
> The amavis-stats project is my preferable choice because of using  PHP +
> perl ( instead of CGI scripts), but sadly the support and mailing-list
> doesn't exist.
> May be the author (Dale) or someone create more convenient amavis-stats
> users information share place.
> Another problem is, that author has been tested amavis-stats only on MacOS
> X, but most people using other distributions ( in my example Fedora).
> 
> My detail question is:
> How can I  read (in more convenient way) old log files in amavis-stats
> version 0.1.22 ( option -r is obsolete)?

It's doable, put all your old logs into single file, change $scan_logfile
parameter in amavis-stats.conf and run amavis-stats with "-c
/path_to/amavis-stats.conf".

It logs to mail log file via syslog so you should see something like (So you
know that log scanning is finished):

Jan  3 18:05:01 daleenterprise Amavis-Stats[5189]: Starting -> 
localhost Jan  3 18:05:01 daleenterprise Amavis-Stats[5189]: Finished 
-> localhost Jan  3 18:05:01 daleenterprise Amavis-Stats[5189]: 
Starting -> daleenterprise.com Jan  3 18:05:01 daleenterprise 
Amavis-Stats[5189]: Finished -> daleenterprise.com Jan  3 18:05:01 
daleenterprise Amavis-Stats[5189]: Starting -> mustangrestomods.com 
Jan  3 18:05:01 daleenterprise Amavis-Stats[5189]: Finished -> 
mustangrestomods.com

Now kill the process, reconfigure amavis-stats.conf to point to your actual
maillog file and start amavis-stats again.

> 

If Dale would like to take amavis-stats project further, he'll start a
mailing-list and produce decent documentation, I've already suggested it to
him.

Between *** below you could see a snippet from my correspondence with Dale
(This snippet don't contain any sensitive info so I let myself to publish
it).
As you can see I wanted a same functionality as you want:

*******************************************************************
> You're right it's my typo, it should be like this:
> # zcat `ls -rt /var/log/mail-*.gz | tail -n 7` | amavis-stats
>
> And this is not working cause amavis-stats can't read piped info :( I 
> think there should be parameter in amavis-stats.conf, telling that 
> amavis-stats should get log file from stdin for processing.

This could be added but the demand for such a feature is pretty much
nonexistent at this time.

> a) I've uncommented
> $daemonize              = 0;
> b) Changed
> $scan_logfile           = "/var/log/mail.old";
> c) # zcat mail-20070104.gz > mail.old
> d) My understanding that you use the following to nullify amavis-stats 
> position counter:
> # cat <<EOF >>/var/lib/amavis-stats/amavis-stats.state
> pos: 0
> lastupdate: 1167859440
> LC_TIME: C
> EOF
>
> e) Run amavis-stats:
> # amavis-stats -c /etc/amavis-stats.conf start
>
> And it runs forever :(
> Shouldn't amavis-stats return to command line after it finishes the 
> log processing in non deamonized mode?
>
> The process is still there:
> # ps -ef | grep Ama
> wwwrun   13387 10969  3 11:20 pts/0    00:00:22 Amavis-Stats
>
> May be I'd like to process only yesterday logs with non deamonized 
> mode as a cronjob.
> Is it possible to uncompress several latest rotated mailllogs to tmp 
> file and feed it to amavis-statslike this?:

It's meant to be run as a daemon, you'd be better off using all the old log
files and scan the data in, it also could take some time if the files is
large.

> mail:/var/log # zcat `ls -rt /var/log/mail-*.gz | tail -n 7` > 
> mail.old mail:/var/log # ls -lh mail.old
> -rw-r--r--  1 root root 84M Jan  4 11:58 mail.old mail:/var/log # 
> amavis-stats -c /etc/amavis-stats.conf start
>
> As stated before, it runs forever. What can I change in the source so 
> I could get the desired behaviour (i.e. make amavis-stats return to 
> command line after processing the log, and make it work with logfile 
> fed from stdin)?

set daemon = 0 and run with "amavis-stats debug"

*****************************************************************


> Regards,
> Jurek


Regards,
Leon



-------------------------------------------------------------------------
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
[email protected]
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