[#14035] saved new message gets deleted on forced logut
Summary saved new message gets deleted on forced logut
Queue IMP
Queue Version 6.2.8
Type Bug
State Assigned
Priority 2. Medium
Owners Horde Developers
Requester michael.menge@zdv.uni-tuebingen.de
Created 2015-06-30 (1479 days ago)
Due
Updated 2016-01-22 (1273 days ago)
Assigned 2016-01-22 (1273 days ago)
Resolved
Milestone
Patch No

Comments
michael.menge@zdv.uni-tuebingen.de 2015-06-30 14:38:51
we have discovered that auto saved new messages (drafts) get deleted 
on forced logout
(e.g. session older than max session lifetime). As 
https://bugs.horde.org/ticket/13108#c8 indicates
these draft should be deleted on normal log out but not on session time out.

This is not the normal session timeout (php  garbage collection) but 
Horde_Auth::REASON_SESSION
See http://comments.gmane.org/gmane.comp.horde.imp/32928 for more details

Jan Schneider <jan@horde.org> 2016-01-22 17:16:39
FWIW the final safe net still works. If you try to send the message 
when the session is destroyed, the message is saved in VFS and 
restored on the next login, no matter how the session ended.

Jan Schneider <jan@horde.org> 2016-01-22 17:19:28
Fixing the original issue is not easy though. The drafts are cleaned 
up in IMP_Application#logout() which is called from the 
Horde_Registry#clearAuth(). At this point we do not know why the 
logout happened. We don't even know in clearAuth().
We probably have to propagate the logout reason down the whole way to 
the application's logout() method.

michael.menge@zdv.uni-tuebingen.de 2016-01-22 17:38:51
> FWIW the final safe net still works. If you try to send the message 
> when the session is destroyed, the message is saved in VFS and 
> restored on the next login, no matter how the session ended.

This didn't work on our system. We have configured SQL Backend 
(Postgres 9.3) as VFS Backend

Jan Schneider <jan@horde.org> 2016-01-22 17:47:28
It probably only works if you don't trigger the logout with the 
message sending, because in this case the cleanup is executed first.
If you timeout in the base window and then send from the compose 
window, it should work though.