Opened 15 years ago

Closed 15 years ago

#3187 closed bug (fixed)

IMAP mail folders problems (error while moving ... to : Invalid Argument)

Reported by: karmak Owned by: bga
Priority: normal Milestone: R1
Component: Servers/mail_daemon Version: R1/pre-alpha1
Keywords: Cc: olive@…
Blocked By: Blocking:
Platform: x86

Description

Here on Haiku hrev28750 (the bug happens since I use Haiku to fetch mail, approx hrev28500).

I fetch my mail in IMAP mode. My IMAP server is courier-imapon a personnal Ubuntu server. I fetch my mail in IMAP from Roundcube Webmail, 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 inbound_filters and 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 :

  • The loc variable seems to miss /mail/in/, or to have a superfluous /boot/home prefix. Sometimes (not visible in this trace) loc is totally empty.
  • The DESTINATION attribute 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 path variable 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).

Attachments (1)

screenshot of the problem (433.1 KB ) - added by karmak 15 years ago.

Download all attachments as: .zip

Change History (4)

by karmak, 15 years ago

Attachment: screenshot of the problem added

comment:1 by karmak, 15 years ago

Cc: olive@… added

comment:2 by anevilyak, 15 years ago

Owner: changed from axeld to bga

comment:3 by bga, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev29326.

Note: See TracTickets for help on using tickets.