[prev in list] [next in list] [prev in thread] [next in thread] 

List:       imap
Subject:    Re: [Imap-protocol] Actually deleting messages from Gmail
From:       Brandon Long <blong () google ! com>
Date:       2014-03-21 7:08:51
Message-ID: CABa8R6up2okoqkQ72k9wSKuqgOLV0OFPJ-kbyadR7w7e3_FA9Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


A COPY to trash will be sufficient, though the message won't actually
disappear from the other folder until its allowed by the IMAP spec.  UID
COPY to trash will generate an EXPUNGE event, yes.

Brandon


On Thu, Mar 20, 2014 at 11:33 PM, Dave Warren <davew@hireahit.com> wrote:

>  I could swear that, in the past, deleting the All Mail label actually
> moved the message into the trash, whereas deleting from any other folder
> only removed the label.
>
> In this case, the desired behaviour is to remove the message from the
> account completely, not just to shuffle labels. I was more wondering if I
> need to actually "move" to the Trash folder (copy, set \deleted, expunge)
> or just copy and trust that Gmail does the rest? It seems like just doing a
> copy cuts the number of needed commands to 1/3rd, and yields the same
> result.
>
>
>
> On 2014-03-20 23:07, Brandon Long wrote:
>
>  You can't delete the all mail label from a message in Gmail.  Adding the
> spam or trash label will hide the message from all other folders.
>
>  If the all mail folder is the last folder the message is in and you set
> your "When a message is marked as deleted and expunged from the last
> visible IMAP folder" setting to something other than the default, it should
> disappear from the all mail folder.
>
>  As for what should clients do?  That really depends on the client.  If
> the user (or the app) really wants the message deleted, then moving it to
> the trash folder is the right thing to do.  If the user is just trying to
> remove the message from a single folder, \deleted & expunge is the right
> thing.
>
>  Brandon
>
>
> On Thu, Mar 20, 2014 at 9:47 PM, Dave Warren <davew@hireahit.com> wrote:
>
>>  I was sure that when I tested previously, deleting a message from
>> "[Gmail]/All Mail" would cause Gmail to place the message in the Trash,
>> removing it from all labels, but testing today, this doesn't seem to be the
>> case, the message reappears without the \Deleted flag after being expunged:
>>
>> R00005 SELECT "[Gmail]/All Mail"
>> <...>
>> * 1432 FETCH (UID 92405)
>> * 1433 FETCH (UID 92406)
>> * 1434 FETCH (UID 92407)
>> <...>
>>
>> R0004F UID STORE 92407 +FLAGS (\Deleted)
>> * 1434 FETCH (FLAGS (\Deleted) UID 92407)
>> R0004F OK Success
>> R00050 EXPUNGE
>> R00050 OK Success
>> R00051 UID STORE 92405 +FLAGS (\Deleted)
>> * 1432 FETCH (FLAGS (\Seen \Deleted) UID 92405)
>> R00051 OK Success
>> R00052 EXPUNGE
>> R00052 OK Success
>>
>> R00054 SELECT "[Gmail]/All Mail"
>> <...>
>> * 1432 FETCH (UID 92405)
>> * 1433 FETCH (UID 92406)
>> * 1434 FETCH (UID 92407)
>> <...>
>>
>> * 1432 FETCH (UID 92405 RFC822.SIZE 14202 INTERNALDATE "21-Mar-2014
>> 03:19:31 +0000" FLAGS (\Seen) BODY[HEADER] {2044}
>> <...>
>> * 1434 FETCH (UID 92407 RFC822.SIZE 14173 INTERNALDATE "21-Mar-2014
>> 03:55:43 +0000" FLAGS () BODY[HEADER] {2056}
>>
>> Long-term we're looking at copying messages into the Trash the way Gmail
>> expects when we actually intend to remove a message. In this case, is there
>> any advantage in setting \Deleted or issuing an EXPUNGE, or is it best to
>> simply copy and let Gmail do the rest?
>>
>> --
>> Dave Warrenhttp://www.hireahit.com/http://ca.linkedin.com/in/davejwarren
>>
>>
>> _______________________________________________
>> Imap-protocol mailing list
>> Imap-protocol@u.washington.edu
>> http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol
>>
>
>
>
>

[Attachment #5 (text/html)]

<div dir="ltr">A COPY to trash will be sufficient, though the message won&#39;t \
actually disappear from the other folder until its allowed by the IMAP spec.   UID \
COPY to trash will generate an EXPUNGE event, yes.<div><br></div> \
<div>Brandon</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On \
Thu, Mar 20, 2014 at 11:33 PM, Dave Warren <span dir="ltr">&lt;<a \
href="mailto:davew@hireahit.com" target="_blank">davew@hireahit.com</a>&gt;</span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>I could swear that, in the past,
      deleting the All Mail label actually moved the message into the
      trash, whereas deleting from any other folder only removed the
      label.<br>
      <br>
      In this case, the desired behaviour is to remove the message from
      the account completely, not just to shuffle labels. I was more
      wondering if I need to actually &quot;move&quot; to the Trash folder (copy,
      set \deleted, expunge) or just copy and trust that Gmail does the
      rest? It seems like just doing a copy cuts the number of needed
      commands to 1/3rd, and yields the same result.<div><div class="h5"><br>
      <br>
      <br>
      On 2014-03-20 23:07, Brandon Long wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">
        <div style="font-family:arial,sans-serif;font-size:13px">You
          can&#39;t delete the all mail label from a message in Gmail.
            Adding the spam or trash label will hide the message from all
          other folders.<br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">If the
          all mail folder is the last folder the message is in and you
          set your &quot;When a message is marked as deleted and expunged
          from the last visible IMAP folder&quot; setting to something other
          than the default, it should disappear from the all mail
          folder.</div>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">As for
          what should clients do?   That really depends on the client.
            If the user (or the app) really wants the message deleted,
          then moving it to the trash folder is the right thing to do.
            If the user is just trying to remove the message from a
          single folder, \deleted &amp; expunge is the right thing.</div>
        <div style="font-family:arial,sans-serif;font-size:13px"><br>
        </div>
        <div style="font-family:arial,sans-serif;font-size:13px">Brandon</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Thu, Mar 20, 2014 at 9:47 PM, Dave
          Warren <span dir="ltr">&lt;<a href="mailto:davew@hireahit.com" \
target="_blank">davew@hireahit.com</a>&gt;</span>  wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">  <div bgcolor="#FFFFFF" text="#000000"> I was sure that \
                when
              I tested previously, deleting a message from &quot;[Gmail]/All
              Mail&quot; would cause Gmail to place the message in the Trash,
              removing it from all labels, but testing today, this
              doesn&#39;t seem to be the case, the message reappears without
              the \Deleted flag after being expunged: <br>
              <br>
              R00005 SELECT &quot;[Gmail]/All Mail&quot;<br>
              &lt;...&gt;<br>
              * 1432 FETCH (UID 92405)<br>
              * 1433 FETCH (UID 92406)<br>
              * 1434 FETCH (UID 92407)<br>
              &lt;...&gt;<br>
              <br>
              R0004F UID STORE 92407 +FLAGS (\Deleted)<br>
              * 1434 FETCH (FLAGS (\Deleted) UID 92407)<br>
              R0004F OK Success<br>
              R00050 EXPUNGE<br>
              R00050 OK Success<br>
              R00051 UID STORE 92405 +FLAGS (\Deleted)<br>
              * 1432 FETCH (FLAGS (\Seen \Deleted) UID 92405)<br>
              R00051 OK Success<br>
              R00052 EXPUNGE<br>
              R00052 OK Success<br>
              <br>
              R00054 SELECT &quot;[Gmail]/All Mail&quot;<br>
              &lt;...&gt;<br>
              * 1432 FETCH (UID 92405)<br>
              * 1433 FETCH (UID 92406)<br>
              * 1434 FETCH (UID 92407)<br>
              &lt;...&gt;<br>
              <br>
              * 1432 FETCH (UID 92405 RFC822.SIZE 14202 INTERNALDATE
              &quot;21-Mar-2014 03:19:31 +0000&quot; FLAGS (\Seen) BODY[HEADER]
              {2044}<br>
              &lt;...&gt;<br>
              * 1434 FETCH (UID 92407 RFC822.SIZE 14173 INTERNALDATE
              &quot;21-Mar-2014 03:55:43 +0000&quot; FLAGS () BODY[HEADER] {2056}<br>
              <br>
              Long-term we&#39;re looking at copying messages into the Trash
              the way Gmail expects when we actually intend to remove a
              message. In this case, is there any advantage in setting
              \Deleted or issuing an EXPUNGE, or is it best to simply
              copy and let Gmail do the rest?<span><font color="#888888"><br>
                  <br>
                  <pre cols="72">-- 
Dave Warren
<a href="http://www.hireahit.com/" target="_blank">http://www.hireahit.com/</a>
<a href="http://ca.linkedin.com/in/davejwarren" \
target="_blank">http://ca.linkedin.com/in/davejwarren</a>

</pre>
                </font></span></div>
            <br>
            _______________________________________________<br>
            Imap-protocol mailing list<br>
            <a href="mailto:Imap-protocol@u.washington.edu" \
target="_blank">Imap-protocol@u.washington.edu</a><br>  <a \
href="http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol" \
target="_blank">http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol</a><br>
  </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <br>
    <pre cols="72"></pre>
  </div></div></div>


</blockquote></div><br></div>



_______________________________________________
Imap-protocol mailing list
Imap-protocol@u.washington.edu
http://mailman13.u.washington.edu/mailman/listinfo/imap-protocol

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic