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 662929 - POP3 prevents expunge of local Inbox in offline
POP3 prevents expunge of local Inbox in offline
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.0.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2011-10-28 12:24 UTC by Christoph Wickert
Modified: 2011-11-09 14:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.91/3.0


Attachments
Screenshot of the error message (103.65 KB, image/png)
2011-10-28 12:24 UTC, Christoph Wickert
  Details
eds patch (10.78 KB, patch)
2011-11-09 14:19 UTC, Milan Crha
committed Details | Review
evo patch (1003 bytes, patch)
2011-11-09 14:22 UTC, Milan Crha
committed Details | Review

Description Christoph Wickert 2011-10-28 12:24:17 UTC
Created attachment 200166 [details]
Screenshot of the error message

Description of problem:
Sometimes I cannot empty my trash can when I am offline even though this is a local trash. I have 2 accounts configured, one IMAP and one POP3 and the one evolution complains about is "Local folders".

Version-Release number of selected component (if applicable):
evolution-3.0.3-1.fc15.x86_64

How reproducible:
sometimes

Steps to Reproduce:
1. Work online
2. Disconnect
3. Empty trash
  
Actual results:
After a while an error message appears: 

  Error while deleting »Trash« in »Local Folders«.
  Could not resolve hostname pop.googlemail.com. Name or service not known.

Expected results:
Offline should be offline and thus it should not matter if the POP account at Google is offline or not.

Additional info:
Doesn't happen every time.
Comment 1 Milan Crha 2011-10-31 08:19:48 UTC
This is related to Edit->Preferences->Mail Accounts-><pop account>->Edit, tab Receiving Options, option "Delete expunged from local Inbox". Deleting the POP message and expunging trash means contacting the server and delete it from it as well. That's why it tries to contact your server, because it doesn't know/check if you are offline.

I think this was filled already somewhere, or was mentioned on an evolution-list. One or the other.
Comment 2 Christoph Wickert 2011-10-31 11:34:00 UTC
(In reply to comment #1)
> This is related to Edit->Preferences->Mail Accounts-><pop account>->Edit, tab
> Receiving Options, option "Delete expunged from local Inbox".

That option is/was never turned on. I am not deleting any mail from my gmail account but rather use it as a giant archive.

This also would not explain why it only happens sometimes.
Comment 3 Milan Crha 2011-11-01 07:21:43 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > This is related to Edit->Preferences->Mail Accounts-><pop account>->Edit, tab
> > Receiving Options, option "Delete expunged from local Inbox".
> 
> That option is/was never turned on. I am not deleting any mail from my gmail
> account but rather use it as a giant archive.

Aha, then it would be good to focus on this first, because it may not try doing a server checking/deleting when you do not want to expunge there too.
Comment 4 Milan Crha 2011-11-09 14:19:35 UTC
Created attachment 201064 [details] [review]
eds patch

for evolution-data-server;

Various POP3 provider changes, to highlight some of them:
- test whether being connected before attempting to do a network operation,
  and if not, then claim for being offline
- do not even try connect when being offline
- check for non-NULL engine pointers in camel-pop3-engine.c

I also realized that messages can have set multiple source headers (X-Evolution-Source), thus that is fixed too, same as is fixed to not overwrite this header in camel_folder_get_message_sync(), if it's already set. It was overwriting pop3 source headers. If anything will not work as expected, then there can be changed the source header for pop3 messages, to not clash with this one.
Comment 5 Milan Crha 2011-11-09 14:22:59 UTC
Created attachment 201065 [details] [review]
evo patch

for evolution;

Skip pop3 accounts which doesn't apply for "Delete expunged from Inbox" options. This will still claim about being offline, but only if there is any pop3 account configured with the option. Otherwise it doesn't claim anything.
Comment 6 Milan Crha 2011-11-09 14:27:09 UTC
Created commit 7f7b8cd in eds master (3.3.2+)
Created commit 1dc40cd in evo master (3.3.2+)