Bug 297768 - Filter loses mails, when moving messages from Mbox /var/spool/mail/$USER to INBOX
Summary: Filter loses mails, when moving messages from Mbox /var/spool/mail/$USER to I...
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: Mail Filter Agent (show other bugs)
Version: 4.8
Platform: Slackware Linux
: NOR critical
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-09 10:04 UTC by comet.friend
Modified: 2012-10-13 13:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description comet.friend 2012-04-09 10:04:42 UTC
Because KMail2 cannot spool messages from /var/spool/mail/$USER to inbox, I created an Mbox account/folder for that file and thought I could get the messages from there to inbox with a filter. However, mails are moved away from the file, but never arrive at the target destination, when I apply that filter.

I can use filters like that in combination with IMAP and POP3 accounts. While it is not applied automatically for incoming mail, like it should, it works, when I apply it manually. Just when I want to use such a filter for /var/spool/mail/$USER, mails are lost.



Steps to reproduce:

1. Create an account/folder containing your INBOX. Could be POP3 or maildir.

2. Create an Mbox account (and identity) for local mail, i. e. /var/spool/mail/$USER.

3. Create a filter, that moves all messages targeted at local addresses to INBOX (maildir).

4. Send yourself a local mail, from another user account on the same machine. Create a new user account, if you don't have one. Use mailx or Alpine to compose and send the message as the other user to your own account.

5. In the main window of KMail2, click on the Mbox folder symbol. You should see the new message. If so, you know, that automatic filtering of incoming messages is not working, BTW. Therefore, apply the filter now manually.

6. The message is deleted from the Mbox. But where is it? Not in the target folder (INBOX)! :((

So, KMail2 cannot handle local mail like every other Linux mail client I know of, and because filtering is not working, there's not even a workaround. What is more, the combination of bugs and deficiencies is critical, as losing mail is not acceptable. That's why I'd consider fixing this as very urgent.

Best regards,

   Alex
Comment 1 comet.friend 2012-04-09 12:17:51 UTC
Additional info: The mails are not actually lost. Alpine still "sees" them, but no trace of them in KMail2. Refreshing view etc. don't bring them back.

So, of four test mail in /var/spool/mail/$USER I see two still in KMail2, while the two other, which I applied the filter to, are seemingly gone. In Alpine all four mails are visible.

The problem is not alway reproducable. I just managed to apply the filter on two more mails successfully, but after a reboot of my machine the problem recurred.
Comment 2 András Manţia 2012-10-13 12:50:02 UTC
I can confirm the automatic filter on mbox fails, but in 4.9.x the content is not lost, the item appears correctly in inbox when filtered manually.
Comment 3 András Manţia 2012-10-13 13:34:23 UTC
Git commit 9e3bf983908e13bbe235f05005956bc3d8585bcb by Andras Mantia.
Committed on 13/10/2012 at 15:33.
Pushed by amantia into branch 'master'.

Treat MBOX resources as inboxes, as they are basically acting like that. This fixes filtering for mails that arrive to mbox.
FIXED-IN: 4.10

M  +6    -1    mailcommon/mailkernel.cpp
M  +1    -0    mailcommon/mailutil.h

http://commits.kde.org/kdepim/9e3bf983908e13bbe235f05005956bc3d8585bcb
Comment 4 András Manţia 2012-10-13 13:36:13 UTC
Git commit 7d989340cd57fbb30edadbd108bcc527b8700130 by Andras Mantia.
Committed on 13/10/2012 at 15:36.
Pushed by amantia into branch 'KDE/4.9'.

Treat MBOX resources as inboxes, as they are basically acting like that. This fixes filtering for mails that arrive to mbox.
FIXED-IN: 4.9.3
(cherry picked from commit 9e3bf983908e13bbe235f05005956bc3d8585bcb)

M  +6    -1    mailcommon/mailkernel.cpp
M  +1    -0    mailcommon/mailutil.h

http://commits.kde.org/kdepim/7d989340cd57fbb30edadbd108bcc527b8700130