1

Topic: Can't create mailbox root dir /data/vmail1/...

==== Required information ====
- iRedMail version: 0.9.7
- Linux distri: Debian 8
- Storage backend: MariaDB
- Web server: Apache
- iRedAdmin (basic) to manage account
- Related original log or error message is required if you're experiencing an issue:
Nov  9 21:40:19 box dovecot: imap(julian@domain.tld): Error: user julian@domain.tld: Initialization failed: Namespace '': Can't create mailbox root dir /data/vmail1/domain.tld/j/u/l/julian-2017.11.09.18.22.48//Maildir: Mountpoint /data isn't mounted. Mount it or remove it with doveadm mount remove
Nov  9 21:40:19 box dovecot: imap(julian@domain.tld): Error: Invalid user settings. Refer to server log for more information.

I have set the permissions accordingly (owned by vmail) but there seems to be an underlying problem with that /data folder since I can not sudo ls the directory with vmail even with permissions set.

Where can I change the directory to be used for the vmail storage? The one I set during install seems to be not functional anymore.

Thanks

----

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

2

Re: Can't create mailbox root dir /data/vmail1/...

Is /data mounted? Updating storage location requires a lot of work. (Updating mysql mailboxes and dovecot config at least)

3

Re: Can't create mailbox root dir /data/vmail1/...

Wraptor wrote:

Is /data mounted? Updating storage location requires a lot of work. (Updating mysql mailboxes and dovecot config at least)

/data does not have a specific partition mounted to it.
It used to but that was re-allocated.
The data was copied over to restore.
This is likely the cause of the issue but I am sure generic Linux advice is out of the scope of this forum.
There would not be all too many accounts to migrate right now so maybe moving it to a functional storage location is still the correct/best thing to do?

4

Re: Can't create mailbox root dir /data/vmail1/...

mti_ wrote:
Wraptor wrote:

Is /data mounted? Updating storage location requires a lot of work. (Updating mysql mailboxes and dovecot config at least)

/data does not have a specific partition mounted to it.
It used to but that was re-allocated.
The data was copied over to restore.
This is likely the cause of the issue but I am sure generic Linux advice is out of the scope of this forum.
There would not be all too many accounts to migrate right now so maybe moving it to a functional storage location is still the correct/best thing to do?



I do feel like just remounting the relocated storage to /data would be the best solution in terms of downtime.

5

Re: Can't create mailbox root dir /data/vmail1/...

*) Do you have a line in /etc/fstab for "/data"?
*) For directory "/data/vmail1/domain.tld/j/u/l/julian-2017.11.09.18.22.48/", please make sure all parent directories are accessible by user/group "vmail:vmail", directory "/data/vmail1" must be owned by "vmail:vmail" with permission 0700.

6 (edited by mti_ 2017-11-11 00:34:23)

Re: Can't create mailbox root dir /data/vmail1/...

There are only 2 lines in /etc/fstab.
One for / and one at an entirely unrelated location.

Permissions are set for user vmail at /data/vmail1 and further down.
I can in fact run "sudo -u vmail ls -la /data/vmail1/" without receiving permission errors but the problem still persists.

I am wondering if I have even found the underlying issue as of now, or if I am even looking in the correct place.
The log line I posted is from /var/log/dovecot/imap.log and so far I have not been able to locate any other indications that are not generic.

E: This is taken from the dovecot log with dovecot in debug:
https://pastebin.com/JHLyu4c6

E2: What would a healthy folder structure look like? I notice that there are other folders owned by user "vmail" in the folder /data itself rather than /data/vmail1. Is this intended?

7

Re: Can't create mailbox root dir /data/vmail1/...

mti_ wrote:

E: This is taken from the dovecot log with dovecot in debug:
https://pastebin.com/JHLyu4c6

No error here.

mti_ wrote:

E2: What would a healthy folder structure look like? I notice that there are other folders owned by user "vmail" in the folder /data itself rather than /data/vmail1. Is this intended?

Yes it's required.

8

Re: Can't create mailbox root dir /data/vmail1/...

Leaving a comment here for anyone who potentially finds this in the future.
I will state that while /data itself seemed to be functional I could not make dovecot work on it.
I ended up mounting a (different) partition (in this case actually a logical volume) to /data and copying over the "old" data,
It started working again immediately.
It seems that there is a quirk with dovecot that insists on having folders actually remain specificly mounted once they have been at some point.
Beats me and anyone who I had look at it.