cyrus/chk_cyrus found messages and deleted messages differs on master and slave

Marcus Schopen lists at localguru.de
Mon Sep 15 14:08:01 EDT 2014


Hi,

some more info. I've copied the sent_mail folder to a testmachine and
started a chk_cyrus. Same messages in /var/log/mail.err:

cyrus/chk_cyrus[15900]: user.userxyz.sent_mail uid 201 found - adding
[...]
Btw: I figured out that rsyslog skipped some logging. So chk_cyrus
reports always the same amount of messages:

Sep 15 18:59:45 test rsyslogd-2177: imuxsock begins to drop messages
from pid 15900 due to rate-limiting


In the sent_mail folder there was one single messages, which is shown in
an imap client. This is message 1. in the file system and was created
after the user deleted all messages in the sent_mail folder.

-------------------
Sep 10 11:53:46 primary cyrus/imaps[19286]: Deleted mailbox
user.userxyz.sent_mail

-rw------- 2 cyrus mail 543 2014-09-12 10:18
var/spool/cyrus/mail/u/user/userxyz/sent_mail/1.
-------------------

It seems that something strange happened while deleting the 440 MB big
sent_mail folder. The cyrus databases inside the sent_mail started
counting at number 1 again. Using Thunderbird I've copied another
message inside the sent_mail folder and this message got number 2. and
overwrote the old "deleted" 2. messages, which is still hang around in
the file system together with the other ~1700 messages.

As the "deleted" mails in the sent_mail folder are hardlinked three
times 

10897103 -rw------- 3 cyrus mail 5520 Sep  9
23:08 /var/spool/cyrus/mail/u/user/userxyz/sent_mail/1766.

10897103 -rw------- 3 cyrus mail 5520 Sep  9
23:08 /var/spool/cyrus/mail/u/user/userxyz/Gesendete Elemente/1807.

10897103 -rw------- 3 cyrus mail 5520 Sep  9
23:08 /var/spool/cyrus/mail/u/DELETED/user/userxyz/sent_mail/54101FA9/1766.

what would happen if I start a cyrus expire on the
DELETED.user.userxyz.sent_mail folder by hand:

/usr/sbin/cyrus expire -E 1 -X 0 -D 0 -p DELETED.user.userxyz.sent_mail

This would be what will happen in a few days, when nightly cyrus expire
is started by cyrus events and the deleted messages are older than 7
days. So question is what happens to file files in
"u/user/userxyz/sent_mail" in
"u/DELETED/user/userxyz/sent_mail/54101FA9/" and in
"u/user/userxyz/Gesendete Elemente/" ? The files in subfolder "Gesendete
Elemente" subfolder must not be deleted. I think the user copied all
mails from "sent_mail" to "Gesendete Elemente" to merge, so he wants to
keep those mails.

Or another way: just delete user.userxyz.sent_mail subfolder using
cyradm. The sent_mail folder will be moved into a subfolder under
u/DELETED/user/userxyz/sent_mail/ and will only keep message 1., because
all other emails are not know by the cyrus databases in
user.userxyz.sent_mail. This would solve the chk_cyrus error messages.
But what happens to hardlink 1807. then?  Will cyrus keep these mails in
"Gesendete Elemente" then? 

Third way: reconstruct -r on the u/user/userxyz/sent_mail folder and
delete the complete folder by hand afterwards?

Ciao
Marcus



More information about the Info-cyrus mailing list