Topic: Adjusting mail_location
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.2
- Deployed with iRedMail Easy or the downloadable installer? installer
- Linux/BSD distribution name and version: Ubuntu 22.04
- 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.
====
Hi everybody!
My mail_location is on NFS share, so I following dovecot NFS optimizations.
I'd like to add this to mail_location:
VOLATILEDIR=/dev/shm/dovecot/%2.256Nu/%u:LISTINDEX=/dev/shm/dovecot/%2.256Nu/%u/dovecot.list.index
I tried to do it through new conf file located at /etc/dovecot/iredmail/custom.conf
and after that 'doveconf mail_location' actually shows the correct value, but mail_location are fetched on userdb basis and are therefore overridden by user_query at /etc/dovecot/dovecot-mysql.conf.
When I change this statement:
CONCAT(mailbox.mailboxformat, ':~/', mailbox.mailboxfolder, ':VOLATILEDIR=/dev/shm/dovecot/%2.256Nu/%u:LISTINDEX=/dev/shm/dovecot/%2.256Nu/%u/dovecot.list.index') AS mail
I finally get the desired result, but I am not aware of consequences of such decision - will it be overwritten by upgrade or have a side effect somewhere....
So please advise what is the best way to change mail_location for my case. Globally or per user basis.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.