Bug 3944 - Failing IMAP account on startup
Summary: Failing IMAP account on startup
Status: RESOLVED WORKSFORME
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: Folders/IMAP (show other bugs)
Version: 3.16.0
Hardware: All Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2018-01-07 09:40 CET by niroday
Modified: 2018-01-18 19:17 CET (History)
0 users

See Also:


Attachments
"claws-mail --debug" log (22.57 KB, text/x-log)
2018-01-07 09:40 CET, niroday
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description niroday 2018-01-07 09:40:59 CET
Created attachment 1833 [details]
"claws-mail --debug" log

Hello. 
When i run the app either from terminal or from app launcher (dmenu, rofi) i get this error:
"Claws Mail has detected a configured mailbox, but it is incomplete. It is possibly due to a failing IMAP account. Use "Rebuild folder tree" on the mailbox parent folder's context menu to try to fix it."
The error appears even after rebuilding folder tree. However it doesn't affect on other functionality. Receiving mail with imap works fine.
Comment 1 Paul 2018-01-18 12:42:30 CET
How are you qutting claws-mail? Just killing it, or a proper, clean exit?
Comment 2 niroday 2018-01-18 12:52:56 CET
(In reply to comment #1)
> How are you qutting claws-mail? Just killing it, or a proper, clean exit?

File-Exit or Ctrl+Q
Comment 3 Paul 2018-01-18 13:04:06 CET
And yet you get the "Claws Mail has detected a configured mailbox, but it is incomplete...." dialogue every time you start claws-mail?
Comment 4 niroday 2018-01-18 13:10:58 CET
(In reply to comment #3)
> And yet you get the "Claws Mail has detected a configured mailbox, but it is
> incomplete...." dialogue every time you start claws-mail?

Yes, i do. I can make a short record if it's needed.
Comment 5 Paul 2018-01-18 13:52:53 CET
how many accounts do you have?

Please check /Configuration/Edit Accounts/...

and verify that ~/.claws-mail/accountrc corresponds with that.

Then check ~/.claws-mail/folderlist.xml and verify that that also corresponds.

(You can send me those 2 files privately, if you want me to check.)
Comment 6 niroday 2018-01-18 14:14:52 CET
(In reply to comment #5)
> how many accounts do you have?
> 
> Please check /Configuration/Edit Accounts/...
> 
> and verify that ~/.claws-mail/accountrc corresponds with that.
> 
> Then check ~/.claws-mail/folderlist.xml and verify that that also
> corresponds.
> 
> (You can send me those 2 files privately, if you want me to check.)

I checked it. Seems like they correspond. Anyway sent it to you.
Comment 7 Paul 2018-01-18 14:33:27 CET
Thanks for sending the files.

Your accountrc seems messed up somehow.

Account 2 is using Account 1's IMAP mailbox, and Account 1 is using a non-existant MH mailbox.

Quit claws-mail, backup your accountrc, then make the follwing changes to accountrc:

for Account 2, set
inbox=#imap/LVA/INBOX
local_inbox=#imap/LVA/INBOX

and for Account 1, set
inbox=#imap/niroday/INBOX
local_inbox=#imap/niroday/INBOX

Restart claws-mail. You should get the "Claws Mail has detected a configured mailbox, but it is incomplete...." dialogue on the first run, but after that it should all be OK.
Comment 8 Paul 2018-01-18 14:47:40 CET
If the manual editing of accountrc still does not resolve the issue, just remove both accounts and then re-add them.
Comment 9 niroday 2018-01-18 15:01:19 CET
(In reply to comment #8)
> If the manual editing of accountrc still does not resolve the issue, just
> remove both accounts and then re-add them.

Unfortunately, manual reconfiguring doesn't resolve this issue, just as you said. I deleted both of my accounts and then found accountrc empty. After adding the first account, i found this strange
inbox=#mh/Mailbox/inbox
local_inbox=#mh/Mailbox/inbox
again as well as i get the same message on claws-mail startup.
Comment 10 Paul 2018-01-18 15:37:11 CET
it could be that at least one of your imap accounts is misconfigured, logging in is not possible, and therefore 'rebuild folder tree' cannot complete.

Do you see now two imap mailboxes? Can you successfully run 'rebuild folder tree' on both (right-click the top-level mailbox folder for this menu item)

I am trying to set up things here in order to try to reproduce your problem, in the meantime if you can do the above tests and report back that would be good.
Comment 11 niroday 2018-01-18 15:53:52 CET
(In reply to comment #10)
> it could be that at least one of your imap accounts is misconfigured,
> logging in is not possible, and therefore 'rebuild folder tree' cannot
> complete.
> 
> Do you see now two imap mailboxes? Can you successfully run 'rebuild folder
> tree' on both (right-click the top-level mailbox folder for this menu item)
> 
> I am trying to set up things here in order to try to reproduce your problem,
> in the meantime if you can do the above tests and report back that would be
> good.

If i start CM from my terminal i can see these messages when rebuilding folder tree is running:

** (claws-mail:14685): WARNING **: [17:43:32] can't create mailbox

In case this fail depends on folder rights, i have /var/spool/mail (i'm running arch and /var/mail is a link to /var/spool/mail):

drwxrwxrwt 2 root root 4.0K Oct 17 10:32 mail

Every single file in $HOME/.claws-mail:

-rw-r--r-- 1 localuser users

The other things like receiving or sending e-mails works without any errors. 
Hope it helps.
Comment 12 Paul 2018-01-18 16:02:57 CET
It's nothing to do with the local spool (/var/mail/spool)

It's looking more and more like a misocnfigured imap account (or both of them).
Comment 13 Paul 2018-01-18 16:05:16 CET
Do you see both IMAP accounts in the folder list?

Do they both show folders or just a single top-level folder?

If you just see the single top-level folder with no sub-folders then it is almost certainly that you are not able to log-in to the server with the credentials you have provided.
Comment 14 niroday 2018-01-18 16:20:41 CET
(In reply to comment #13)
> Do you see both IMAP accounts in the folder list?
> 
> Do they both show folders or just a single top-level folder?
> 
> If you just see the single top-level folder with no sub-folders then it is
> almost certainly that you are not able to log-in to the server with the
> credentials you have provided.

Yes, i see them both.
They both show folders just like if i access my account using browser.
I'm sure i see every folder as well as i can without a error receive and send messages from both of my accounts.
I've just tried another e-mail client with exactly the same imap settings and experienced no problems.

Please tell me if you need more information.
Comment 15 Paul 2018-01-18 16:26:40 CET
OK, time for drastic measures...

Move (or rename) your whole ~/.claws-mail directory out of the way, and start from scratch.

If possible, create a video of the operation and/or supply a complete debug log. (You'll need to start with `claws-mail --debug > claws-mail.debug` for that.)
Comment 16 niroday 2018-01-18 17:03:42 CET
(In reply to comment #15)
> OK, time for drastic measures...
> 
> Move (or rename) your whole ~/.claws-mail directory out of the way, and
> start from scratch.
> 
> If possible, create a video of the operation and/or supply a complete debug
> log. (You'll need to start with `claws-mail --debug > claws-mail.debug` for
> that.)

Sent you all the data. I made a little mistake when showing an english version of yandex imap settings page. Of course i use imap/smtp.yandex.ru. Sorry for that.
Comment 17 Paul 2018-01-18 17:47:12 CET
i created a yandex imap account and don't have any problems at all.
Comment 18 niroday 2018-01-18 17:52:26 CET
(In reply to comment #17)
> i created a yandex imap account and don't have any problems at all.

I hope the video shows that i do nothing wrong configuring account. So it could be distro specific problems or something else?
Comment 19 Paul 2018-01-18 17:55:59 CET
Perhaps you using arch is pertinent. We have seen a lot of odd, unreproducible problems from arch users.
Comment 20 niroday 2018-01-18 18:20:55 CET
(In reply to comment #19)
> Perhaps you using arch is pertinent. We have seen a lot of odd,
> unreproducible problems from arch users.

Anyway thanks a lot for your help and your time. Should i close the ticket?
Comment 21 Paul 2018-01-18 19:17:44 CET
yes, I think closing it is the right thing to do now - I'll close it.