After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 514827 - Broken POP3 option: Delete messages after XX days
Broken POP3 option: Delete messages after XX days
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
2.12.x (obsolete)
Other All
: Urgent critical
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
: 499932 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-02-06 18:36 UTC by dian.nugraha
Modified: 2011-03-23 18:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
proposed eds patch (3.31 KB, patch)
2008-03-12 16:14 UTC, Milan Crha
committed Details | Review
improved eds patch without mem leaks (2.46 KB, patch)
2008-09-05 16:38 UTC, Patrick Ohly
reviewed Details | Review
delta between eds.patch and eds-fixed.patch (1.41 KB, patch)
2008-09-08 16:29 UTC, Patrick Ohly
committed Details | Review

Description dian.nugraha 2008-02-06 18:36:01 UTC
I have POP account in web.de
I would like to leave in server only 1 days, and older messages should be deleted.
I tried to do this with the pop account preference setting:
x Leave messages on server
x Delete messages older than 1 days

However, the messages are still kept in the server although it is more than several days. 

Similar feature in mozilla thunderbird works fine with my web.de POP account.


Distribution: Ubuntu 7.10 (gutsy)
Gnome Release: 2.20.1 2007-10-19 (Ubuntu)
BugBuddy Version: 2.18.1
Comment 1 Matthew Barnes 2008-03-11 00:35:18 UTC
Bumping version to a stable release.
Comment 2 Milan Crha 2008-03-12 12:55:23 UTC
Confirming, the first patch (2007-06-17) from bug #352284 caused this probably, for me the folder->summary is NULL. What is your exact version of Evolution?
Comment 3 Milan Crha 2008-03-12 16:14:49 UTC
Created attachment 107154 [details] [review]
proposed eds patch

for evolution-data-server;

POP3 folder doesn't have a summary, rather read message time from its own cache.
Comment 4 Srinivasa Ragavan 2008-03-27 08:34:46 UTC
Milan, looks fine to me. Test and commit it.
Comment 5 Milan Crha 2008-03-27 12:06:15 UTC
Committed to trunk. Committed revision 8587.
Comment 6 Patrick Ohly 2008-08-28 19:06:11 UTC
*** Bug 499932 has been marked as a duplicate of this bug. ***
Comment 7 Patrick Ohly 2008-09-05 16:36:12 UTC
From the Evolution hackers list:

On Tue, 2008-09-02 at 19:04 +0200, Philipp Riegger wrote:
[pop patch]
> I applied this to the gentoo evolution-data-server ebuild and had some
> instability. Evolution died after a timeout in one of my pop3 accounts
> (server could not be found/reached). Be sure, to double check that.
> 
> I switched back to the unpatched version, no more problems. If you're
> oing a release candidate, be sure to mention it here.

On Thu, 2008-09-04 at 12:13 +0200, Patrick Ohly wrote:
> Thanks a lot for reporting this! I didn't notice that when trying out
> trunk.
> 
> Now I had a look at the actual patch and found that it has a
> (potentially huge?) memory leak: in pop3_get_message_time_from_cache()
> after camel_data_cache_get() the returned stream already has a refcount
> of 1, but the code did another camel_object_ref(). Therefore the
> camel_object_unref() later on only reduced the refcount to 1 and the
> stream was never freed.
> 
> The stream was also not freed if reading from it failed or didn't
> contain the expected content - not sure whether that really happens.
Comment 8 Patrick Ohly 2008-09-05 16:38:57 UTC
Created attachment 118110 [details] [review]
improved eds patch without mem leaks

Here's my proposal for a version of the patch which shouldn't have mem leaks. Please check whether my analysis of the problem was correct and that I picked the right solution.

This will affect Evolution 2.23.x and therefore is urgent!
Comment 9 Milan Crha 2008-09-08 08:39:42 UTC
Thanks, it seems I did a leak, it's bad.

Are you able to produce patch applicable to actual unstable/trunk, please? Remember, the previous patch is already there.

Please add a ChangeLog entry to the patch too (I never know what address/name one wants to have there). Thanks in advance.
Comment 10 Patrick Ohly 2008-09-08 16:29:33 UTC
Created attachment 118311 [details] [review]
delta between eds.patch and eds-fixed.patch

Here's the delta that I just committed to trunk in commit r9496. After rereading Milan's comment I realized that he probably wanted to look at that delta in isolation before having it committed. Please revert if you think that the patch really needs further review (but note that it was produced by reverting the old patch and applying the new patch, so the code is now identical to the one in the reviewed patch).
Comment 11 Milan Crha 2008-09-15 17:05:42 UTC
Ouch, we have it in already, thus closing.
Comment 12 Quentin Hartman 2008-11-19 16:25:16 UTC
I'm using Evolution 2.24.1 as shipped in Ubuntu 8.10, and I am still seeing this problem. I am using POP to fetch my mail and have it set to delete messages from the server after 30 days. I currently have mail going back to September 16th sitting on the server. The server is running Zimbra 5. Just in case, I did a little bit of digging since Zimbra uses a custom POP server, but I did not find any indication that they have a problem with deleting mail on their end.
Comment 13 Milan Crha 2008-11-19 17:28:44 UTC
Can you try to run Evolution on console and see whether it prints there some error message, hopefully related to this problem? Thanks in advance.
Comment 14 Quentin Hartman 2008-11-19 17:49:06 UTC
The only output is:

** (evolution:15087): DEBUG: mailto URL command: evolution %s
** (evolution:15087): DEBUG: mailto URL program: evolution

I started evo and checked mail twice.

Now, I have "leave messages on server" as well as "delete messages after 30 days" checked. Would the "leave messages on server" option be over-riding the the "delete..." option? I read that as meaning that if I uncheck "leave..." messages will be deleted immediately; the "delete..." option is effectively a modifier for the first option, correct? Interestingly, I see there is no activation/deactivation of those options relative to each other to imply any sort of mutual exclusivity or relationship between them, so that may not be the case...

Ok, I just did an experiment, I un-checked the "leave..." option and it did in fact do what I expected, it deleted all of my retrieved mail on the server. So it seems I do have this setup correctly.

I'd suggest a UI tweak where the "delete after X days" option is only active if "leave messages on server" is checked so that it is clear that it is a modifier of the "leave..." behavior. I'd still have all my recent messages available through webmail if I needed them in a pinch if that were not unclear... :D

I also noticed in the dialog box that comes up when the messages are being deleted simply says, "Expunging deleted messages". In my case at least, that is not accurate, the messages were not deleted, they just are no longer needed on the server. If possible, it would be good to make that distinction in the feedback to the user; ie - "Removing old messages from server..." or the like.
Comment 15 Milan Crha 2008-11-20 10:46:02 UTC
Those two options are more or less independent. Each regular sync with a server (like when you hit Sent/Receive), it either deletes all the deleted messages and all those received (leave on server not checked), then it shows "Expunging deleted messages", which is correct. If you do not have this option checked, then when you've selected delete_after it'll check for old messages and deletes them, with "Expunging old messages" operation in the status bar.
Comment 16 Quentin Hartman 2008-11-20 15:58:32 UTC
I'm still not following the logic of those options being independent, but I'll take your word for it for now. In any case, the "older than X days" messages are still not getting deleted properly for me. What else can I do to help troubleshoot that?

I've also pinged the bug report in Ubuntu's Launchpad on this. In fact that's what led me here, and there's at least one other person there who is having this problem.
Comment 17 unggnu 2009-04-02 07:15:59 UTC
It isn't resolved. I am using Evolution 2.26.0-0ubuntu2 and still got the issue. If I disable the option "Leave message on server" but let the "Delete after" option on all messeages are deleted as expected. Both options should be connected and "delete after" should be grayed out if the first one isn't activated.
But of course first of all this function should work. I am using Evolution for more than three years and this option never worked.
Comment 18 Milan Crha 2009-04-02 13:20:54 UTC
I just checked and works fine for me. I have set "Leave messages on a server", "Delete after one day". And it did so, no messages on my server. evolution-data-server-2.26.0, probably same as you.

Could you try to run this command, please?

  $ CAMEL_DEBUG=all evolution &>camel.log

and check the content of camel.log file, delete from there all sensitive information, like user names, server addresses, passwords... and give it here? There should be some indication why it failed to delete older messages, or whether it tried to delete them at least. Thanks in advance.
Comment 19 unggnu 2009-04-14 16:54:41 UTC
I haven't seen this reply until now.
I have retested Evolution with a Jaunty Live CD and my account and it deleted the mails without a problem. So most likely it is a setting issue with the imported configuration.
How can I reset configuration of Evolution without affecting my mails, contacts, calendar and so on?
Btw. there doesn't seem to be anything related in the camel.log.
Comment 20 unggnu 2009-04-28 07:20:34 UTC
I have removed the gconf settings of Evolution but it didn't help. It seems that Evolution saves the know/already downloaded messages in the data folder.
Anyway the deleting seems to work with a new account or maybe only the first time but not for older ones.
Comment 21 Milan Crha 2009-04-28 08:44:15 UTC
You can close evolution and then move out your
   ~/.evolution/mail/pop/<account-name>
which will be recreated from scratch next start.
There is nothing more I can help you with at the moment, I'm afraid.
Comment 22 benh 2009-04-28 20:38:32 UTC
I have a similar weirdness here. I have both "leave messages on server" and "delete after ... days" -unchecked-. I would expect this to remove all the messages from the server after fetching them. However, this doesn't appear to work and messages are left there.

checking "delete after ... days" and setting it to something small (ie. 1 day) "fixed" it for me in that it will now expunge the older messages at least instead of leaving gazillions on the server.

This happened with whatever evolution version I was running on ubuntu intrepid lately, and didn't get "fixed" by the jaunty update (2.26.1-0ubuntu1)
Comment 23 Milan Crha 2009-04-29 13:52:20 UTC
(In reply to comment #22)
> I have a similar weirdness here. I have both "leave messages on server" and
> "delete after ... days" -unchecked-. I would expect this to remove all the
> messages from the server after fetching them. However, this doesn't appear to
> work and messages are left there.
> 
> checking "delete after ... days" and setting it to something small (ie. 1 day)
> "fixed" it for me in that it will now expunge the older messages at least
> instead of leaving gazillions on the server.
> 
> This happened with whatever evolution version I was running on ubuntu intrepid
> lately, and didn't get "fixed" by the jaunty update (2.26.1-0ubuntu1)
> 

Sounds like a different issue, as this one "Delete after xx days" works for you. Could you open new bug for your issue, if not in the bugzilla yet, please, and CC me there?
Comment 24 unggnu 2009-05-07 15:57:03 UTC
I have deleted ~/.evolution/mail/pop/<account-name> and still got the problem. Maybe it only works the first time a mailbox is created.
Comment 25 Andor J Kiss 2009-05-11 21:07:58 UTC
I'm still seeing this bug in HARDY - will try the solution in comment 21.

- CH
Comment 26 unggnu 2009-05-14 12:40:39 UTC
It isn't fixed in Hardy afaik. It should be fixed in Jaunty but it isn't at least for me.

I have removed the whole .evolution and apps/evolution directory, cleared my online mailbox and configured evolution again. I imported every mbox manually to prevent any settings from imported.

And it still doesn't work. Maybe it works only the first time or not with TLS/SSL but it doesn't help. Thunderbird working fine with the same account.
Comment 27 vercellone 2010-03-19 20:39:04 UTC
Ubuntu 9.10 Karmic Koala
Evolution 2.28.1

I have my earthlink account configured with the following Receiving Options:

[checked] Leave message on server
[checked] Delete after [7] day(s)
[unchecked] Disable support for all POP3 extensions

Email older than [7] days is not being deleted from the server as expected.

Am I missing something?
Comment 28 unggnu 2010-03-19 22:40:57 UTC
No, you don't miss something. I also have the problem with the Evolution version of Karmic.
Comment 29 Milan Crha 2010-03-31 22:08:49 UTC
bug #614388 has a follow up on this one.
Comment 30 Andor J Kiss 2011-03-23 18:05:37 UTC
This is still a bug in Lucid.  I think it has to do with using a SSL with POP.

Using 2.28.3 -> did this get fixed upstream?