0

I have a mail infrastructure running on Cyrus (2.5.10), Postfix (2.7.1) and Perdition (1.19).

Recently many users have been complaining about their quota usage being displayed wrongly.

When trying to solve that using quota -f, the command returned a System I/O Error due to the nonexistence of some invalid mailboxes that are not even listed under ctl_mboxlist -d, such as: '' (empty string) and 'DELETED.user.teste3cyrus.5A902111EFJulho 2017.5B2E7DCF4DE7725F3314'.

Here is the full output of the command:

failed opening header for mailbox 'domain.com!DELETED.user.teste3cyrus.5A902111EFJulho 2017.5B2E7DCF4DE7725F3314': System I/O error: No such file or directory processing mbox list for '': System I/O error: No such file or directory

Can anyone that has ever faced something like this help me out?

PS.: I tried to find a way to fix the quota of a single mailbox, with no success. The docs of the quota command only state that a mailbox prefix can be used, but no pattern on that is shown. I've tried user/[email protected], [email protected], mailbox-name, but none of those worked.

1
  • I've just found the pattern used with the quota command: quota domain.com!user.mailbox-name. But this did not work either. The only output I got was: Quota % Used Used Resource Root
    – hiagop
    Jul 20, 2018 at 16:35

2 Answers 2

0

Please give version, because Cyrus has changed quite a lot.

Having said that, I suggest a reconstruct first, which should find these broken DELETED mailboxes and make them correctly exist. I'd also use cyr_expire to clean up.

As for how you got into this state... I dunno. It smells like you've done things like moving filesystems around or dumping and restoring mailboxes.db without keeping the rest of the system in sync.

3
  • I've just added the versions like you asked. And indeed the mailboxes were moved around from an older server to one with the latest version of Debian. But the defective mailbox was created after the migration, so it should not be affected by any sync problems.
    – hiagop
    Jul 19, 2018 at 14:18
  • Did the reconstruct work? quota supports a "-u" parameter in version 3.0, but that won't help you! reconstruct is the thing that should be most helpful though. Jul 20, 2018 at 14:45
  • Not really. I've ran reconstruct -rf on the mailbox presenting defects, but no output is given, and nothing else has changed.
    – hiagop
    Jul 20, 2018 at 16:30
0

Finally got some advance. The actual problem was due to a missing folder on the file system level. The folder was marked to later deletion, but it might be deleted manually before Cyrus could expunge it.

Since then, every time Cyrus tried to expunge the mailboxes and messages for all users it encountered a System I/O Error caused by the missing folder, and thus some users could not get rid of their unwanted messages.

Solved the problem by recreating and giving the right ownership to the mission folder:

# mkdir /partition/domain/d/domain.com/t/user/teste3cyrus
# chwon -R cyrus:mail /partition/domain/d/domain.com/t/user/teste3cyrus

reconstructing its metadata files:

# su cyrus -c "/usr/lib/cyrus/bin/reconstruct -rfx DELETED/user/[email protected]"

and then deleting it for good:

# su cyrus -c "/usr/sbin/cyrus expire -E 0 -D 0 -X 0 -p DELETED.user.teste3cyrus -v"

The same problem occurred on other mailbox. I repeated the same steps above and I could fix the quota usage for all users with:

# su cyrus -c "/usr/lib/cyrus/bin/quota -f"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .