2010/10/18 Timo Sirainen tss@iki.fi:
On Mon, 2010-10-18 at 16:18 +0200, Johan Hendriks wrote:
location = maildir:/usr/local/virtual/%%d/%%n:INDEX=/shared/%%n
I knew i missed something, and i tried a lot of options, but always leave that shared behind %%n the INDEX=/shared/%%n where does this point to?
To /shared/user
Must i use INDEX=/shared/%%d/%%u
That's /shared/domain.com/user@domain.com/
or INDEX=/shared/%%u/%%n
That's /shared/user@domain.com/user/
What is a better value.
%%d/%%n would more sense than either of those, but since these are indexes only for users who have shared mailboxes to you, %%u alone would work fine.
Also my guess is that you don't really want /shared, but INDEX=/usr/local/virtual/%u/%n/shared/%%u
(or really, you should be using home directories to avoid that whole /usr/local/virtual/%u/%n everywhere)
It works with the following settings.
mail_location = maildir:/usr/local/virtual/%d/%n/
namespace { hidden = no inbox = yes list = yes location = prefix = separator = / subscriptions = yes type = private }
namespace { inbox = no list = children location = maildir:/usr/local/virtual/%%d/%%n:INDEX=/usr/local/virtual/%d/%n/shared/%%u prefix = shared/%%d/%%n/ separator = / subscriptions = no type = shared }
I have read the the wiki and tried to use the home folder. I created a dir /usr/home/virtual/ gave it the right permissions.
But the wiki is not very clear (for me ) where i must alter my config to use the home dir. In my understanding , i must set the home dir by doing the following. mail_location = maildir: home=/usr/home/virtual/%d/%n/ mail=/usr/local/virtual/%d/%n
But the i get a few errors
Oct 20 09:02:31 beasty dovecot: imap-login: Login: user=hans@domain.com, method=PLAIN, rip=192.168.50.200, lip=192.168.50.200, mpid=11285, secured Oct 20 09:02:31 beasty dovecot: imap(hans@domain.com): Error: user hans@domain.com: Initialization failed: Namespace '': mkdir( home=/usr/home/virtual/domain.com/hans/ mail=/usr/local/virtual/domain.com/hans) in directory /var/run/dovecot failed: Permission denied (euid=1004(vmail) egid=1004(vmail), euid is not dir owner) Oct 20 09:02:31 beasty dovecot: imap(hans@domain.com): Error: Invalid user settings. Refer to server log for more information.
also when sending mail, i get the following error
Oct 20 09:03:40 beasty postfix/qmgr[1775]: 4F6403F461: from=root@localdomain.com, size=325, nrcpt=1 (queue active) Oct 20 09:03:40 beasty dovecot: lda(johan@domain.com): Error: user johan@domain.com: Initialization failed: Namespace '': mkdir( home=/usr/home/virtual/domain.com/johan/ mail=/usr/local/virtual/domain.com/johan) in directory /var/spool/postfix failed: Permission denied (euid=1004(vmail) egid=1004(vmail), euid is not dir owner) Oct 20 09:03:40 beasty dovecot: lda(johan@domain.com): Fatal: Invalid user settings. Refer to server log for more information. Oct 20 09:03:40 beasty postfix/pipe[11842]: 4F6403F461: to=johan@domain.com, relay=dovecot, delay=0.08, delays=0.02/0.01/0/0.06, dsn=4.3.0, status=deferred (temporary failure)
Sorry for being a novice on this.... :D
regards, Johan Hendriks