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 714775 - change the way special folders are instantiated
change the way special folders are instantiated
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: engine
master
Other All
: High normal
: ---
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-28 10:32 UTC by Charles Lindsay
Modified: 2019-04-01 06:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Charles Lindsay 2013-11-21 23:11:25 UTC


---- Reported by chaz@yorba.org 2013-03-28 15:32:00 -0700 ----

Original Redmine bug id: 6702
Original URL: http://redmine.yorba.org/issues/6702
Searchable id: yorba-bug-6702
Original author: Charles Lindsay
Original description:

Right now, for gmail accounts at least, there's a map of folder path to
special folder type. This is wrong, because we should rely on the XLIST result
to tell us what the special folder type is. Unfortunately, the folder has to
be created with a specific class, after which changing the special folder type
may not work as you'd expect. We should change this to either rely solely on
the special folder type (which can be changed later) and eliminate the folder
subclasses, or figure out a way to make sure we always have the XLIST results
up front so we can create the correct class instance and not allow changing
the special folder type later.

Related issues:
related to geary - 6616: Assertion failed: core dump (Fixed)
related to geary - 6892: Select proper folder after special type change
of selecte... (Fixed)



---- Additional Comments From geary-maint@gnome.bugs 2013-09-04 17:40:00 -0700 ----

### History

####

#1

Updated by Jim Nelson 8 months ago

  * **Priority** changed from _Normal_ to _High_
  * **Target version** set to _0.4.0_

####

#2

Updated by Jim Nelson 3 months ago

  * **Target version** changed from _0.4.0_ to _0.5.0_



--- Bug imported by chaz@yorba.org 2013-11-21 23:11 UTC  ---

This bug was previously known as _bug_ 6702 at http://redmine.yorba.org/show_bug.cgi?id=6702

Unknown milestone "unknown in product geary. 
   Setting to default milestone for this product, "---".
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
Resolution set on an open status.
   Dropping resolution 

Comment 1 Michael Gratton 2017-11-02 00:35:16 UTC
NB: See comment in Geary.ImapEngine.MinimalFolder::open_remote_locked_async
Comment 2 Federico Bruni 2017-12-21 17:20:33 UTC
I'm having issues with special folders detection by Geary. See reports here:
https://mail.gnome.org/archives/geary-list/2017-December/msg00043.html

This happened after clearing all Geary databases and settings and restarting from scratch.

In a nutshell:

* Geary cannot detect Archive and Spam special folders of my dovecot account
* so Geary guesses the names (localized) and set them up in geary.ini:

$ cat .config/geary/account_01/geary.ini | grep -i folder
drafts_folder=
sent_mail_folder=
spam_folder=;Indesiderata;
trash_folder=
archive_folder=;Archivio;

* the only workaround I found is manually editing geary.ini to enter the right values, that is:

spam_folder=Spam
trash_folder=
archive_folder=Archive

I'm not sure if this is the right ticket to report  it to or should I open a new one.


Relevant parts of the log:

[deb] 17:54:54 0,000271 default: imap-engine-account-synchronizer.vala:217: Other:account_01: Starting background sync
 [deb] 17:54:55 0,505933 default: imap-folder-properties.vala:108: account_01:Drafts (open_count=0 remote_opened=false) FolderProperties changed: UIDNEXT=13222 other.UIDNEXT=13215
 [deb] 17:54:55 0,018314 default: imap-folder-properties.vala:108: account_01:Sent (open_count=0 remote_opened=false) FolderProperties changed: UIDNEXT=3245 other.UIDNEXT=3244
 [deb] 17:54:55 0,058338 default: imap-folder-properties.vala:108: account_01:Trash (open_count=0 remote_opened=false) FolderProperties changed: UIDNEXT=70269 other.UIDNEXT=70267
 [deb] 17:54:55 0,027197 default: imap-engine-generic-account.vala:766: Creating >Indesiderata to use as special folder GEARY_SPECIAL_FOLDER_TYPE_SPAM
 [deb] 17:54:55 0,042015 default: imap-client-session.vala:1295: [0000/mail.autistici.org/default:993 GEARY_IMAP_CLIENT_SESSION_STATE_AUTHORIZED] Received error from server: a021 NO [CANNOT] Invalid mailbox name: Begins with hierarchy separator
*[wrn] 17:54:55 0,000345 default: imap-engine-generic-account.vala:907: Unable to ensure special folder GEARY_SPECIAL_FOLDER_TYPE_SPAM: Server reports error creating folder /Indesiderata: a021 NO [CANNOT] Invalid mailbox name: Begins with hierarchy separator
 [deb] 17:54:55 0,011041 default: imap-engine-generic-account.vala:766: Creating >Archivio to use as special folder GEARY_SPECIAL_FOLDER_TYPE_ARCHIVE
 [deb] 17:54:55 0,042451 default: imap-client-session.vala:1295: [0000/mail.autistici.org/default:993 GEARY_IMAP_CLIENT_SESSION_STATE_AUTHORIZED] Received error from server: a022 NO [CANNOT] Invalid mailbox name: Begins with hierarchy separator
*[wrn] 17:54:55 0,006369 default: imap-engine-generic-account.vala:907: Unable to ensure special folder GEARY_SPECIAL_FOLDER_TYPE_ARCHIVE: Server reports error creating folder /Archivio: a022 NO [CANNOT] Invalid mailbox name: Begins with hierarchy separator
Comment 3 Federico Bruni 2017-12-21 17:27:29 UTC
I've now checked the ~/.config/geary files on my desktop. These were created when Geary used real email addresses name@domain instead of account_01, account_02, etc.

Spam and Archive folders for this account are set. I cannot remember me doing it.
Same for a second account, where I have 5 special folders explicitly set up. I'm quite sure I never did.

So I guess that Geary used to set the right special folders in geary.ini
Comment 4 Michael Gratton 2018-01-11 05:41:37 UTC
Federico, can you say what is the personal namespace hierarchy separator being used (printed in the debug output when first connecting) for that account? Also, what's the server software, again?
Comment 5 Federico Bruni 2018-01-12 11:23:59 UTC
Server software is Dovecot.

I commented the special folders I've defined in the account .ini file and started again Geary. Below output is not what you need? (it was present also in my previous comment)
If I keep the special folders defined in the .ini file, I cannot see any error about hierarchy separator.

Let me know what you need exactly.


[deb] 12:16:36 0,074174 default: imap-client-session.vala:1295: [0000/mail.autistici.org/default:993 GEARY_IMAP_CLIENT_SESSION_STATE_AUTHORIZED] Received error from server: a008 NO [CANNOT] Invalid mailbox name: Begins with hierarchy separator
*[wrn] 12:16:36 0,000304 default: imap-engine-generic-account.vala:845: Unable to ensure special folder GEARY_SPECIAL_FOLDER_TYPE_SPAM: Server reports error creating folder /Indesiderata: a008 NO [CANNOT] Invalid mailbox name: Begins with hierarchy separator
 [deb] 12:16:36 0,013889 default: imap-client-session.vala:1707: [0001/mail.autistici.org/default:993 GEARY_IMAP_CLIENT_SESSION_STATE_CONNECTING] Connected to mail.autistici.org/default:993
 [deb] 12:16:36 0,000017 default: imap-client-session.vala:779: [0001/mail.autistici.org/default:993 GEARY_IMAP_CLIENT_SESSION_STATE_CONNECTING] Connected
 [deb] 12:16:36 0,026392 default: imap-engine-generic-account.vala:638: Creating >Archivio to use as special folder GEARY_SPECIAL_FOLDER_TYPE_ARCHIVE
 [deb] 12:16:36 0,074996 default: imap-client-session.vala:1295: [0000/mail.autistici.org/default:993 GEARY_IMAP_CLIENT_SESSION_STATE_AUTHORIZED] Received error from server: a009 NO [CANNOT] Invalid mailbox name: Begins with hierarchy separator
*[wrn] 12:16:36 0,000316 default: imap-engine-generic-account.vala:845: Unable to ensure special folder GEARY_SPECIAL_FOLDER_TYPE_ARCHIVE: Server reports error creating folder /Archivio: a009 NO [CANNOT] Invalid mailbox name: Begins with hierarchy separator
 [deb] 12:16:36 0,000138 default: imap-engine-account-processor.vala:80: Other:fede@inventati.org: Executing operation: GearyImapEngineCheckFolderSync(Archive)
 [deb] 12:16:36 0,000037 default: imap-engine-email-prefetcher.vala:98: Listing all emails needing prefetching in fede@inventati.org:Archive (open_count=1 remote_opened=false)...
Comment 6 Michael Gratton 2019-03-31 12:51:39 UTC
I think we resolved thus in 0.13, right?
Comment 7 Federico Bruni 2019-04-01 06:45:36 UTC
Yes, I've recently deleted and reconfigured an account from scratch and I had no issue with special folders.