1

Topic: Problem with huge e-mal account

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):   iRedMail     v1.2  iRedAdmin     v1.0 (MySQL)
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version:  Debian10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.

CPU: 4cores, 4GB RAM, 8GB SWAP
====

I have a problem with 1 e-mail account.
On this account are saved about 170k received messages.
Recently I deleted about 100k emails from the trash using CLI.

doveadm expunge -u user@domain.com mailbox Trash savedbefore 30d

Mail clients like thunderbird, outlook, android clients or macOs clients has a trouble with indexing deleted mail.
I have another problem when I try to read emails from the website ( webmin ).
When I try to open received emails after 20-30 seconds  I have error "Gateway time-out". If I try open another directory with fewer emails, it doesn't have this problem and I can read the emails.

This is log from ngingx
2020/08/12 10:24:23 [error] 25815#25815: *1054673 upstream timed out (110: Connection timed out) while reading response header from upstream, client: x.x.x.x, server: _, request: "GET /mail/?_task=mail&_action=list&_refresh=1&_layout=widescreen&_mbox=INBOX&_remote=1&_unlock=loading1597220603638&_=1597219393042 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.socket", host: "xxx", referrer: "https://xxx/mail/?_task=mail&_mbox=INBOX" 

Where can I look for a solution to my problem?

2

Re: Problem with huge e-mal account

I would first start by deleting the dovecot.index* files and WAIT and let the system regenerate these files.
I also (at some point with a pre-1.3.1 version) increased vsz_limit above the default.

Good luck.

Andrew

3

Re: Problem with huge e-mal account

I have a vsz_limit set to 512M.
Should I delete all these files?

dovecot.index
dovecot.index.cache
dovecot.index.log
dovecot.index.log.2
dovecot.index.thread
dovecot.list.index
dovecot.list.index.log

is it a safe ?

4

Re: Problem with huge e-mal account

yes, it is safe - they *sometimes* get corrupted or, when you are have lots and lots of emails those files sometimes seem out of date or *something*.

They exist in each Maildir and subdirectory for each user.

Depending upon your machine's speed, rebuilding them may be slow.

Andrew