Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Remo Mattei
I just installed it and it does not want to start on centos 5.2

 /sbin/service vusaged start
Failed

Any suggestions?

Remo


 From: Matt Brookings m...@inter7.com
 Reply-To: vchkpw@inter7.com
 Date: Wed, 04 Mar 2009 12:09:24 -0600
 To: vchkpw@inter7.com
 Subject: [vchkpw] vpopmail usage daemon v0.0.6
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 You can find the current development version at:
 

 http://www.inter7.com/devel/81793e028b8ae5c8e11c40a684264186/vusage-0.0.6.tar.
 bz2
 
 ChangeLog:
 
Added support for listening on an IP and port for connections
Fixed bug in socket_read that would call socket_write with free'd ptr
Fixed bug in user_verify that called userstore_usage with NULL ptr
Added support for Socket::Allow configuration
Added rejection of source IPs not explicitly allowed
Added user_get_usage to solve non-thread-safe vpopmail issue
Added domain_get_usage to solve non-thread-safe vpopmail issue
Updated query_parse to use user_get_usage and domain_get_usage
Updated query_parse to convert values to network byte order
Updated client_query to convert values to local byte order
Fixed bug in socket_read which evaluated a free'd ptr after socket_write
Updated socket_write not to complain about EPIPE write error
Updated directory_filesize not to return an error when ENOENT
Upgraded uthash from 1.4 to 1.5
Removed ENOENT stat failure reporting from userstore_poll
Set directory_filesize inline
Updated directory_filesize to use strtoll on original string instead of
 atoll on a copied buffer
 
 Notes:
 
* While the server can listen on a TCP port, the client cannot yet connect
 on a TCP port.
  Continue using the unix domain socket for the time being
 
* Major portion of this release is speed tweaks and bugfixes
 
* This release works best with the vpopmail trunk revision from the
 Sourceforge SVN server
 - --
 /*
 Matt Brookings m...@inter7.com   GnuPG Key D9414F70
 Software developer Systems technician
 Inter7 Internet Technologies, Inc. (815)776-9465
 */
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iEYEARECAAYFAkmuw9MACgkQ6QgvSNlBT3DqkQCgoj8/7WNrXZeX37DK1LTaNOqD
 pqsAn0Fj2u9eCjffyOjNdnrRvmGb1vVx
 =QUmT
 -END PGP SIGNATURE-
 
 
 


!DSPAM:49aec75532681137517012!



Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Matt Brookings
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Remo Mattei wrote:
 I just installed it and it does not want to start on centos 5.2
 
  /sbin/service vusaged start
 Failed
 
 Any suggestions?

Run the binary manually and see what it says.
- --
/*
Matt Brookings m...@inter7.com   GnuPG Key D9414F70
Software developer Systems technician
Inter7 Internet Technologies, Inc. (815)776-9465
*/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmux3wACgkQ6QgvSNlBT3AHJACfUMELGs8+LTOHTYHBG9lbtAi2
zjMAoK9B0eLkFW7BFwYfehBbTKOGmFkt
=wzCn
-END PGP SIGNATURE-


Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Remo Mattei
vusaged r...@italy1.com
vusaged: error while loading shared libraries: libev.so.3: cannot open
shared object file: No such file or directory


 From: Matt Brookings m...@inter7.com
 Reply-To: vchkpw@inter7.com
 Date: Wed, 04 Mar 2009 12:25:00 -0600
 To: vchkpw@inter7.com
 Subject: Re: [vchkpw] vpopmail usage daemon v0.0.6
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Remo Mattei wrote:
 I just installed it and it does not want to start on centos 5.2
 
  /sbin/service vusaged start
 Failed
 
 Any suggestions?
 
 Run the binary manually and see what it says.
 - --
 /*
 Matt Brookings m...@inter7.com   GnuPG Key D9414F70
 Software developer Systems technician
 Inter7 Internet Technologies, Inc. (815)776-9465
 */
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iEYEARECAAYFAkmux3wACgkQ6QgvSNlBT3AHJACfUMELGs8+LTOHTYHBG9lbtAi2
 zjMAoK9B0eLkFW7BFwYfehBbTKOGmFkt
 =wzCn
 -END PGP SIGNATURE-
 
 
 


!DSPAM:49aec80232681680181417!



Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Matt Brookings
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Remo Mattei wrote:
 vusaged r...@italy1.com
 vusaged: error while loading shared libraries: libev.so.3: cannot open
 shared object file: No such file or directory

You need to install libev, and it looks like you did that but the linker can't 
find it.
Try running ldconfig and trying again
- --
/*
Matt Brookings m...@inter7.com   GnuPG Key D9414F70
Software developer Systems technician
Inter7 Internet Technologies, Inc. (815)776-9465
*/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmuyHoACgkQ6QgvSNlBT3CR+wCfQjg2iK24GMXRMoxbrYr4jbQK
zugAoJab2d/5bevx/7vqc288a8hH9Wiz
=9S7R
-END PGP SIGNATURE-


Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Matt Brookings
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Remo Mattei wrote:
 vusaged r...@italy1.com
 vusaged: error while loading shared libraries: libev.so.3: cannot open
 shared object file: No such file or directory

..er, also, the only argument vusaged takes is a path to a configuration file.
vusagec takes email address arguments.  It's the client that talks to vusaged.
- --
/*
Matt Brookings m...@inter7.com   GnuPG Key D9414F70
Software developer Systems technician
Inter7 Internet Technologies, Inc. (815)776-9465
*/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmuyQAACgkQ6QgvSNlBT3Cn3wCgkd1om7mopuW5mj87yiMagp8N
QCAAnibrKD5gbhTvvWnd1b1Sqt1CWNzS
=wrhA
-END PGP SIGNATURE-


Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Remo Mattei
/vusaged r...@italy1.com
config: couldnt access /root/vusage-0.0.6/r...@italy1.com
config: error: failure
config_read failed


Still nothing.. 


 From: Matt Brookings m...@inter7.com
 Reply-To: vchkpw@inter7.com
 Date: Wed, 04 Mar 2009 12:31:28 -0600
 To: vchkpw@inter7.com
 Subject: Re: [vchkpw] vpopmail usage daemon v0.0.6
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Remo Mattei wrote:
 vusaged r...@italy1.com
 vusaged: error while loading shared libraries: libev.so.3: cannot open
 shared object file: No such file or directory
 
 ..er, also, the only argument vusaged takes is a path to a configuration file.
 vusagec takes email address arguments.  It's the client that talks to vusaged.
 - --
 /*
 Matt Brookings m...@inter7.com   GnuPG Key D9414F70
 Software developer Systems technician
 Inter7 Internet Technologies, Inc. (815)776-9465
 */
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iEYEARECAAYFAkmuyQAACgkQ6QgvSNlBT3Cn3wCgkd1om7mopuW5mj87yiMagp8N
 QCAAnibrKD5gbhTvvWnd1b1Sqt1CWNzS
 =wrhA
 -END PGP SIGNATURE-
 
 
 


!DSPAM:49aec9a932682954166902!



Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Matt Brookings
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Remo Mattei wrote:
 /vusaged r...@italy1.com
 config: couldnt access /root/vusage-0.0.6/r...@italy1.com
 config: error: failure
 config_read failed
 
 
 Still nothing.. 

Just run './vusaged', then run './vusagec r...@italy1.com'
- --
/*
Matt Brookings m...@inter7.com   GnuPG Key D9414F70
Software developer Systems technician
Inter7 Internet Technologies, Inc. (815)776-9465
*/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmuyewACgkQ6QgvSNlBT3DNWwCgpNyYgT5WtglqSG8poef45RLp
Cx8AoKf1Upswjbg/B1hAbieWfuVFd0jn
=exNe
-END PGP SIGNATURE-


Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Remo Mattei
Yeap that works

/vusaged 
[1] 27026
root ferrari  vusage-0.0.6 1114 socket: listening on /tmp/vusaged.sock
vusaged: begin
controller: stage one
controller: stage two

root ferrari  vusage-0.0.6 1114 ./vusagec r...@italy1.com
r...@italy1.com: 556437944 byte(s), domain: 2149526092 byte(s)

Remo


 From: Matt Brookings m...@inter7.com
 Reply-To: vchkpw@inter7.com
 Date: Wed, 04 Mar 2009 12:35:24 -0600
 To: vchkpw@inter7.com
 Subject: Re: [vchkpw] vpopmail usage daemon v0.0.6
 
 ./vusaged


!DSPAM:49aecbee32688874077782!



Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Matt Brookings
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Remo Mattei wrote:
 Yeap that works
 
 /vusaged 
 [1] 27026
 root ferrari  vusage-0.0.6 1114 socket: listening on /tmp/vusaged.sock
 vusaged: begin
 controller: stage one
 controller: stage two
 
 root ferrari  vusage-0.0.6 1114 ./vusagec r...@italy1.com
 r...@italy1.com: 556437944 byte(s), domain: 2149526092 byte(s)

If you take a look at the etc/vusaged.conf you can tweak how realtime it tries 
to be.
0.0.6 comes with a default of 120 seconds, so it will *try* to keep the usage 
totals
up to date to within 120 seconds unless a particular user takes a long time to 
update,
in which case, it will delay updates on that user.
- --
/*
Matt Brookings m...@inter7.com   GnuPG Key D9414F70
Software developer Systems technician
Inter7 Internet Technologies, Inc. (815)776-9465
*/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmuzG8ACgkQ6QgvSNlBT3AoKQCffRqF3sCql8sJ7HJshk96FJls
tggAnA//5T1F+knMcdWpmlGj3VkL6qMU
=np3Q
-END PGP SIGNATURE-


Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Remo Mattei
Ok but the services did not start from service vusaged start..
What tweak on that??

Remo


 From: Matt Brookings m...@inter7.com
 Reply-To: vchkpw@inter7.com
 Date: Wed, 04 Mar 2009 12:46:07 -0600
 To: vchkpw@inter7.com
 Subject: Re: [vchkpw] vpopmail usage daemon v0.0.6
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Remo Mattei wrote:
 Yeap that works
 
 /vusaged 
 [1] 27026
 root ferrari  vusage-0.0.6 1114 socket: listening on /tmp/vusaged.sock
 vusaged: begin
 controller: stage one
 controller: stage two
 
 root ferrari  vusage-0.0.6 1114 ./vusagec r...@italy1.com
 r...@italy1.com: 556437944 byte(s), domain: 2149526092 byte(s)
 
 If you take a look at the etc/vusaged.conf you can tweak how realtime it tries
 to be.
 0.0.6 comes with a default of 120 seconds, so it will *try* to keep the usage
 totals
 up to date to within 120 seconds unless a particular user takes a long time to
 update,
 in which case, it will delay updates on that user.
 - --
 /*
 Matt Brookings m...@inter7.com   GnuPG Key D9414F70
 Software developer Systems technician
 Inter7 Internet Technologies, Inc. (815)776-9465
 */
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iEYEARECAAYFAkmuzG8ACgkQ6QgvSNlBT3AoKQCffRqF3sCql8sJ7HJshk96FJls
 tggAnA//5T1F+knMcdWpmlGj3VkL6qMU
 =np3Q
 -END PGP SIGNATURE-
 
 
 


!DSPAM:49aecce932681060978433!



Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Matt Brookings
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Remo Mattei wrote:
 Ok but the services did not start from service vusaged start..
 What tweak on that??

Did you follow the INSTALL instructions?  If you copy vusaged and vusagec to 
/home/vpopmail/bin,
and copy etc/vusaged.conf to /home/vpopmail/etc, the rc script should work.

On your system, you may have had to run /sbin/ldconfig so the dynamic linker 
knew where libev was,
but you should only have to do that once.
- --
/*
Matt Brookings m...@inter7.com   GnuPG Key D9414F70
Software developer Systems technician
Inter7 Internet Technologies, Inc. (815)776-9465
*/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmuzWQACgkQ6QgvSNlBT3CcmgCcDwmJa2zTcP1UiGkG9Cl30GzH
4pEAn1rAkovk7ivxYQY9jGeyMcI/nuIL
=NSXn
-END PGP SIGNATURE-


Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Remo Mattei
I follow as you wrote in the INSTALL let me try one more time..


And it says 

service vusaged start
Starting vusaged: failed

Other suggestions?

Remo


 From: Matt Brookings m...@inter7.com
 Reply-To: vchkpw@inter7.com
 Date: Wed, 04 Mar 2009 12:50:12 -0600
 To: vchkpw@inter7.com
 Subject: Re: [vchkpw] vpopmail usage daemon v0.0.6
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Remo Mattei wrote:
 Ok but the services did not start from service vusaged start..
 What tweak on that??
 
 Did you follow the INSTALL instructions?  If you copy vusaged and vusagec to
 /home/vpopmail/bin,
 and copy etc/vusaged.conf to /home/vpopmail/etc, the rc script should work.
 
 On your system, you may have had to run /sbin/ldconfig so the dynamic linker
 knew where libev was,
 but you should only have to do that once.
 - --
 /*
 Matt Brookings m...@inter7.com   GnuPG Key D9414F70
 Software developer Systems technician
 Inter7 Internet Technologies, Inc. (815)776-9465
 */
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iEYEARECAAYFAkmuzWQACgkQ6QgvSNlBT3CcmgCcDwmJa2zTcP1UiGkG9Cl30GzH
 4pEAn1rAkovk7ivxYQY9jGeyMcI/nuIL
 =NSXn
 -END PGP SIGNATURE-
 
 
 


!DSPAM:49aece2b32688147637893!



Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Matt Brookings
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Remo Mattei wrote:
 I follow as you wrote in the INSTALL let me try one more time..
 
 
 And it says 
 
 service vusaged start
 Starting vusaged: failed
 
 Other suggestions?

As root, run:

/home/vpopmail/bin/vusaged /home/vpopmail/etc/vusaged.conf

..and paste the output.
- --
/*
Matt Brookings m...@inter7.com   GnuPG Key D9414F70
Software developer Systems technician
Inter7 Internet Technologies, Inc. (815)776-9465
*/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmuzpcACgkQ6QgvSNlBT3DE2wCfeatEzI97/q2+gN++6r9MHHwH
pU8An2eVPF9eH1pS8HU+HQUNB8f6EF/l
=lUV5
-END PGP SIGNATURE-


Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Remo Mattei
I found the problem.. It was on the allow line 36 it goes now..

Remo

Thanks


 From: Matt Brookings m...@inter7.com
 Reply-To: vchkpw@inter7.com
 Date: Wed, 04 Mar 2009 12:55:19 -0600
 To: vchkpw@inter7.com
 Subject: Re: [vchkpw] vpopmail usage daemon v0.0.6
 
 /home/vpopmail/bin/vusaged /home/vpopmail/etc/vusaged.conf


!DSPAM:49aecf7932689996216323!



Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Remo Mattei
Can I make a suggestion to read the default domain so you do not have to put
the entire email address for that..

Just my 2 cents..

Good job.

Remo


 From: Matt Brookings m...@inter7.com
 Reply-To: vchkpw@inter7.com
 Date: Wed, 04 Mar 2009 12:55:19 -0600
 To: vchkpw@inter7.com
 Subject: Re: [vchkpw] vpopmail usage daemon v0.0.6
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Remo Mattei wrote:
 I follow as you wrote in the INSTALL let me try one more time..
 
 
 And it says 
 
 service vusaged start
 Starting vusaged: failed
 
 Other suggestions?
 
 As root, run:
 
 /home/vpopmail/bin/vusaged /home/vpopmail/etc/vusaged.conf
 
 ..and paste the output.
 - --
 /*
 Matt Brookings m...@inter7.com   GnuPG Key D9414F70
 Software developer Systems technician
 Inter7 Internet Technologies, Inc. (815)776-9465
 */
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iEYEARECAAYFAkmuzpcACgkQ6QgvSNlBT3DE2wCfeatEzI97/q2+gN++6r9MHHwH
 pU8An2eVPF9eH1pS8HU+HQUNB8f6EF/l
 =lUV5
 -END PGP SIGNATURE-
 
 
 


!DSPAM:49aecfc232681446719583!



Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Matt Brookings
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Remo Mattei wrote:
 I found the problem.. It was on the allow line 36 it goes now..

Cool.  Let me know how it goes.  Some of the testing I'm doing right now is 
I've manually
patched our qmail-smtpd binary to use the client API to query the server for 
every RCPT.

In smtp_rcpt(), I added the variables:

  storage_t uusage, dusage;

..and then a call to client_query_quick() after a recipient has been accepted:

  client_query_quick(addr.s, uusage, dusage);
  if (uusage != -1)
 fprintf(stderr, vusage: %s: %llu (domain usage = %llu)\n,
addr.s, uusage, dusage);

..this just keeps the daemon under activity for testing, etc.  I haven't 
implemented any
quota enforcement just yet.
- --
/*
Matt Brookings m...@inter7.com   GnuPG Key D9414F70
Software developer Systems technician
Inter7 Internet Technologies, Inc. (815)776-9465
*/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmu0OgACgkQ6QgvSNlBT3DUIACgjMrlMk1i7k8Vpt5qwLev5vkj
lWMAoID8WAUTPykcpSQGYmcbeZS9rWjA
=RRxe
-END PGP SIGNATURE-


Re: [vchkpw] vpopmail usage daemon v0.0.6

2009-03-04 Thread Matt Brookings
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Remo Mattei wrote:
 Can I make a suggestion to read the default domain so you do not have to put
 the entire email address for that..

It's not meant to be used in that manner.  It's not really an admin query tool.
It's meant to be called by a process like qmail-smtpd or vdelivermail, which 
will
always have a domain associated with it, to get user mailstore totals to be used
in quota enforcement.

It isn't concerned with default domains and authentication.  The only reason it 
even
talks to vpopmail is so it knows what users exist, and where their mailstore 
is.  If
it didn't have to do that, it wouldn't even talk to vpopmail, heh.

 Just my 2 cents..

It's appreciated :)
- --
/*
Matt Brookings m...@inter7.com   GnuPG Key D9414F70
Software developer Systems technician
Inter7 Internet Technologies, Inc. (815)776-9465
*/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmu0WgACgkQ6QgvSNlBT3CVKwCeO6CD/b7LXAey4+elLbZkKgU3
gngAoIhIw/PaLGOMlPma5zsAWYerGuvG
=Aow+
-END PGP SIGNATURE-