Re: [AMaViS-user] Re: amavis-stats-0.1.19 released

2005-12-09 Thread Matthias Keller

Dale Walsh wrote:



On Dec 8, 2005, at 06:15 , Matthias Keller wrote:


Joachim Schoenberg wrote:


Am Dienstag, 6. Dezember 2005 10:48 schrieb Dale Walsh:



Now it's running, but in debug mode I see

parseFile(/var/log/mail, 0, 3393576)
ERROR : Could not open file /var/log/mail: Permission denied

Well, I am logging amavisd-new to /var/log/mail to keep
all info in one place.
/var/log/mail is rw-r- on all my systems, owned by root:root.
How to manage that?


Well you could probably change ownership of /var/log/mail to vscan
to have a better separation I'm logging amavisd-new to /var/log/ 
amavisd.log and this one is rw-r- vscan:root which allows my  
amavis-stats to read it.


btw.. i didn't like the default install paths of it so if you want  
it to install to a (in my opinion) nicer destination like

/usr/share/amavis-stats/  (for php and config)
/var/lib/amavis-stats/  (for rrd stuff)
etc, feel free to use my configure statement:

./configure --enable-id-check --with-user=vscan --mandir=/usr/share/ 
man --datadir=/usr/share \
--sysconfdir=/etc --localstatedir=/var --sbindir=/sbin --prefix=/ 
usr/share/amavis-stats



.configure --enable-id-check --with-user=vscan --with-group=vscan -- 
prefix=/usr \

 --mandir=/usr/share/man  --localstatedir=/var --sysconfdir=/etc


Well I left the group as-is (www) because that allows me to set very 
tight permissions and the webserver ist still able to read all it wants
Thanks for the cleaning up. I thought there should be a shorter solution 
but after some trial and error in my virtual machine i noticed the above 
works so i used it :)


Matt


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
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/


[AMaViS-user] Re: amavis-stats-0.1.19 released

2005-12-09 Thread Dale Walsh


On Dec 9, 2005, at 04:49 , Joachim Schoenberg wrote:


Hello Dale,


2. configure finds user www in /etc/passwd,
   but in fact the user is wwwrun.
   So make complains about missing user www later.
   I used --with-user, but I thing configure does wrong parsing.


If it's finding www in /etc/passwd then the user is in it.


No, it isn't.
Only wwwrun is there.
If www would exist make would not complain about
missing user www later.


You state that configure finds user www in /etc/passwd, if the user
is not there then it shouldn't find it.

I set a default user (www) if this is not the user your web server
runs under then you use the user/group of the user that does.


OK, that's clear, but the problem was:
configure seems to find that user even if doesn't exist.


do:
cat /etc/passwd | grep www

 and see what it's matching on.



Since I am unable to duplicate this problem I can't see where the
problem is.


I repeated my installation:
configure says
...
Checking for user/group
checking for www in /etc/passwd... yes, user www and group www exist.
...

configure includes that code:
webuser=`cat /etc/passwd|grep $web_user`


Yes, I see now, a regular grep, needs refinement, I'm extremely busy  
however, if someone has a solution for the various methods of user  
checking I'd be happy to add it as soon as time permits.



My webuser is wwwrun which is the default for SuSE for a long time.
So asking for www with grep that way will give a positive result.



Alternately you can just change the group to wwwrun's group and it
should work too.


Yes, I think that's better because there is no need changing
ownerships for some amavis-stats directories.

One hint: you had written somewhere you would add a
command line option in 0.1.19 to configure for non standard mail logs
(/var log/mail in my case). This option is still missing.


do
./configure

when it's done edit configure.in and change:
scan_log_file=/var/log/amavis.log

to:
AC_ARG_WITH(log-file,
[  --with-log-filelogfile to read (default=/var/log/amavis.log)],
scan_log_file=$withval, scan_log_file=/var/log/amavis.log)

save it.

issue:
make clean

./configure --help

Optional Features:
  --disable-FEATURE   do not include FEATURE (same as --enable- 
FEATURE=no)

  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-id-check   use id utility instead of /etc/passwd parsing
  --enable-yp-check   use ypmatch utility instead of /etc/passwd  
parsing
  --enable-netinfo-check use netinfo utility instead of /etc/passwd  
parsing

  --disable-startup   disable startup item
  --disable-web   disable test for web user/group
  --disable-dependency-tracking  speeds up one-time build
  --enable-dependency-tracking   do not reject slow dependency  
extractors


Optional Packages:
  --with-PACKAGE[=ARG]use PACKAGE [ARG=yes]
  --without-PACKAGE   do not use PACKAGE (same as --with- 
PACKAGE=no)

  --with-log-file logfile to read (default=/var/log/amavis.log)
  --with-user=uid name of the web user (default=www)
  --with-group=gidname of the web group (default=www)



that should take care of the problem.



Thanks

Joe





---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
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/


Re: [AMaViS-user] Re: amavis-stats-0.1.19 released

2005-12-09 Thread Matthias Keller

Dale Walsh wrote:



On Dec 9, 2005, at 04:49 , Joachim Schoenberg wrote:


Hello Dale,


2. configure finds user www in /etc/passwd,
   but in fact the user is wwwrun.
   So make complains about missing user www later.
   I used --with-user, but I thing configure does wrong parsing.



If it's finding www in /etc/passwd then the user is in it.



No, it isn't.
Only wwwrun is there.
If www would exist make would not complain about
missing user www later.



You state that configure finds user www in /etc/passwd, if the user
is not there then it shouldn't find it.

I set a default user (www) if this is not the user your web server
runs under then you use the user/group of the user that does.



OK, that's clear, but the problem was:
configure seems to find that user even if doesn't exist.



do:
cat /etc/passwd | grep www

 and see what it's matching on.


Yes, I see now, a regular grep, needs refinement, I'm extremely busy  
however, if someone has a solution for the various methods of user  
checking I'd be happy to add it as soon as time permits. 




That's simple. since www is contained in our user name it returns:
wwwrun:x:30:8:WWW daemon apache:/var/lib/wwwrun:/bin/false

 webuser=`cat /etc/passwd|grep $web_user`
maybe you should egrep for:   ^www: to see if a user www really exists...
and that cat is inneccessary since grep can read files too...
maybe something like

webuser=`grep -e ^$web_user: /etc/passwd`

If this returns something that user exists for sure.
if it fails it should inform of the two options to specify uid and gid...

Matt


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
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/


Re: [AMaViS-user] Re: amavis-stats-0.1.19 released

2005-12-09 Thread Haines Brown
Based on this thread, I decided to install amavis-stats, but man
amavis-stats left me in the dark. The synopsis is: amavis-stats
[options] logfile, but the manual does not specify what this logfile
should be.

I'm running debian with spamassassin, clamav, and amavisd-new. The
rrdtool is also installed.

-- 
 
   Haines Brown
   KB1GRM   


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
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/


Re: [AMaViS-user] Re: amavis-stats-0.1.19 released

2005-12-09 Thread Matthias Keller

Haines Brown wrote:


Based on this thread, I decided to install amavis-stats, but man
amavis-stats left me in the dark. The synopsis is: amavis-stats
[options] logfile, but the manual does not specify what this logfile
should be.

I'm running debian with spamassassin, clamav, and amavisd-new. The
rrdtool is also installed.
 


Have a look at:
/etc/amavis-stats.conf
/usr/share/amavis-stats/amavis-stats.php.conf
and actually all the READMEs in the tar.gz.

Matt


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
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/


[AMaViS-user] Re: amavis-stats-0.1.19 released

2005-12-09 Thread Joachim Schoenberg
Haines,

 Based on this thread, I decided to install amavis-stats, but man
 amavis-stats left me in the dark. The synopsis is: amavis-stats
 [options] logfile, but the manual does not specify what this logfile
 should be.
 
 I'm running debian with spamassassin, clamav, and amavisd-new. The
 rrdtool is also installed.
 
The logfile is the amavis-new log you want to have statistics from.
Default is /var/log/amavis.log

If you want to change this you have to fiddle around a bit.
The name of the used log can be found in the makefile(s).

Joe
 
-- 

 Joachim Schoenberg  PHONE:+49 30 20377 374  
 Paul-Drude-Institut fuerFAX:  +49 30 20377 201  
 Festkoerperelektronik Berlin



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
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/


Re: [AMaViS-user] Re: amavis-stats-0.1.19 released

2005-12-09 Thread Haines Brown
 Haines Brown wrote:
 
 Based on this thread, I decided to install amavis-stats, but man
 amavis-stats left me in the dark. The synopsis is: amavis-stats
 [options] logfile, but the manual does not specify what this logfile
 should be.
 
 Have a look at:
 /etc/amavis-stats.conf
 /usr/share/amavis-stats/amavis-stats.php.conf
 and actually all the READMEs in the tar.gz.

Matt, thanks. Took a look at the README.tar.gz. Following its
direction, I added amavis to the adm group. I then did # su - amavis,
but instead of getting to an amavis# prompt as indicated in the
README, I end up at [EMAIL PROTECTED]:~$. 

From this prompt, trying to run 

  /usr/sbin/amavis-stats /var/log/mail.info

  amavis-stats: /var/lib/amavis-stats does not exist or cannot be
  written to.

The problem may be that I don't know how to give amavis user root
privileges. 

-- 
 
   Haines Brown
   KB1GRM   


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
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/


[AMaViS-user] Re: amavis-stats-0.1.19 released

2005-12-09 Thread Haines Brown
 Haines,
 
  Based on this thread, I decided to install amavis-stats, but man
  amavis-stats left me in the dark. The synopsis is: amavis-stats
  [options] logfile, but the manual does not specify what this
  logfile should be.
  
  I'm running debian with spamassassin, clamav, and amavisd-new. The
  rrdtool is also installed.
  
 The logfile is the amavis-new log you want to have statistics from.
 Default is /var/log/amavis.log

No such file on my machine.

 If you want to change this you have to fiddle around a bit.
 The name of the used log can be found in the makefile(s).

I didn't compile amavis-stats from source, but installed the .deb.

-- 
 
   Haines Brown
   KB1GRM   


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
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/


Re: [AMaViS-user] Re: amavis-stats-0.1.19 released

2005-12-09 Thread Dale Walsh


On Dec 9, 2005, at 09:38 , Haines Brown wrote:


Haines,


Based on this thread, I decided to install amavis-stats, but man
amavis-stats left me in the dark. The synopsis is: amavis-stats
[options] logfile, but the manual does not specify what this
logfile should be.

I'm running debian with spamassassin, clamav, and amavisd-new. The
rrdtool is also installed.


The logfile is the amavis-new log you want to have statistics from.
Default is /var/log/amavis.log


No such file on my machine.


Edit the daemon config file (amavis-stats.conf) and change this to  
the log file you want to use.



If you want to change this you have to fiddle around a bit.
The name of the used log can be found in the makefile(s).


I didn't compile amavis-stats from source, but installed the .deb.


If the person who made the package did it correctly, 'man amavis- 
stats' will list the location of the installed files.



--

   Haines Brown
   KB1GRM


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through  
log files

for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD  
SPLUNK!

http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
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/





---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
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/


[AMaViS-user] Re: amavis-stats-0.1.19 released

2005-12-08 Thread Joachim Schoenberg
Am Dienstag, 6. Dezember 2005 10:48 schrieb Dale Walsh:
 amavis-stats (0.1.19) stable; urgency=recommended

Hello Dale, 

after some problems I was able to compile it:

1. gzcat not found while configure.
   I couldn't find it in my distro (SuSE-Linux 9.2),
   couldn't find it at gnu page.
   I linked zcat to gzcat, works.

2. configure finds user www in /etc/passwd,
   but in fact the user is wwwrun.
   So make complains about missing user www later.
   I used --with-user, but I thing configure does wrong parsing.

 
Now it's running, but in debug mode I see

parseFile(/var/log/mail, 0, 3393576)
ERROR : Could not open file /var/log/mail: Permission denied

Well, I am logging amavisd-new to /var/log/mail to keep
all info in one place.
/var/log/mail is rw-r- on all my systems, owned by root:root.
How to manage that?

Joe

-- 

 Joachim Schoenberg  PHONE:+49 30 20377 374  
 Paul-Drude-Institut for FAX:  +49 30 20377 257  
 Solid State Electronics, Berlin



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
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/


Re: [AMaViS-user] Re: amavis-stats-0.1.19 released

2005-12-08 Thread Matthias Keller

Joachim Schoenberg wrote:


Am Dienstag, 6. Dezember 2005 10:48 schrieb Dale Walsh:
 


amavis-stats (0.1.19) stable; urgency=recommended
   



Hello Dale, 


after some problems I was able to compile it:

1. gzcat not found while configure.
  I couldn't find it in my distro (SuSE-Linux 9.2),
  couldn't find it at gnu page.
  I linked zcat to gzcat, works.

2. configure finds user www in /etc/passwd,
  but in fact the user is wwwrun.
  So make complains about missing user www later.
  I used --with-user, but I thing configure does wrong parsing.
 


I noticed those two things too on my suse 10
I'm using the user vscan and group www now to solve the problem below: 
(use --enable-id-check to solve that bug with www)



Now it's running, but in debug mode I see

parseFile(/var/log/mail, 0, 3393576)
ERROR : Could not open file /var/log/mail: Permission denied

Well, I am logging amavisd-new to /var/log/mail to keep
all info in one place.
/var/log/mail is rw-r- on all my systems, owned by root:root.
How to manage that?
 


Well you could probably change ownership of /var/log/mail to vscan
to have a better separation I'm logging amavisd-new to 
/var/log/amavisd.log and this one is rw-r- vscan:root which allows 
my amavis-stats to read it.


btw.. i didn't like the default install paths of it so if you want it to 
install to a (in my opinion) nicer destination like

/usr/share/amavis-stats/  (for php and config)
/var/lib/amavis-stats/  (for rrd stuff)
etc, feel free to use my configure statement:

./configure --enable-id-check --with-user=vscan --mandir=/usr/share/man 
--datadir=/usr/share \
--sysconfdir=/etc --localstatedir=/var --sbindir=/sbin 
--prefix=/usr/share/amavis-stats

make
make install

then, make sure /var/lib/amavis-stats is owned by vscan, including all 
files that might exist


on my suse i also had the problem of a not-so-very-nice layout because 
of another font than expected. If you got that problem too I can send 
you instructions how to correct it  - at least it works with my rrdtool 
1.2.11 which is used as an external command (not compiled into php)


Matt


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
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/


Re: [AMaViS-user] Re: amavis-stats-0.1.19 released

2005-12-08 Thread Matthias Keller

Joachim Schoenberg wrote:


Hello Matt,

Am Donnerstag, 8. Dezember 2005 12:15 schrieb Matthias Keller:
 

on my suse i also had the problem of a not-so-very-nice layout because 
of another font than expected. If you got that problem too I can send 
you instructions how to correct it  - at least it works with my rrdtool 
1.2.11 which is used as an external command (not compiled into php)
   


Yes, you are right, the fonts look a little bit ugly.
Please send me you instructions.
However I am still using rrdtool 1.0.49
 


I'm not sure if your version already supports it but it's worth a try
open your /usr/share/amavis-stats.php or wherever it is.
around line 105 there's the function rrd_graph which gets called if
there's no rrd support built-in.

anywhere in there before the  $cmd =  insert the following lines:

$opts[] = --font=LEGEND:7:/usr/share/amavis-stats/lucon.ttf;
$opts[] = --font-render-mode=mono;  # you might also experiment with
'light'

You should be able to get lucon.ttf from every windows system. place it 
where you like and adjust the path.

If you cant get it i'll send it to you directly

Remember, this only works with the command-line rrdtool (IF it works at
all with your version)

You might also want to increase the width of the graphs to approx 600
To do that look for every occurence of:
$opts[] = --width=
in your amavis-stats.php and change that value to 600 or whatever you please

Good luck

Matt



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
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/