<<< Date Index >>>     <<< Thread Index >>>

Re: [Mutt] #2225: pop: Ignore already-deleted messages while syncing



#2225: pop: Ignore already-deleted messages while syncing
-------------------------------------+--------------------------------------
  Reporter:  tamo@xxxxxxxxxxxxxxxxx  |       Owner:  mutt-dev          
      Type:  defect                  |      Status:  closed            
  Priority:  minor                   |   Milestone:                    
 Component:  mutt                    |     Version:  1.5.11 and current
Resolution:  fixed                   |    Keywords:  patch             
-------------------------------------+--------------------------------------
Changes (by pdmef):

  * status:  new => closed
  * resolution:  => fixed


Old description:

> {{{
>
> Mutt cannot close a POP mailbox after the server (without "DELE"
> command from mutt) removed a message. In that case, mutt will keep
> crying "DELE: no such message" and "Try reopening the mailbox."
>
> If the message was deleted by mutt, mutt will ask me "Purge 1 message?"
> But, if the message was automatically deleted by server, mutt won't ask.
> It will silently try to delete it - and get the error.
>
> >How-To-Repeat:
> 0. Press 'c'.
> 1. Input some POP mailbox name.
> 2. (server silently removes a message)
> 3. (POP connection timeouts - mutt commits "STAT")
> 4. Press 'q'.
> 5. Error: "DELE: no such message." - You can't quit.
>
> >Fix:
> Patch:
>
> --- pop.c       21 Oct 2005 04:35:37 -0000      3.9
> +++ pop.c       14 May 2006 04:57:53 -0000
> @@ -469,7 +469,7 @@ int pop_sync_mailbox (CONTEXT *ctx, int
>
>      for (i = 0, ret = 0; ret == 0 && i < ctx->msgcount; i++)
>      {
> -      if (ctx->hdrs[i]->deleted)
> +      if (ctx->hdrs[i]->deleted && ctx->hdrs[i]->refno != -1)
>        {
>         snprintf (buf, sizeof (buf), "DELE %d\r\n", ctx->hdrs[i]->refno);
>         ret = pop_query (pop_data, buf, sizeof (buf));
>
> }}}

New description:

 {{{

 Mutt cannot close a POP mailbox after the server (without "DELE"
 command from mutt) removed a message. In that case, mutt will keep
 crying "DELE: no such message" and "Try reopening the mailbox."

 If the message was deleted by mutt, mutt will ask me "Purge 1 message?"
 But, if the message was automatically deleted by server, mutt won't ask.
 It will silently try to delete it - and get the error.

 >How-To-Repeat:
 0. Press 'c'.
 1. Input some POP mailbox name.
 2. (server silently removes a message)
 3. (POP connection timeouts - mutt commits "STAT")
 4. Press 'q'.
 5. Error: "DELE: no such message." - You can't quit.

 >Fix:
 Patch:

 --- pop.c       21 Oct 2005 04:35:37 -0000      3.9
 +++ pop.c       14 May 2006 04:57:53 -0000
 @@ -469,7 +469,7 @@ int pop_sync_mailbox (CONTEXT *ctx, int

      for (i = 0, ret = 0; ret == 0 && i < ctx->msgcount; i++)
      {
 -      if (ctx->hdrs[i]->deleted)
 +      if (ctx->hdrs[i]->deleted && ctx->hdrs[i]->refno != -1)
        {
         snprintf (buf, sizeof (buf), "DELE %d\r\n", ctx->hdrs[i]->refno);
         ret = pop_query (pop_data, buf, sizeof (buf));

 }}}

--

Comment:

 Closed by [aeb4ae280160]: POP: Ignore already-deleted messages while
 syncing.

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/2225#comment:2>
Mutt <http://www.mutt.org/>
The Mutt mail user agent