[Users] [Bug 2687] New: Unable to clean an mbox mailbox
noreply at thewildbeast.co.uk
noreply at thewildbeast.co.uk
Sun Jul 1 11:47:19 CEST 2012
http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=2687
Summary: Unable to clean an mbox mailbox
Product: Claws Mail
Version: 3.8.1
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P3
Component: Plugins/mailMBOX
AssignedTo: users at lists.claws-mail.org
ReportedBy: pv4 at bk.ru
Created an attachment (id=1123)
--> (http://www.thewildbeast.co.uk/claws-mail/bugzilla/attachment.cgi?id=1123)
The fix
OVERVIEW:
If removing message(s) from an mbox mailbox causes it to have no messages after
the removal, then the removed messages return back to the mailbox after
claws-mail restart.
STEPS TO REPRODUCE:
0. use claws-mail-3.8.1, mailmbox-1.14.7, linux 3.4.2 (according to mmap
manpage, linux-2.6.12 and above are affected),
1. start claws-mail with mailmbox.so plugin enabled,
2. create an empty mbox mailbox, and a folder in it,
3. copy a message to the folder
4. restart claws-mail
5. enter the folder and delete the message
6. restart claws-mail
7. enter the folder
EXPECTED RESULT: folder is empty
ACTUAL RESULT: folder contains the removed message (and it's unread)
EXPLANATION:
When writing mbox file mmap(0, size, ...) is used with zero size (since there
are no messages in the box). mmap returns MAP_FAILED and
MAILBOX_ERROR_FILE error is returned (which I guess causes the newly
created file to not overwrite the old one).
FIX:
Don't call *map functions if size is zero. The loop between mmap and munmap
won't generate segmentation faults since there are no messages to write so we
can leave it as is.
This causes an empty file to be created and MAILMBOX_NO_ERROR is returned
so the new empty file overwrites the old one.
--
Configure bugmail: http://www.thewildbeast.co.uk/claws-mail/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Users
mailing list