1

Topic: simpler maildir folder

instead of having mailbox /var/vmail/vmail1/mydomain.com.my/f/fi/fit/fitri for user fitri@mydomain.com.my, how can i set it to only /var/vmail/fitri ?

----

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

2

Re: simpler maildir folder

In iRedAdmin-Pro setting file: settings.ini:

# Hashed maildir: True, False.
# Example:
#   - hashed: domain.ltd/u/us/use/username-2009.09.04.12.05.33/
#   - non-hashed: domain.ltd/username-2009.09.04.12.05.33/
# hashed maildir is RECOMMEND for better performance.
hashed_maildir = True

Set it to False, and you will get maildir like this:

/var/vmail/vmail1/mydomain.com/fitri/

3 (edited by grepmaster 2010-12-09 10:57:19)

Re: simpler maildir folder

Set it to False, and you will get maildir like this:

/var/vmail/vmail1/mydomain.com/fitri/

how do i achive the maildir without the date & time?

instead of this:
/var/vmail/mydomain.com.my/fitri-2010.12.09.18.51.47/Maildir

i want it to be like this:
/var/vmail/mydomain.com.my/fitri/Maildir

4

Re: simpler maildir folder

Open file "libs/iredutils.py", make it don't append DATE in function: setMailMessageStore().

5

Re: simpler maildir folder

ZhangHuangbin wrote:

Open file "libs/iredutils.py", make it don't append DATE in function: setMailMessageStore().

thanks

by commenting in this line

#DATE = time.strftime('%Y.%m.%d.%H.%M.%S')

and changing this line

mailMessageStore = "%s/%s-%s/" % (domain, username, DATE)

to this

mailMessageStore = "%s/%s/" % (domain, username)

i am able to chieve what i had intended

6 (edited by bob savage 2011-03-16 07:42:22)

Re: simpler maildir folder

ZhangHuangbin wrote:

In iRedAdmin-Pro setting file: settings.ini:

# Hashed maildir: True, False.
# Example:
#   - hashed: domain.ltd/u/us/use/username-2009.09.04.12.05.33/
#   - non-hashed: domain.ltd/username-2009.09.04.12.05.33/
# hashed maildir is RECOMMEND for better performance.
hashed_maildir = True

Set it to False, and you will get maildir like this:

/var/vmail/vmail1/mydomain.com/fitri/

Please note that this answer doesn't apply for the LDAP version of the iRedAdmin-Pro. The LDAP-version totally ignores hashed_maildir parameter from settings.ini. In fact the parameter is completely missing.

Instead you could manually modify the libs/iredutils.py script.

##############################################
############## ADDITION SETTINGS #############
##############################################

#############
# Maildir related.
#
#It's RECOMMEND for better performance. Samples:
# - hashed: domain.ltd/u/s/e/username-2009.09.04.12.05.33/
# - non-hashed: domain.ltd/username-2009.09.04.12.05.33/
# MAILDIR_HASHED = True
MAILDIR_HASHED = False

# Prepend domain name in path. Samples:
# - with domain name: domain.ltd/username/
# - without: username/
MAILDIR_PREPEND_DOMAIN = True

# Append timestamp in path. Samples:
# - with timestamp: domain.ltd/username-2010.12.20.13.13.33/
# - without timestamp: domain.ltd/username/
# MAILDIR_APPEND_TIMESTAMP = True
MAILDIR_APPEND_TIMESTAMP = False

This will give you the maildir like this:

/var/vmail/vmail1/mydomain.com/fitri

7

Re: simpler maildir folder

Hi, bob.

We moved some settings from settings.ini to libs/iredutils in v1.4.x (mentioned in iRedAdmin-Pro upgrade tutorial), and they will be stored in libs/settings.py in v1.5.0.

libs/settings.py contains some advanced/additions settings.

8

Re: simpler maildir folder

Hi Zhang,

Can you confirm if MAILDIR_HASHED & MAILDIR_APPEND_TIMESTAMP can be set to FALSE if we are using the LDAP import / mass email creation?

I tried setting the settings in iredadmin settings.py file to below then imorting new users via ldapadmin.
MAILDIR_HASHED = False
MAILDIR_APPEND_TIMESTAMP = False

I sent the new accounts an email to trigger the Maildir folder creation. But it still create the hashed folder format.

Do I have to change the setting somewhere else?

9

Re: simpler maildir folder

I think I worked out. You need to change the LDAP import script create_mail_user_OpenLDAP.py settings to below

MAILDIR_HASHED = False
MAILDIR_APPEND_TIMESTAMP = False