1

Topic: maildir depth/structure ...

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.4 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? Download
- Linux/BSD distribution name and version: Rocky 9.2
- 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.
====

I have some experience in mail server administration, but this is my first iRedMail installation.
Installation without problems; also SOGo seems to works as expected.
Very positive first impression ;-)
So, tried to look around to understand a little more of the system ....
I noticied mail folders are in /var/vmail/vmail1/iredmail.domain.tld/p/o/s/postmaster/Maildir/...
10 level folder.
I usually manage servers with few domains and few accounts, so my first idea is that this is a loss of efficiency in my standard configurations.
Am I wrong?
Is there possible to decrease the number (i.e. removing the 3 levels inside a domain (p/o/s in the example)?

I have created a couple of additional domains and done some tests.
Adding new users I have their folder is something like:
/var/vmail/vmail1/iredmail.domain.tld/p/a/o/paolo-2023.09.08.19.16.44/Maildir
/var/vmail/vmail1/iredmail.domain.tld//a/n/t/antonio-2023.09.08.19.08.57/Maildir
Is there a reason to insert creation date in the name of the account?
Can be avoided?

Thanks, Paolo

----

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

2

Re: maildir depth/structure ...

yes, if you remove a user and recreate it, it will create a new folder and not use the old one, but this behavior can be changed in the iredadmin config file

https://docs.iredmail.org/why.append.ti … .path.html

https://docs.iredmail.org/iredadmin-pro … .path.html

3

Re: maildir depth/structure ...

This one works in iRedAdmin open source edition too. smile

4

Re: maildir depth/structure ...

Pratically a FAQ ;-)
Thanks for patience and fast replay.
I try another couple of newbies questions:
1. If I change the settings, olds (already created), accounts have problems?
2. If I change the storage_base_directory = '/var/vmail/vmail1' in  /var/vmail',  can I simply move the already existing accounts in the upper lever dir or are needed other actions?

extra: is there a search functionallity in this forum (I don't want to annoy people with trivial questions like those that probably are already been replaied many times)?

Thanks, P.

5 (edited by Cthulhu 2023-09-09 19:54:21)

Re: maildir depth/structure ...

2. (because it is way faster to answer) On there very top there is a link called "Search"

1. no, old accounts don't have problems, the storage path is stored in a sql database and can be changed anytime, but if you change folder structure, existing entries need to be modified in the database

but i see no reason to change to /var/vmail, since there are other folders there which are not related to mailboxes and should not be mixed up with mailbox folders, and changeing too much custom stuff makes it hard to maintain and get support


PS: /var/vmail/vmail1 could possibly be softlink to a whole other directory, even a network storage without any problems, since postfix/dovecot (maildrop) respects symlinks

6

Re: maildir depth/structure ...

you might face some issues if you change dir, cause there might be different scripts that are already pointed to that directory.
and i don't see any problems that mail has that much depth, there is no inefficiency so i don't understand the need of changing anything on a working mail server

7

Re: maildir depth/structure ...

Ok. Set to False  MAILDIR_HASHED and MAILDIR_APPEND_TIMESTAMP  that I consider not useful for my config.
As highlighted by Cthulhu, no reason to  change to /var/vmail, since there are other folders.
I am implementing a simple VM and want to store data in a separated storage, so I am going to link /var/vmail/vmail1 outside the VM.
Are there other folders that are supposed to grow considerably adding users and mails?
I suppose /var/vmail/backup only store mysql DBs and SOGo calendars so I don't think it will grows so much. Correct me if real experiences are different. ;-)

Thanks, P.
P.S.: My obsession with folders depth derived from real poor performance in rsync backups and similar situation in some caching system in CMS like Drupal that with 10+ level of depth give worse results than with no cache at all

8

Re: maildir depth/structure ...

For mails, you should better imapsync instead of rsync, which causes way less issues

9

Re: maildir depth/structure ...

I know, but imapsync doesn't backup all info and require another IMAP server ...
Good for a business critical mail service that require a failover solution, but not for a small server with 2-4 domains and few dozens of accounts ;-)