IMAP mail folders problems (error while moving ... to : Invalid Argument)
|Reported by:||karmak||Owned by:||bga|
I fetch my mail in IMAP mode. My IMAP server is
courier-imapon a personnal
Ubuntu server. I fetch my mail in IMAP from
Thunderbird under Windows and Linux,
Evolution under Linux without problems.
Under Haiku I use no SSL, default parameters, and no filter at all. The only preferences I set are server hostname, login and password.
I've done tests with "top IMAP folder" preference set to nothing, and set to "INBOX" or ".", the issue appears everytime but have different symptoms.
The problem : When fetching mail,
mail_daemon reports Invalid Argument errors (see attachment), saying that it can't move messages to their final location.
- When "default mail folder" pref is not set, all fetched mails stay in ~/mail/in/ after the fetch operation ; in ~/mail/in/ a folder called INBOX/ is created, and all my IMAP subfolders are inside, but all empty (INBOX is empty too, except its subfolders).
- When it is set to "INBOX", all subfolders are created in ~/mail/in/ ; when mail is fetched, a temporary file appears shortly (one at a time) in ~/mail/in/ then disseapears (i think its normal); after the fetch operation, NO mail exists on my disk (all are lost).
I investigated some hours in
mail_daemon, in mail kit, in
system_filters. I didn't find a solution, but narrowed the problem to
src/add-ons/mail_daemon/system_filters/inbox/filter.cpp : with a debug message, I could pruduce this trace :
FolderFilter::ProcessMailMessage: first path: /boot/home/mail/in, loc: /boot/home/Ubuntu, DESTINATION: [Ó FolderFilter::ProcessMailMessage: first path: /boot/home/mail/in, loc: /boot/home/Ubuntu, DESTINATION: [ FolderFilter::ProcessMailMessage: first path: /boot/home/mail/in, loc: /boot/home/Haiku, DESTINATION: [ FolderFilter::ProcessMailMessage: first path: /boot/home/mail/in, loc: /boot/home/Haiku, DESTINATION: e^_ÐU,W
Things I see, at first glance :
locvariable seems to miss
/mail/in/, or to have a superfluous
/boot/homeprefix. Sometimes (not visible in this trace)
locis totally empty.
DESTINATIONattribute seems to have an uninitialized content (it could be a binary value, but I doubt this because a correct value should be appended to the
pathvariable it the attribute exists).
I found in
src/add-ons/mail_daemon/inbound_filters/match_header/RuleFilter.cpp that DESTINATION is set to the value of
arg, but I couldn't determine reliably from where it is called.
My knowledge of
mail_daemon is very limited, I started diving in the code only today, my time was limited and my C++ knowledge is coming back very very slowly (I programmed
DeeperPeople for BeOS in 2001 and didn't program C++ since then, my professionnal life has taken me far from C++ and I did too little programming during all these years).