On Thu, 29 Sep 2011 15:05:53 +0200 Danilo wrote:
Hello! I wrote perl script for read current quota usage, it works but when I run the program I receive a warning in Dovecot log:
2011-09-29 14:45:30 doveadm(guest@testmail.com): Warning: Timeout leak: 0x7f14800ad970
This is the script:
#!/usr/bin/perl
use strict; use Socket; use IO::Handle;
socket(TSOCK, PF_UNIX, SOCK_STREAM,0); connect(TSOCK, sockaddr_un("/var/run/dovecot/doveadm-server")) or print("ERROR!");
print "VERSION\tdoveadm-server\t1\t0\n"; print "\tguest\@testmail.com\tquota get\n"; print "=" x 20 . "\n";
if (defined(my $messg = <TSOCK>)) {
print $messg;
print TSOCK "VERSION\tdoveadm-server\t1\t0\n"; TSOCK->flush;
print TSOCK "\tguest\@testmail.com\tquota get\n"; TSOCK->flush;
$messg = <TSOCK>; print $messg;
$messg = <TSOCK>; print $messg;
close TSOCK; }
I hope someone could help me to fix the warning. Thanks in advance, Dany
I'm using doveadm socket too for getting quota values. No warning. The main difference from yours script that I'm also using auth:
print TSOCK "VERSION\tdoveadm-server\t1\t0\n"; print TSOCK "PLAIN\tbase64_encoded_pass_here\n"; print TSOCK "\t$local_part\@$domain\tquota get\n"; TSOCK->flush;
Dovecot version 2.0.15