1

Topic: Mailboxes not deleteing

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

This appears to have started recently:

* <<< ABORT, CRITICAL >>> Trying to remove mailbox (/var/vmail/vmail1/example.net/c/h/r/chruser/) owned by user (chruser@example.net), but there is another mailbox (/var/vmail/vmail1/example.net/c/h/r/chruser/) stored under this directory. Aborted.

cron job: python /var/www/iredadmin/tools/delete_mailboxes.py --delete-without-timestamp

# ls -la /var/vmail/vmail1/example.net/c/h/r/chruser/
total 4
drwx------  4 vmail vmail   34 Jul 24 09:02 .
drwx------  3 vmail vmail   21 Oct  2  2018 ..
drwx------ 18 vmail vmail 4096 Aug 16 06:15 Maildir
drwx------  3 vmail vmail   17 Jul 24 09:02 sieve

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Mailboxes not deleteing

jstewart wrote:

* <<< ABORT, CRITICAL >>> Trying to remove mailbox (/var/vmail/vmail1/example.net/c/h/r/chruser/) owned by user (chruser@example.net), but there is another mailbox (/var/vmail/vmail1/example.net/c/h/r/chruser/) stored under this directory. Aborted.

Is this mailbox path still used by another user?

3 (edited by jstewart 2019-08-19 19:27:35)

Re: Mailboxes not deleteing

How would that even be possible? It is now happening for all mailboxes that are set for deletion, not just the one example, which was altered for privacy anyway.

Run from CL, I see this:

Removing: /var/vmail/vmail1/example.net/c/h/r/chruser/
- startswith: False
- equal: False
- startswith: False
- equal: False
- startswith: False
- equal: False
- startswith: False
- equal: False
- startswith: False
- equal: False
- startswith: False
repeats multiple time, then:
* <<< ABORT, CRITICAL >>> Trying to remove mailbox (/var/vmail/vmail1/example.net/c/h/r/chruser/) owned by user (chruser@example.net), but there is another mailbox (/var/vmail/vmail1/example.net/c/h/r/chruser/) stored under this directory. Aborted.

4

Re: Mailboxes not deleteing

Could you please try to query SQL database as root user with SQL commands below?

USE vmail;
SELECT LOWER(CONCAT(storagebasedirectory, '/', storagenode, '/', maildir, '/')) AS maildir FROM mailbox;

Then check whether the output contains "/var/vmail/vmail1/example.net/c/h/r/chruser".

5

Re: Mailboxes not deleteing

ZhangHuangbin wrote:

Could you please try to query SQL database as root user with SQL commands below?

USE vmail;
SELECT LOWER(CONCAT(storagebasedirectory, '/', storagenode, '/', maildir, '/')) AS maildir FROM mailbox;

Then check whether the output contains "/var/vmail/vmail1/example.net/c/h/r/chruser".

I checked the LDAP database for that user and I was surprised to see it there. It turns out the user was deleted accidentally, which put the entry in the deleted_mailboxes table in database iredadmin. Later that day, the user was re-added, but of course the entry was still in the deleted_mailbox table. I was not aware the delete and re-add had happened, all I had seen was the request to delete.

So it did exactly what it should have, preventing that mailbox from being deleted. If I see that error again, I'll check that.

Thank you!

6

Re: Mailboxes not deleteing

Glad to hear that.
It feels like i just saved data which costs millions or billions ... haha