1

Topic: multi-mail location

Hi,

Were evaluating the iremail-0.4.0. fyi.

Question:

What if  I want to have different home directory or mail location. What should be some changes in mailbox table and /etc/dovecot-mysql.conf? Please help.

Sample representation:

/var/vmail0/example0.com --> /dev/sda10 filesystem ( 100GB )
/var/vmail1/example1.com --> /dev/sda11 filesystem ( 100GB )
/var/vmail2/example2.com --> /dev/sda12 filesystem ( 100GB )

These strategy will be advantageous if the other filesystem has been damage but the other will not.

2

Re: multi-mail location

several steps:

* Change 'mail_location' setting in /etc/dovecot.conf. like this:

mail_location = maildir:/%Lh/:INDEX=/%Lh/

* add one more column in vmail.mailbox table, e.g. storage_base_dir, default value is '/home/vmail0/' or whatever you want.

* change /etc/dovecot-mysql.conf, make it contat 'storage_base_dir' and 'maildir' as home.

# Old.
user_query = SELECT CONCAT("/home/vmail/", maildir) AS home, \

# New.
user_query = SELECT CONCAT(storage_base_dir, maildir) AS home, \

3

Re: multi-mail location

Here's the default /etc/dovecot-mysql.conf: fyi.

driver = mysql
default_pass_scheme = CRYPT
connect = host=localhost dbname=vmail user=vmail password=2FrtEyPhaJz7UeuxRHKo8mgHnaoUp0
password_query = SELECT password FROM mailbox WHERE username='%u' AND active='1' AND expired >= NOW()
user_query = SELECT "/mailbox" AS home,     "/mailbox/sieve/%Ld/%Ln/" AS sieve_dir,     CONCAT('*:bytes=', quota*1048576) AS quota_rule,     maildir FROM mailbox     WHERE username='%u'     AND active='1'     AND enable%Ls='1'     AND expired >= NOW()