1 (edited by zavr 2023-04-28 13:09:01)

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.

2

Re: Adjusting mail_location

why don't you just mount /var/vmail to the NFS share? then you don't need to change anything at all

3

Re: Adjusting mail_location

Initial setup was done with /mnt/mx NFS mount point and as far as I can see it's not a 5 min deal to change it everywhere.

4

Re: Adjusting mail_location

No reasonable opinion, right men?
Is it safe enough to modify /etc/dovecot/dovecot-mysql.conf ?
Will this file be overwritten during update?

5

Re: Adjusting mail_location

like i said:

just mount /var/vmail to the NFS share, thats all it needs

6

Re: Adjusting mail_location

Cthulhu, I replied to that suggestion, that the path /mnt/mx is pre-written by install script in many many places and I don't consider this approach as appropriate in my case.

7

Re: Adjusting mail_location

Then make /var/vmail a softlink to /mnt/mx

8

Re: Adjusting mail_location

OK. Thanks.

Does anybody know whether will /etc/dovecot/dovecot-mysql.conf be overwritten during update?

9 (edited by Cthulhu 2023-05-16 04:23:34)

Re: Adjusting mail_location

unlikely, only if mandatory changes are made to the database structure (which would also affect the storage endpoints), but you can always set immutable bit to config files you don't want to be changed at all costs:

chattr +i /path/to/filename

This can ONLY be done by root