[imp] Deleted messages not moved to trash from client

Harry Rickards hrickards at l33tmyst.com
Thu Apr 9 21:28:45 UTC 2009



On 9 Apr 2009, at 22:16, "Ernest John Messersmith III" <ejm at ejm3.net>  
wrote:

> Thanks for the clarification.
>
> First of all I'm not a system adminstrator. I've never installed or  
> managed an IMAP or IMP service. I have no idea how any of these  
> things actually work or what protocols they actually. I'm just a  
> frustrated user trying to get answers that my hosting provider  
> doesn't seem to be able to provide. If I'm in the wrong place please  
> let me know. However I think I understand now.
>
> Having said all that I'm a 25+ year systems engineer working at the  
> highest levels of scientific research. So I'm not stupid either ;-)
>
> So let me summarize: IMAP is a protocol and an IMAP server listens  
> on port 143 for things that talk IMAP. I'm assuming that an IMAP  
> server also has a database (filesystem only probably) where the  
> actual data is stored. IMP is a front end to IMAP which provides  
> webmail interface capabilities. So, when a client connects to a  
> hosting provider who is offering IMAP on port 143 then the client is  
> pretty much left on its own to present to the user a model that it  
> considers user-friendly. In the case of my iPhone and Webmail (when  
> properly configured), when I delete a message using its interface it  
> is actually sending a COPY (to Trash mailbox) command, followed by  
> an EXPUNGE (from source mailbox) command. Whereas the other clients  
> (Outlook, Outlook Express, Windows Mail) are simply sending a MARK  
> AS DELETED command.
>
> Now in the case of Gmail since clients connect to a different port  
> I'm going to assume there is an intervening layer they are providing  
> which straightens all this mess up and behaves in one consistent way  
> no matter what junk a client sends. This is where protocol messages  
> get "translated" if you like.

I think Gmail connects via a different port because the IMAP commands  
are encrypted with SSL or TLS.

>
>
> One person on this list suggests that there is a way to configure  
> IMAP client behavior via horde/imp/config/prefs.php. If this is the  
> case, I would really like to explore this more. But it also implies  
> that IMP intervenes in a generalized way with all IMAP clients that  
> I still don't understand.

As far as I can tell, that file changes the way IMP works with IMAP,  
and then you can configure your other IMAP clients to work the same way.



Thanks Harry

>
>
> Thanks to all for the help.
> John
>
>
> ----- Original Message ----- From: "Jochen Roderburg" <Roderburg at Uni-Koeln.DE 
> >
> To: "E. John Messersmith III" <ejm at ejm3.net>
> Cc: <imp at lists.horde.org>
> Sent: Thursday, April 09, 2009 2:52 AM
> Subject: Re: [imp] Deleted messages not moved to trash from client
>
>
>> Zitat von "E. John Messersmith III" <ejm at ejm3.net>:
>>
>>> Well, I don't know what Gmail is doing either but the iPhone gets it
>>> right
>>> in all cases and all clients get it right when using Gmail. I'm
>>> not being angry here just very frustrated. I don't know how I can  
>>> be any
>>> clearer. It is either a configuration parameter of IMAP or Horde  
>>> or both.
>>>
>>> Webmail - which I think is also part of the Horde project - gets  
>>> it right
>>> too! So what is it doing? I go to Mail Options->Deleting and Moving
>>> Messages and I simply check the option "When deleting messages, move
>>> them to your Trash folder instead of marking them as deleted?" I   
>>> select
>>> a message and click the Delete link. No marking for deletion;  no
>>> counting; no nothing - just a simple move from one folder to   
>>> another -
>>> everything is still in one Mailbox. So the "delete"  command  
>>> simply gets
>>> translated (or is made equivalent to) a "move"  to the trash folder
>>> command. The client doesn't have to do anything.  As long as the  
>>> server
>>> moves the message to the trash folder the new  state is simply  
>>> reflected
>>> (updated) in the client. Why is this so  difficult to understand? Is
>>> there something obvious I'm missing?
>>>
>>> So my question remains: given that I have selected the correct   
>>> Webmail
>>> option (and set the corresponding option in all my clients),  why  
>>> is it
>>> when a remote IMAP client (Outlook, Outlook Express,  Windows Mail)
>>> executes a "delete" command and that command is  received by the  
>>> IMAP
>>> server is it not translated into a "move" to  the trash folder  
>>> command?
>>
>> Sorry to say that, but you actually are missing quite a lot.  ;-)
>> Your cited words seem to indicate that you totally misunderstand  
>> how  the
>> IMAP functions work.
>> There is no such such thing as a simple "delete command", nothing  
>> gets
>> translated on the server site, in fact the concept of a "trash  
>> folder"  is
>> totally unknown to the IMAP protocol and on IMAP servers.
>> All that "trash folder magic" is a thing that the various clients   
>> handle
>> on their own, be it native Windows Clients or Webmail-Clients  like  
>> IMP.
>> And when you want several clients to behave the same way,  you have  
>> to
>> configure all of them individually. And if they don't  support your
>> preferred options, you're out of luck.
>>
>> Some more technical details:
>>
>> Admittedly, the deletion of mail messages on an IMAP server is   
>> somewhat
>> unusual. It is a two-step process, first you "mark messages  as  
>> deleted"
>> and then you "expunge" them.
>>
>> About step 1: Each mail message on the server has a few flags or  
>> marks
>> which can be read and written by the clients. One of these flags  
>> is  the
>> "delete flag". And the process of setting this delete flag is what
>> commonly is described by the phrase "marking as deleted". Such marked
>> messages are still on the server and can be used in every other  
>> way.  How
>> they are presented to the human reader depends on the used client.
>>
>> About step 2: The "expunge" command is given for a whole mail  
>> folder  and
>> "really" deletes all messages which were previously "marked as   
>> deleted".
>>
>> This "IMAP native" mail deletion technique should normally be   
>> available
>> as one option in all IMAP mail clients.
>>
>> Now to the "trash folders", this is something completely  
>> different.  Such
>> a folder has no special meaning on the server side, it is just an   
>> IMAP
>> folder like you can have others. It is only used by the client  for a
>> special purpose. When you have set appropriate client options,   
>> then the
>> clients moves "deleted mails" to this folder and does not use  the  
>> above
>> described IMAP deletion.
>> Actually this mail-move is also not a totally simple process, as  
>> there  is
>> no native "move command" in the IMAP protocol, only a "copy   
>> command". So
>> with every move (including the moves to the trash) the  client has  
>> to copy
>> the mail to the destination folders and delete it  in the source
>> afterwards (e.g. with the IMAP delete functions again).
>>
>> Hope these explanations helped a little to clear up the  
>> confusions.   ;-)
>>
>> Best regards,
>>
>> Jochen Roderburg
>> RRZK
>> University of Cologne
>> Robert-Koch-Str. 10                    Tel.:   +49-221/478-7024
>> D-50931 Koeln                          E-Mail: Roderburg at Uni-Koeln.DE
>> Germany
>>
>>
>>
>
> --
> IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org


More information about the imp mailing list