1

Topic: Changing Mail default directory in iredMail

==== Required information ====
- iRedMail version: iRedMail-0.8.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: CentOS release 6.3 (Final)
- Related log if you're reporting an issue: None
====

I have a problem of space in my email server and I want to change the default mail location (/mail) to another location in another hard drive.

What are the procedures to change the default email location (/mail) to another location (/opt2/mail) without failing the mailing process?

Regards.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Changing Mail default directory in iredMail

1) A quick solution, create /opt2/mail, then move all files under /mail/ to /opt2/mail, remove empty directory /mail, create symbol link /mail which linked to /opt2/mail.

2) A hard solution: create /opt2/mail, move all files under /mail/ to /opt2/mail, update LDAP attribute 'homeDirectory' and 'storageBaseDirectory' to replace /mail/ by /opt2/mail/.

IMPORTANT NOTE: Directory used to store mailboxes must be owned by vmail/vmail with file permission 0700.

3

Re: Changing Mail default directory in iredMail

Hi ZhangHuangbin,

I did as you explained on the post for quick solution of just moving the files and then creating a symbolic link but now I have created problems:
1) I can login to my account but the inbox is empty while the quota is showing that I have used more than 50% of the allocated quota.
2) On the moved folder iredmail keeps on creating new folders vmail1~ and vmail1, and the same behaviour keeps on appearing when logging in.

What should I do now in order to sort the issue mentioned?

Regards.

4

Re: Changing Mail default directory in iredMail

Please turn on debug mode in Dovecot and try again, paste debug log in Dovecot log file (/var/log/dovecot.log) here so that others can help troubleshoot.

Reference: How to turn on debug mode in Dovecot:
http://www.iredmail.org/wiki/index.php? … ail.Server