RES: RES: Possible IMAP IDLE bug in Dovecot 2.2.18 and 2.2.25

2016-08-24 Thread Cleber @ Listas
Hello Aki and Timo,

I disable the IDLE at CAPABILITY in Dovecot and solved my problem:

imap_capability = LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE


-Mensagem original-
De: Aki Tuomi [mailto:aki.tu...@dovecot.fi] 
Enviada em: quarta-feira, 24 de agosto de 2016 11:51
Para: Dovecot Mailing List <dovecot@dovecot.org>; Cleber @ Listas 
<cleber-lis...@inetweb.com.br>
Assunto: Re: RES: Possible IMAP IDLE bug in Dovecot 2.2.18 and 2.2.25

You should probably update your proxy to provide the same capability list to 
your clients as your SmarterMail backend (with few extra things).

That is imap_capability = IMAP4rev1 STARTTLS UIDPLUS QUOTA XLIST CHILDREN 
AUTH=PLAIN AUTH=LOGIN

Aki

> On August 24, 2016 at 5:43 PM "Cleber @ Listas" 
> <cleber-lis...@inetweb.com.br> wrote:
> 
> 
> Hello Timo,
> 
> The capability result from dovecot and Smartermail:
> 
> Dovecot:
> * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE 
> IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
> 
> Smartermail:
> * CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 UIDPLUS QUOTA XLIST CHILDREN
> 
> If I connect directly to Smartermail the Outlook don't send the IDLE 
> command (only NOOP, because the Smartermail don't send the IDLE in 
> CAPABILITY).
> But, it's with time interval better than from Dovecot (a lot in same 
> second)
> 
> 10:25:11 [201.74.248.186][57965505] connected at 24/08/2016 10:25:11
> 10:25:11 [201.74.248.186][57965505] command: 1ope CAPABILITY
> 10:25:11 [201.74.248.186][57965505] command: 9mv2 LOGIN "myaccount@mydomain"
> 
> 10:25:11 [201.74.248.186][57965505] myaccount@mydomain logged in
> 10:25:11 [201.74.248.186][57965505] command: rvzd LSUB "" "*"
> 10:25:11 [201.74.248.186][57965505] command: rh9g SELECT "INBOX"
> 10:25:11 [201.74.248.186][57965505] response: * 919 EXISTS
> 10:25:11 [201.74.248.186][57965505] response: * 0 RECENT
> 10:25:11 [201.74.248.186][57965505] response: * OK [UNSEEN 904] 
> Message 904 is first unseen
> 10:25:11 [201.74.248.186][57965505] response: * OK [UIDVALIDITY 1] 
> UIDs valid
> 10:25:11 [201.74.248.186][57965505] response: * OK [UIDNEXT 26849] 
> Predicted next UID
> 10:25:11 [201.74.248.186][57965505] response: * FLAGS (\Answered 
> \Flagged \Deleted \Seen \Draft)
> 10:25:11 [201.74.248.186][57965505] response: * OK [PERMANENTFLAGS 
> (\Answered \Flagged \Deleted \Seen \Draft)]
> 10:25:11 [201.74.248.186][57965505] response: rh9g OK [READ-WRITE] 
> SELECT completed
> 10:25:11 [201.74.248.186][57965505] command: ve5e FETCH 919 (UID)
> 10:25:11 [201.74.248.186][57965505] command: 8ixa UID FETCH 1:26848 
> (UID
> FLAGS)
> 10:25:14 [201.74.248.186][57965505] command: t874 UID STORE 26846
> +FLAGS.SILENT (\Seen)
> 10:26:32 [201.74.248.186][57965505] command: rmcb NOOP
> 10:26:32 [201.74.248.186][57965505] response: rmcb OK NOOP completed
> 10:28:39 [201.74.248.186][57965505] command: qs5n NOOP
> 10:28:39 [201.74.248.186][57965505] response: qs5n OK NOOP Completed
> 10:31:01 [201.74.248.186][57965505] command: k9v0 NOOP
> 10:31:01 [201.74.248.186][57965505] response: k9v0 OK NOOP completed
> 10:33:01 [201.74.248.186][57965505] command: vw8w NOOP
> 10:33:01 [201.74.248.186][57965505] response: vw8w OK NOOP completed
> 10:35:01 [201.74.248.186][57965505] command: qhag NOOP
> 10:35:01 [201.74.248.186][57965505] response: qhag OK NOOP completed
> 10:37:01 [201.74.248.186][57965505] command: so7b NOOP
> 10:37:01 [201.74.248.186][57965505] response: so7b OK NOOP completed
> 10:39:01 [201.74.248.186][57965505] command: wclw NOOP
> 10:39:01 [201.74.248.186][57965505] response: wclw OK NOOP completed
> 10:39:36 [201.74.248.186][13534103] disconnected at 24/08/2016 
> 10:39:36
> 
> 
> 
> 
> 
> -Mensagem original-
> De: dovecot [mailto:dovecot-boun...@dovecot.org] Em nome de Timo 
> Sirainen Enviada em: quarta-feira, 24 de agosto de 2016 06:49
> Para: cleber-lis...@inetweb.com.br
> Cc: dovecot@dovecot.org
> Assunto: Re: Possible IMAP IDLE bug in Dovecot 2.2.18 and 2.2.25
> 
> On 23 Aug 2016, at 15:08, cleber-lis...@inetweb.com.br wrote:
> > 
> > Hello Guys,
> > I guess that I found a bug in Dovecot 2.2.18 and 2.2.25 versions. 
> > The problem it's when I try to connect in a Dovecot used a proxy to 
> > another e-mail server (in our case it's a Smartermail Server) the 
> > DoveCot send a lot of IDLE commands to the destination server. With 
> > that, the LOG files grow and grow and grow :(
> > 
> > I make a test with 1 connection only and if you see the log file in 
> > the same second the dovecot send 25, 40 IDLE commands. But, when I 
> > disconnect the client (outlook 2013) the dovecot continu

RES: Possible IMAP IDLE bug in Dovecot 2.2.18 and 2.2.25

2016-08-24 Thread Cleber @ Listas
Hello Timo,

The capability result from dovecot and Smartermail:

Dovecot:
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE
STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.

Smartermail:
* CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 UIDPLUS QUOTA XLIST CHILDREN

If I connect directly to Smartermail the Outlook don't send the IDLE command
(only NOOP, because the Smartermail don't send the IDLE in CAPABILITY).
But, it's with time interval better than from Dovecot (a lot in same second)

10:25:11 [201.74.248.186][57965505] connected at 24/08/2016 10:25:11
10:25:11 [201.74.248.186][57965505] command: 1ope CAPABILITY
10:25:11 [201.74.248.186][57965505] command: 9mv2 LOGIN "myaccount@mydomain"

10:25:11 [201.74.248.186][57965505] myaccount@mydomain logged in
10:25:11 [201.74.248.186][57965505] command: rvzd LSUB "" "*"
10:25:11 [201.74.248.186][57965505] command: rh9g SELECT "INBOX"
10:25:11 [201.74.248.186][57965505] response: * 919 EXISTS
10:25:11 [201.74.248.186][57965505] response: * 0 RECENT
10:25:11 [201.74.248.186][57965505] response: * OK [UNSEEN 904] Message 904
is first unseen
10:25:11 [201.74.248.186][57965505] response: * OK [UIDVALIDITY 1] UIDs
valid
10:25:11 [201.74.248.186][57965505] response: * OK [UIDNEXT 26849] Predicted
next UID
10:25:11 [201.74.248.186][57965505] response: * FLAGS (\Answered \Flagged
\Deleted \Seen \Draft)
10:25:11 [201.74.248.186][57965505] response: * OK [PERMANENTFLAGS
(\Answered \Flagged \Deleted \Seen \Draft)]
10:25:11 [201.74.248.186][57965505] response: rh9g OK [READ-WRITE] SELECT
completed
10:25:11 [201.74.248.186][57965505] command: ve5e FETCH 919 (UID)
10:25:11 [201.74.248.186][57965505] command: 8ixa UID FETCH 1:26848 (UID
FLAGS)
10:25:14 [201.74.248.186][57965505] command: t874 UID STORE 26846
+FLAGS.SILENT (\Seen)
10:26:32 [201.74.248.186][57965505] command: rmcb NOOP
10:26:32 [201.74.248.186][57965505] response: rmcb OK NOOP completed
10:28:39 [201.74.248.186][57965505] command: qs5n NOOP
10:28:39 [201.74.248.186][57965505] response: qs5n OK NOOP Completed
10:31:01 [201.74.248.186][57965505] command: k9v0 NOOP
10:31:01 [201.74.248.186][57965505] response: k9v0 OK NOOP completed
10:33:01 [201.74.248.186][57965505] command: vw8w NOOP
10:33:01 [201.74.248.186][57965505] response: vw8w OK NOOP completed
10:35:01 [201.74.248.186][57965505] command: qhag NOOP
10:35:01 [201.74.248.186][57965505] response: qhag OK NOOP completed
10:37:01 [201.74.248.186][57965505] command: so7b NOOP
10:37:01 [201.74.248.186][57965505] response: so7b OK NOOP completed
10:39:01 [201.74.248.186][57965505] command: wclw NOOP
10:39:01 [201.74.248.186][57965505] response: wclw OK NOOP completed
10:39:36 [201.74.248.186][13534103] disconnected at 24/08/2016 10:39:36





-Mensagem original-
De: dovecot [mailto:dovecot-boun...@dovecot.org] Em nome de Timo Sirainen
Enviada em: quarta-feira, 24 de agosto de 2016 06:49
Para: cleber-lis...@inetweb.com.br
Cc: dovecot@dovecot.org
Assunto: Re: Possible IMAP IDLE bug in Dovecot 2.2.18 and 2.2.25

On 23 Aug 2016, at 15:08, cleber-lis...@inetweb.com.br wrote:
> 
> Hello Guys,
> I guess that I found a bug in Dovecot 2.2.18 and 2.2.25 versions. The 
> problem it's when I try to connect in a Dovecot used a proxy to 
> another e-mail server (in our case it's a Smartermail Server) the 
> DoveCot send a lot of IDLE commands to the destination server. With 
> that, the LOG files grow and grow and grow :(
> 
> I make a test with 1 connection only and if you see the log file in 
> the same second the dovecot send 25, 40 IDLE commands. But, when I 
> disconnect the client (outlook 2013) the dovecot continue to send the 
> IDLE command for some seconds.

After login Dovecot proxy no longer understands anything about the traffic.
It simply keeps proxying the IMAP traffic between the client and server. So
Dovecot isn't the one generating the IDLE commands, it's Outlook.

> If I try to connect directly to Smartermail with Outlook this don't 
> occurrs.

That is stranger then. Maybe it has something to do with having a different
CAPABILITY response. You could try setting imap_capability setting to same
as what Smartermail announces. Other than that I can't really think of
anything specific that you could do or we could fix on Dovecot code.


RES: Possible IMAP IDLE bug in Dovecot 2.2.18 and 2.2.25

2016-08-24 Thread Cleber @ Listas
Hello Aki,

The Smartermail don't support IDLE command at CAPABILITY:

Dovecot:
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE
STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.

Smartermail:
* CAPABILITY IMAP4rev1 AUTH=CRAM-MD5 UIDPLUS QUOTA XLIST CHILDREN

In this case, would not the because Dovecot send the IDLE command to
SmarterMail.


-Mensagem original-
De: dovecot [mailto:dovecot-boun...@dovecot.org] Em nome de Aki Tuomi
Enviada em: terça-feira, 23 de agosto de 2016 13:25
Para: dovecot@dovecot.org
Assunto: Re: Possible IMAP IDLE bug in Dovecot 2.2.18 and 2.2.25



On 23.08.2016 19:15, Aki Tuomi wrote:
>
>
> On 23.08.2016 15:08, cleber-lis...@inetweb.com.br wrote:
>> Hello Guys,
>>   I guess that I found a bug in Dovecot 2.2.18 and 2.2.25 versions. 
>> The problem it's when I try to connect in a Dovecot used a proxy to 
>> another e-mail server (in our case it's a Smartermail Server) the 
>> DoveCot send a lot of IDLE commands to the destination server. With 
>> that, the LOG files grow and grow and grow :(
>>  I make a test with 1 connection only and if you see the log file 
>> in the same second the dovecot send 25, 40 IDLE commands. But, when I 
>> disconnect the client (outlook 2013) the dovecot continue to send the 
>> IDLE command for some seconds.
>>  If I try to connect directly to Smartermail with Outlook this 
>> don't occurrs.
>>
>
> Just to be sure, the behaviour you are expecting is that IDLE is not 
> used, right?
>
> Aki

Also, looking at the code, IDLE is only used if your server claims to
understand it, so could you do following:

telnet backend-host backend-port
a CAPABILITY
a LOGIN username password
a CAPABILITY
a LOGOUT

and provide the output.

Aki