[Dovecot] bug formatting results when using doveadm-server
Hello,
I have a infrastructure using director in front of backend servers. So
I normally run doveadm commands in director servers, not the backends. The problem I have is when I try to concatenate commands like this:
doveadm search -S /var/run/dovecot/auth-userdb -u ${user} SAVEDSINCE 5w | while read guid uid; do doveadm fetch -S /var/run/dovecot/auth-userdb -u ${user} size.physical mailbox-guid $guid uid $uid; done
The problem is that although when I run doveadm search command in the
backend server I correctly get the list of mails, each line with the mailbox-guid and the uid of the message, when I run the same command in the director server, format of the list is corrupted and there are lines that contains just the mailbox-guid and the next the uid (of the previous) and the mailbox-guid of next, and so on. Like:
e62e0d3834ed094e5c7900007efb8a67 66 e62e0d3834ed094e5c7900007efb8a67 71 e62e0d3834ed094e5c7900007efb8a67 74 e62e0d3834ed094e5c7900007efb8a67 75 e62e0d3834ed094e5c7900007efb8a67 77 e62e0d3834ed094e5c7900007efb8a67 78 e62e0d3834ed094e5c7900007efb8a67
so I can't postprocess correctly the output. I think it could be a bug
in the communication between the doveadm client and server.
PS: As the time of writing this email, I have realized that I could use fetch command directly. But, anyway, I want to report the problem/bug so it can be fixed.
I forgot to mention that I'm running dovecot 2.1.9 in my servers.
El 26/09/12 12:55, Angel L. Mateo escribió:
Hello,
I have a infrastructure using director in front of backend servers.
So I normally run doveadm commands in director servers, not the backends. The problem I have is when I try to concatenate commands like this:
doveadm search -S /var/run/dovecot/auth-userdb -u ${user} SAVEDSINCE 5w | while read guid uid; do doveadm fetch -S /var/run/dovecot/auth-userdb -u ${user} size.physical mailbox-guid $guid uid $uid; done
The problem is that although when I run doveadm search command in
the backend server I correctly get the list of mails, each line with the mailbox-guid and the uid of the message, when I run the same command in the director server, format of the list is corrupted and there are lines that contains just the mailbox-guid and the next the uid (of the previous) and the mailbox-guid of next, and so on. Like:
e62e0d3834ed094e5c7900007efb8a67 66 e62e0d3834ed094e5c7900007efb8a67 71 e62e0d3834ed094e5c7900007efb8a67 74 e62e0d3834ed094e5c7900007efb8a67 75 e62e0d3834ed094e5c7900007efb8a67 77 e62e0d3834ed094e5c7900007efb8a67 78 e62e0d3834ed094e5c7900007efb8a67
so I can't postprocess correctly the output. I think it could be a
bug in the communication between the doveadm client and server.
PS: As the time of writing this email, I have realized that I could use fetch command directly. But, anyway, I want to report the problem/bug so it can be fixed.
-- Angel L. Mateo Martínez Sección de Telemática Área de Tecnologías de la Información y las Comunicaciones Aplicadas (ATICA) http://www.um.es/atica Tfo: 868887590 Fax: 868888337
On 26.9.2012, at 13.55, Angel L. Mateo wrote:
doveadm search -S /var/run/dovecot/auth-userdb -u ${user} SAVEDSINCE 5w | while read guid uid; do doveadm fetch -S /var/run/dovecot/auth-userdb -u ${user} size.physical mailbox-guid $guid uid $uid; done
-S auth-userdb? You've named it completely wrong if that works :)
The problem is that although when I run doveadm search command in the backend server I correctly get the list of mails, each line with the mailbox-guid and the uid of the message, when I run the same command in the director server, format of the list is corrupted and there are lines that contains just the mailbox-guid and the next the uid (of the previous) and the mailbox-guid of next, and so on. Like:
e62e0d3834ed094e5c7900007efb8a67 66 e62e0d3834ed094e5c7900007efb8a67 71 e62e0d3834ed094e5c7900007efb8a67 74 e62e0d3834ed094e5c7900007efb8a67 75 e62e0d3834ed094e5c7900007efb8a67 77 e62e0d3834ed094e5c7900007efb8a67 78 e62e0d3834ed094e5c7900007efb8a67
Thanks, fixed: http://hg.dovecot.org/dovecot-2.1/rev/94c7e875f9b9
El 02/10/12 21:38, Timo Sirainen escribió:
On 26.9.2012, at 13.55, Angel L. Mateo wrote:
doveadm search -S /var/run/dovecot/auth-userdb -u ${user} SAVEDSINCE 5w | while read guid uid; do doveadm fetch -S /var/run/dovecot/auth-userdb -u ${user} size.physical mailbox-guid $guid uid $uid; done
-S auth-userdb? You've named it completely wrong if that works :)
auth-userdb is the socket for the auth system. I has always worked for
me (I don't know why). What socket shoud I use? director-userdb?
The problem is that although when I run doveadm search command in the backend server I correctly get the list of mails, each line with the mailbox-guid and the uid of the message, when I run the same command in the director server, format of the list is corrupted and there are lines that contains just the mailbox-guid and the next the uid (of the previous) and the mailbox-guid of next, and so on. Like:
e62e0d3834ed094e5c7900007efb8a67 66 e62e0d3834ed094e5c7900007efb8a67 71 e62e0d3834ed094e5c7900007efb8a67 74 e62e0d3834ed094e5c7900007efb8a67 75 e62e0d3834ed094e5c7900007efb8a67 77 e62e0d3834ed094e5c7900007efb8a67 78 e62e0d3834ed094e5c7900007efb8a67
Thanks, fixed: http://hg.dovecot.org/dovecot-2.1/rev/94c7e875f9b9
Thanks, I'll check as soon as I can.
On 3.10.2012, at 9.20, Angel L. Mateo wrote:
El 02/10/12 21:38, Timo Sirainen escribió:
On 26.9.2012, at 13.55, Angel L. Mateo wrote:
doveadm search -S /var/run/dovecot/auth-userdb -u ${user} SAVEDSINCE 5w | while read guid uid; do doveadm fetch -S /var/run/dovecot/auth-userdb -u ${user} size.physical mailbox-guid $guid uid $uid; done
-S auth-userdb? You've named it completely wrong if that works :)
auth-userdb is the socket for the auth system. I has always worked for me (I don't know why). What socket shoud I use? director-userdb?
-S points to doveadm-server socket. Sounds like it's not being used at all, so you can probably just leave it out?
El 03/10/12 15:27, Timo Sirainen escribió:
On 3.10.2012, at 9.20, Angel L. Mateo wrote:
El 02/10/12 21:38, Timo Sirainen escribió:
On 26.9.2012, at 13.55, Angel L. Mateo wrote:
doveadm search -S /var/run/dovecot/auth-userdb -u ${user} SAVEDSINCE 5w | while read guid uid; do doveadm fetch -S /var/run/dovecot/auth-userdb -u ${user} size.physical mailbox-guid $guid uid $uid; done
-S auth-userdb? You've named it completely wrong if that works :)
auth-userdb is the socket for the auth system. I has always worked for me (I don't know why). What socket shoud I use? director-userdb?
-S points to doveadm-server socket. Sounds like it's not being used at all, so you can probably just leave it out?
Yes, I have tried and it works without using -S. So, what is the reason
for this option? Because I'm sure I'm using because I've read it in examples (not with auth-userdb obviously, this is my mistake)
On 4.10.2012, at 9.14, Angel L. Mateo wrote:
-S points to doveadm-server socket. Sounds like it's not being used at all, so you can probably just leave it out?
Yes, I have tried and it works without using -S. So, what is the reason for this option? Because I'm sure I'm using because I've read it in examples (not with auth-userdb obviously, this is my mistake)
I'm guessing that it's used only when the user lookup isn't returning proxy=y
participants (2)
-
Angel L. Mateo
-
Timo Sirainen