1

I've got courier-imap 4.6.0-2.1ubuntu1 running on Ubuntu 10.04.4 LTS on a virtual/cloud LAMP machine with 1GB RAM.

There is a particular (unmaintained) email address which has 100,000+ emails, all in the INBOX, and for a few weeks now I've been unable to open the mailbox in Roundcube webmail client (it gives a "can't allocate memory" error message) or Mozilla Thunderbird (silent failure).

I've just tried using mutt to read the mailbox, and I get the same "can't allocate memory" error message.

What can I do to resolve the problem so I can clean up the mailbox and reduce the number of emails in the INBOX? Can I just move some of the files around?

This is the directory listing of the Maildir:

total 73060
drwx------ 2 vmail vmail     4096 2013-11-06 15:43 courierimapkeywords
-rw-r--r-- 1 vmail vmail 20676660 2014-02-25 10:32 courierimapuiddb
drwx------ 2 vmail vmail 31870976 2014-02-25 10:32 cur
-rw-r----- 1 vmail vmail     2393 2014-02-25 10:38 maildirsize
drwx------ 2 vmail vmail  1482752 2014-02-25 10:38 new
drwx------ 2 vmail vmail     4096 2014-02-25 10:38 tmp
Jon
  • 161
  • 2
  • 3
  • 11

1 Answers1

2

You can move the emails around, just make sure that the email and the new directories you create are owned vmail:vmail, and remember that it will take a good long time to rebuild the indexes when you finally get things sorted out.

P.S. I'd also take the opportunity to delete some of the older stuff.

NickW
  • 10,183
  • 1
  • 18
  • 26
  • When are the indexes rebuilt? Do I need to restart courier-imap, or just access the mailbox again? – Jon Feb 25 '14 at 11:10
  • 1
    Usually the indexes are updated when your LDA delivers mail to the inbox, but since you'll be moving the mail around by hand, it will rebuild the index when it accesses the directory and sees that the indexes no longer match the contents. – NickW Feb 25 '14 at 11:15