Topic: Customize maildir path with domain
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.8
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: AlmaLinux 9
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I really appreciate the hashed style that iRedMail creates the maildir of email accounts, this makes it much easier to find the maildir, but in our scenario we have thousands of domains (around 5,000) so having all these folders inside /var /vmail/vmail1 would end up causing the problem of slowness in listing everyone. To get around this, I customized the create_mail_user_SQL.sh script within /tools and made the domain creation in Hashed style, for example:
domain: domain.tld
user: test@domain.tld
maildir path:
/var/vmail/vmail1/d/o/domain.tld/t/e/test-2024.02.16.14.50.34
I also adjusted the script so that it only used the first 2 characters instead of 3. This was very good for the migration I carried out. However, when creating an account through the iRedAdmin panel, it does not use the domain hashed style and ends up creating the folder in /var/vmail/vmail1
Does iRedMail allow me to choose to use hashed style for the domain as well? and choose how many characters to use?
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.