0

I've a Postfix / Dovecot server. It's running without issues. However, one specific account is facing issues continuesly.

Summarize of issues: - Webmail hangs (simple PHP opensource webmail) - can't add my account to most mobile clients (Outlook app on iPhone, MyMail etc) - Server connection issues on Outlook for PC and alot of strange errors (can't move items, directories etc)

I think, the reason is the size (18GB) of the mailbox. However, the server CPU and RAM looks okay.

My question: Is a Maildir of 18GB too large for IMAP? Or can I solve this with more server specifications or another software / tricks?

Patrick
  • 71
  • 8
  • Can you try to setup that account with Thunderbird? I got the same simptomps with a client's very large mailbox and tried a lot of clients. Except for Thunderbird, none did the trick. – Alex Jan 09 '17 at 18:39

2 Answers2

1

I don't think it's a matter of size, but a matter of the number of files in the Maildir. The performance of some very common file systems degrades rapidly when the number of files gets 'large.' What is the size of those directories?

toppledwagon
  • 4,215
  • 24
  • 15
  • Thank you, the mailbox has 37970 files and 17636 directories. Can this give issues? What can be a solution, more server resources / another storage solution for mail? – Patrick Jan 09 '17 at 17:25
  • 1
    If doing an `ls` in the directory is noticeably slow, then it's likely caused by file system issues. If decreasing the number of files there isn't possible (or preferable) then using a different file system will be your best bet. See also http://serverfault.com/questions/43133/filesystem-large-number-of-files-in-a-single-directory – toppledwagon Jan 10 '17 at 03:24
0

Check the dovecot logs! Do the show any signs of problems? Any timeouts?

See: https://wiki2.dovecot.org/WhyDoesItNotWork

Dovecot usually indexes the mailbox (on access). This operation take a lot of time, especially with large mailboxes (like in your case); depending on the type of filesystem used, a stat() on the Maildir subdirectories cur/new/tmp can take a long time.

The time consuming indexing operation can be avoided by using dovecot's deliver instead of letting Postfix write the maildir directly. Thus, each delivery causes an instantaneous update of the index.

If you're using Dovecot's deliver you can choose mailbox types better suited for a large number of email, like mdbox - which even offers saving mail attachments to external files, which also allows single instance storage for them:

http://wiki2.dovecot.org/MailboxFormat/dbox

Ralf Hildebrandt
  • 489
  • 1
  • 3
  • 11