1

Topic: Questions about mailbox path

==== Required information ====
- iRedMail version: 0.8.7
- iRedAdmin-Pro-LDAP version 2.1.2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: CentOS 6.5
- Related log if you're reporting an issue:
====

Dear iRedAdmin-Pro Support,

I have some of questions about mailbox path. We have a userbase where each user has it's mailbox path defined like this:

User is andrea.carpani@dnshosting.it

storageBaseDirectory: /var/vmail/
mailMessageStore: vmail1/d/n/dnshosting.it/a/n/d/andrea.carpani-2014.03.31.09.34.25/
homeDirectory: /var/vmail/vmail1/d/n/dnshosting.it/a/n/d/andrea.carpani-2014.03.31.09.34.25/

As you can see we added a small patch to iRedAdmin code because we needed some hashing at domain level (we have many small domains with few users each).

1. We would like to remove the timestamp at the end of the mailpath. Is there any available tool you're aware of we could use to move mailbox path directories without hurting the system. Ideally we would need to:
- set some sort of "queue only mode" for the account so that incoming mail is on hold on the postfix frontend
- kill current pop/imap connections and disable pop/imap login
- mv $oldpath $newpath
- change LDAP entry for mailMessageStore and homeDirectory
- re-enable the user

2. Dovecot wiki (http://wiki2.dovecot.org/MailLocation) states that

There are three different places where the mail location is looked up from:

1. mail_location setting in dovecot.conf is used if nothing else overrides it.
2. mail userdb field overrides mail_location setting.
3. location setting inside namespaces overrides everything. Usually this should be used only for public and shared namespaces.

so I guess in iRedMail the mailbox location comes from userdb where we have two attributes homeDirectory=home and =mail=maildir:~/Maildir/  ( ~ is expanded to home aka %h).

As you can see our LDAP entry has storageBaseDirectory, mailMessageStore and homeDirectory.

If I understand correctly from http://www.iredmail.org/forum/post19734.html and by looking at the above mentioned dovecot configuration, the only used attribute is homeDirectory. Would it be safe (given the recent versions of iRedMail we're using) to remove the LDAP attributes storageBaseDirectory and mailMessageStore or there are other tools in iRedMail suite that use them?


Regards,

Andrea

----

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

2

Re: Questions about mailbox path

AndreaC wrote:

1. We would like to remove the timestamp at the end of the mailpath.

Set 'MAILDIR_APPEND_TIMESTAMP = False' in iRedAdmin-Pro config file 'settings.py', then restart Apache service. Newly created mail user won't have timestamp in maildir path.

AndreaC wrote:

If I understand correctly from http://www.iredmail.org/forum/post19734.html and by looking at the above mentioned dovecot configuration, the only used attribute is homeDirectory. Would it be safe (given the recent versions of iRedMail we're using) to remove the LDAP attributes storageBaseDirectory and mailMessageStore or there are other tools in iRedMail suite that use them?

You're right, the only used attribute is homeDirectory in the latest iRedMail. storageBaseDirectory and mailMessageStore were used in old iRedMail releases. We set all 3 to make it work with both old and the latest iRedMail. But if you're running the latest iRedMail, it's ok to remove storageBaseDireectory and mailMessageStore.