1 (edited by dlester 2018-08-12 06:54:02)

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:

>cd   /var
>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[614]: 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
dave

--> 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[27127]: ERROR: directory doesn't exist: /mnt/iredmail/vmail/mlmmj.

Here is a directory list of /mnt/iredmail

[root@my mlmmjadmin]# ls -lah /mnt/iredmail
total 48K
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

2

Re: Help need to move the /var/vmail directory

Show us command output please:

ls -dl /mnt
ls -dl /mnt/iredmail
ls -dl /mnt/iredmail/mlmmj
ls -dl /mnt/iredmail/mlmmj-archive

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: Help need to move the /var/vmail directory

Hi Zhang,

As always, I appreciate your prompt reply, but please don't wast any of your weekend time on this.  I don't have to roll mmlmj out to any clients until I can offload the directory.  They didn't have it before and won't have it until I tell them about it.   <g>

Anyway, here is what I think you're asking for:

[root@my /]# ls -dl /mnt
drwxr-xr-x. 3 root root 21 Apr 11 00:59 /mnt
drwx------ 10 vmail vmail 4096 Aug 11 18:36 /mnt/iredmail
drwxr-xr-x 4 vmail vmail 4096 Aug 10 19:51 /mnt/iredmail/vmail
drwx------ 3 mlmmj mlmmj 4096 Aug 11 09:57 /mnt/iredmail/vmail/mlmmj
drwx------ 2 mlmmj mlmmj 4096 Aug 10 19:51 /mnt/iredmail/vmail/mlmmj-archive

dave

4

Re: Help need to move the /var/vmail directory

dlester wrote:

drwx------ 10 vmail vmail 4096 Aug 11 18:36 /mnt/iredmail

This directory must be 0755.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

5

Re: Help need to move the /var/vmail directory

Zhang, once again you came through!

I can not believe that I didn't try that!  Hope you enjoy the latte!

My humble thanks,

dave