[Dovecot] specifying home/sieve/sieve_dir relative to mail_location
With 1.2, is it possible to specify home, sieve and sieve_dir relative to mail_location?
I have mail_location = maildir:/import/mail/%n/:INDEX=/var/db/dovecot/indexes/%n and, in the plugin section, home = /import/mail/%n/home sieve = /import/mail/%n/dovecot.sieve sieve_dir = /import/mail/%n/sieve I would like to partially move users to another location (different file server) by using an LDAP entry. I know it's possible to specify everything relative to home, so I could probably use relative ~/../-type paths for mail_locatin etc., but that looks a bit awkward.
The VirtualUsers/Home Wiki enty contains an example for relative paths user_attrs = .., mailDirectory=home=/var/vmail/%$ which I do not understand.
On 25.6.2012, at 12.54, Edgar Fuß wrote:
With 1.2, is it possible to specify home, sieve and sieve_dir relative to mail_location? No-one, this one?
Too simple? Too stupid? Too obvious? Not possible?
Mail/Sieve dirs can be relative to home dir, not vice versa..
I know it's possible to specify everything relative to home, so I could probably use relative ~/../-type paths for mail_locatin etc., but that looks a bit awkward.
Yeah, that would probably work.
Maybe look into changing your directory hierarchy so mails are under home.
Mail/Sieve dirs can be relative to home dir, not vice versa. OK, thanks.
Yeah, that would probably work. I'll try that.
Maybe look into changing your directory hierarchy so mails are under home. Too late. Also, as directories corresponding to IMAP folders always start with a dot, it appeared quite natural to me to have
home'' and
sieve'' at the same level as.dovecot'' (and
cur'', for that matter).
Ah, and what about the WIKI ``user_attrs = .., mailDirectory=home=/var/vmail/%$'' example that I don't understand?
On 25.6.2012, at 17.42, Edgar Fuß wrote:
Ah, and what about the WIKI ``user_attrs = .., mailDirectory=home=/var/vmail/%$'' example that I don't understand?
Well, you could use a single mailDirectory LDAP attribute that expands to your mail directory to provide for all of the other home/sieve fields as well. But that requires Dovecot v2.1.
But that requires Dovecot v2.1. I was refering to http://wiki1.dovecot.org/VirtualUsers/Home which, to my understanding, should apply to 1.2. I don't understand the Example at the bottom:
LDAP with relative directory paths
If your LDAP database uses e.g. mailDirectory = domain/user/, you can use it as a base for home directory:
user_attrs = .., mailDirectory=home=/var/vmail/%$ Then just use mail_location = maildir:~/Maildir.
That example means that if you have in LDAP "mailDirectory=domain.com/username" field, and you want user's home to be /var/vmail/domain.com/username, then you can set mailDirectory=home=/var/vmail/%$ where %$ gets expanded to domain.com/username.
I don't think it's relevant to what you want.
On 25.6.2012, at 21.08, Edgar Fuß wrote:
But that requires Dovecot v2.1. I was refering to http://wiki1.dovecot.org/VirtualUsers/Home which, to my understanding, should apply to 1.2. I don't understand the Example at the bottom:
LDAP with relative directory paths
If your LDAP database uses e.g. mailDirectory = domain/user/, you can use it as a base for home directory:
user_attrs = .., mailDirectory=home=/var/vmail/%$ Then just use mail_location = maildir:~/Maildir.
participants (2)
-
Edgar Fuß
-
Timo Sirainen