Bug 781447

Summary: Evolution couldn't remember mail sort ordering and visibility columns
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: evolutionAssignee: Matthew Barnes <mbarnes>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: lucilanga, mbarnes, mcrha
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-31 08:49:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
test.c none

Description Mikhail 2012-01-13 12:57:39 UTC
Description of problem:
Evolution couldn't remember mail sort ordering and visibility columns

Comment 1 Milan Crha 2012-01-16 11:33:30 UTC
Thanks for a bug report. It works for me fine. The behaviour depends on Edit->Preferences->mail Preferences, tab General, section Message display, option "Apply the same view settings to all folders" too, especially if you expect changing folder columns in one folder being propagate to other folders as well. 

In case it's something different, could you run evolution from a terminal and see whether it'll claim any error there? Thanks in advance.

Comment 2 Mikhail 2012-01-18 06:19:14 UTC
I mean this problem https://docs.google.com/leaf?id=0B0nwzlfiB4aQNDI3NmE5ODgtODg0Ni00MDYwLTk4NjMtNDQxZTFlZTg5NmY1

Your advice help me.

But I think "Apply the same view settings to all folders" means that same setting have another folder (for example "Deleted Items" or "Outbox") but this not means not saving setting for current view.

Comment 4 Milan Crha 2012-01-18 10:06:38 UTC
Thanks for the update. The video is quite interesting. I tried the same here and it works for me, the just added column (I also used column Size) doesn't vanish if I left-click above it.

Could you run evolution from a terminal and see whether there are any errors shown when you repeat the issue, please?

Comment 5 Mikhail 2012-01-18 12:34:06 UTC
(In reply to comment #4)
> Thanks for the update. The video is quite interesting. I tried the same here
> and it works for me, the just added column (I also used column Size) doesn't
> vanish if I left-click above it.
> 
> Could you run evolution from a terminal and see whether there are any errors
> shown when you repeat the issue, please?

[mikhail@telecon17l ~]$ evolution
Unknown parameter encountered: "announce as"
Ignoring unknown parameter "announce as"

(evolution:5860): camel-WARNING **: Could not open converter for 'CP20866' to 'UTF-8' charset

(evolution:5860): menus-WARNING **: Unable to save view to /home/mikhail/.config/evolution/mail/views/current_view-folder:__1323840999.1759.2_40localhost.localdomain__d0_9f_d0_be_d1_87_d1_82_d0_be_d0_b2_d1_8b_d0_b9_20_d1_8f_d1_89_d0_b8_d0_ba_20-_20_d0_93_d0_b0_d0_b2_d1_80_d0_b8_d0_bb_d0_be_d0_b2_20_d0_9c_d0_b8_d1_85_d0_b0_d0_b8_d0_bb_20_d0_92_d0_b8_d1_82_d0_b0_d0_bb_d1_8c_d0_b5_d0_b2_d0_b8_d1_87_Inbox.xml - File name too long

(evolution:5860): menus-WARNING **: Unable to save view to /home/mikhail/.config/evolution/mail/views/current_view-folder:__1323840999.1759.2_40localhost.localdomain__d0_9f_d0_be_d1_87_d1_82_d0_be_d0_b2_d1_8b_d0_b9_20_d1_8f_d1_89_d0_b8_d0_ba_20-_20_d0_93_d0_b0_d0_b2_d1_80_d0_b8_d0_bb_d0_be_d0_b2_20_d0_9c_d0_b8_d1_85_d0_b0_d0_b8_d0_bb_20_d0_92_d0_b8_d1_82_d0_b0_d0_bb_d1_8c_d0_b5_d0_b2_d0_b8_d1_87_Inbox.xml - File name too long

(evolution:5860): menus-WARNING **: Unable to save view to /home/mikhail/.config/evolution/mail/views/current_view-folder:__1323840999.1759.2_40localhost.localdomain__d0_9f_d0_be_d1_87_d1_82_d0_be_d0_b2_d1_8b_d0_b9_20_d1_8f_d1_89_d0_b8_d0_ba_20-_20_d0_93_d0_b0_d0_b2_d1_80_d0_b8_d0_bb_d0_be_d0_b2_20_d0_9c_d0_b8_d1_85_d0_b0_d0_b8_d0_bb_20_d0_92_d0_b8_d1_82_d0_b0_d0_bb_d1_8c_d0_b5_d0_b2_d0_b8_d1_87_Inbox.xml - File name too long

(evolution:5860): menus-WARNING **: Unable to save view to /home/mikhail/.config/evolution/mail/views/current_view-folder:__1323840999.1759.2_40localhost.localdomain__d0_9f_d0_be_d1_87_d1_82_d0_be_d0_b2_d1_8b_d0_b9_20_d1_8f_d1_89_d0_b8_d0_ba_20-_20_d0_93_d0_b0_d0_b2_d1_80_d0_b8_d0_bb_d0_be_d0_b2_20_d0_9c_d0_b8_d1_85_d0_b0_d0_b8_d0_bb_20_d0_92_d0_b8_d1_82_d0_b0_d0_bb_d1_8c_d0_b5_d0_b2_d0_b8_d1_87_Inbox.xml - File name too long

Comment 6 Milan Crha 2012-01-19 07:43:35 UTC
Thanks for the update. I suppose it explains it quite well. Your machine is named very unusually. If you change it to something more common, like simple localhost.localdomain, then it will start work again. Note any new mail can have this name used in Message-ID header, which may be just a waste of space.

Do you know how your machine got so complicated name?

Comment 7 Mikhail 2012-01-20 08:44:58 UTC
My machine network name is:

[mikhail@telecon17l ~]$ cat /etc/sysconfig/network
HOSTNAME=telecon17l.afbank.ru
NETWORKING=yes
NTPSERVERARGS=iburst
NISDOMAIN=afbank.ru

Comment 8 Milan Crha 2012-01-20 09:37:02 UTC
Created attachment 556478 [details]
test.c

Evolution is using gethostname() function, maybe it reads it from elsewhere. Could you save this file as test.c, compile it and test what it'll return, please? You can compile and run it like this:
   $ gcc test.c -o test `pkg-config glib-2.0 --cflags --libs` && ./test

Maybe I can attach a binary too, if you do not have build environment.

Comment 9 Mikhail 2012-01-20 10:12:15 UTC
[mikhail@telecon17l ~]$ gcc test.c -o test `pkg-config glib-2.0 --cflags --libs` && ./test
gethostname: 'telecon17l.afbank.ru'
g_get_host_name: 'telecon17l.afbank.ru'

Comment 10 Milan Crha 2012-01-23 07:51:59 UTC
Aha, I'm wrong in that case. Is it possible you configures your mail account(s) before you set the host name? Because if g_get_host_name() returns the right name, then it's the only other cause I can think of at the moment.

A quick workaround is to run gconf-editor, open /apps/evolution/mail/accounts key, that's the place where are stored your configured accounts, and check each with its "uid" value, which you may want to shorten. I would remove all after localhost.localdomain. Each line in the key corresponds to one account, and it's usually much easier to edit it in a gedit or any other text editor, as it's an XML blob, and quite long string, which gconf-editor cannot edit inline easily.

Comment 11 Mikhail 2012-01-30 13:48:46 UTC
I removed and re create my exchange mail account. But this error still here

(evolution:6699): menus-WARNING **: Unable to save view to /home/mikhail/.config/evolution/mail/views/current_view-folder:__1327929879.6449.0_40telecon17l.afbank.ru__d0_9f_d0_be_d1_87_d1_82_d0_be_d0_b2_d1_8b_d0_b9_20_d1_8f_d1_89_d0_b8_d0_ba_20-_20_d0_93_d0_b0_d0_b2_d1_80_d0_b8_d0_bb_d0_be_d0_b2_20_d0_9c_d0_b8_d1_85_d0_b0_d0_b8_d0_bb_20_d0_92_d0_b8_d1_82_d0_b0_d0_bb_d1_8c_d0_b5_d0_b2_d0_b8_d1_87_Inbox.xml - File name too long

As you can see network name are correct and now is telecon17l.afbank.ru, but evolution concat with follow string "_d0_9f_d0_be_d1_87_d1_82_d0_be_d0_b2_d1_8b_d0_b9_20_d1_8f_d1_89_d0_b8_d0_ba_20-_20_d0_93_d0_b0_d0_b2_d1_80_d0_b8_d0_bb_d0_be_d0_b2_20_d0_9c_d0_b8_d1_85_d0_b0_d0_b8_d0_bb_20_d0_92_d0_b8_d1_82_d0_b0_d0_bb_d1_8c_d0_b5_d0_b2_d0_b8_d1_87_Inbox".

Comment 12 Milan Crha 2012-01-30 18:37:00 UTC
Hrm, I'm wondering from where that "handy" string comes from then.
If you run this, will it show the string there too?

   $ gconftool-2 --get /apps/evolution/mail/accounts | grep 1327929879.6449

This is with evolution-mapi, right?

Comment 14 Milan Crha 2012-01-31 08:49:00 UTC
Thanks for the update. The account definition looks OK, which might mean the long part comes from folder name itself. I see now it comes from there, I overlooked it, and to be honest, I didn't think of it too.

The usual English naming for MAPI personal folders is "Mailbox - User Name", while your server is configured to use this string translated to Russian. Because it contains all the UTF8 letters, then when creating the folder URI, under which the column setup is saved, the UTF8 letters are encoded according to URI specification, which makes the resulting string too long. A workaround would be to set Edit->Preferences->Mail Preferences->Apply the same view settings to all folders, which is saving views into a generic, short enough, name.

This may mean some core changes in evolution itself, thus I'm moving this upstream as [1], where will be done any further updates. Feel free to CC yourself there. Thanks for help with this.

I'm marking the above dump of the GConf key as private, just to not expose it to public.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=669097