Topic: Help need to move the /var/vmail directory
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: CentOS Linux release 7.5.1804 (Core)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? YES - 2.9.0
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
I run the iRedMail user email store on a mounted volume /mnt/iredmail in directory vmail1. I installed it that way (a *long* time ago) because I'm running on a VPS with a pretty small sysres.
I upgraded to 0.9.8 and iRedAdmin-Pro 2.9.0. I followed the mlmmjadmin / SQL integration tutorial and installed mlmmj and mlmmj-archive into /var/vmail. It seems to work and iRedAdmin-Pro is able to create mailing lists just fine.
However, it looks like mlmmj is going to use up a bit of disk space and I need to move it to the /mnt/iredmail volume.
My "go to" way to move directories in situations like this is to use symbolic links. In this case as root:
>cp -ra vmail /mnt/iredmail/
>mv vmail xmail
>ln -s /mnt/iredmail/vmail
Seems to be a NOGO. When I restart mlmmjadmin it fails and this is in the systemctl status:
uwsgi: ERROR: directory doesn't exist: /var/vmail/mlmmj.
I've been vary careful with permissions. I'm guessing the python code is just choking on the symbolic link.
Any good way to get /var/vmail moved to /mnt/iredmail ?
tia for *any* help
--> EDITj <--
Might still be a permissions issue on the mounted volume, I guess. I updated /opt/mlmmjadmin/settings.py as follows:
# MLMMJ_SPOOL_DIR = '/var/vmail/mlmmj'
# MLMMJ_ARCHIVE_DIR = '/var/vmail/mlmmj-archive'
MLMMJ_SPOOL_DIR = '/mnt/iredmail/vmail/mlmmj'
MLMMJ_ARCHIVE_DIR = '/mnt/iredmail/vmail/mlmmj-archive'
and now I get:
uwsgi: ERROR: directory doesn't exist: /mnt/iredmail/vmail/mlmmj.
Here is a directory list of /mnt/iredmail
[root@my mlmmjadmin]# ls -lah /mnt/iredmail
drwx------ 10 vmail vmail 4.0K Aug 11 18:36 .
drwxr-xr-x. 3 root root 21 Apr 11 00:59 ..
drwxr-xr-x 3 root root 4.0K Aug 22 2017 backup
drwxr-xr-x 2 root root 4.0K Feb 11 15:25 httpd_rc
drwx------ 2 vmail vmail 16K May 10 2016 lost+found
drwxr-xr-x 7 root root 4.0K Sep 18 2017 migration-stuff
drwxr-xr-x 4 root root 4.0K Mar 17 22:38 root-work
drwx------ 3 vmail vmail 4.0K May 23 2017 sieve
drwxr-xr-x 4 vmail vmail 4.0K Aug 10 19:51 vmail
drwx------ 23 vmail vmail 4.0K Jul 26 17:14 vmail1