Shared folders - Namespace definition
Hello,
I'm trying to configure shared mailboxes with ACL. My problem is FS layout. Our maildirs is completely outside of home dirs (home dirs is on pure SSD zpool, maildirs on separate HDD zpool). We are using checkpassword auth, which sets mailbox_location for each user. Layout is following:
maildirs:
/dpool/mail/maldirs/user-uuid/
home is:
/dpool/mail/home/user-uuid/
index & control is under home:
/dpool/mail/home/user-uuid/[index|control]
the problem is how to specify path in NAMESPACE definition. I can use %% variables, but maildirs is not under home and also does not have "fixed" structure (so I can not use %%u for example).
Is it possible to for example set some special env variable from checkpassword and than use it in namespace definition like home variable? Or can someone help to find the code in dovecot, which evaluates namespace location patter so I can patch it?
thanks
Pete
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 21 Jan 2015, Peter Hodur wrote:
maildirs:
/dpool/mail/maldirs/user-uuid/
home is:
/dpool/mail/home/user-uuid/
index & control is under home:
/dpool/mail/home/user-uuid/[index|control]
the problem is how to specify path in NAMESPACE definition. I can use %% variables, but maildirs is not under home and also does not have "fixed" structure (so I can not use %%u for example).
If your home is always prefixed by the same lengthed string, cur the user-uuid: http://wiki2.dovecot.org/Variables "You can take a substring of the variable by giving optional offset followed by '.' and width after the '%' character. For example %2u gives first two characters of the username. %2.1u gives third character of the username. "
You could get somewhere, if you rewrite the login user by user-uuid, then %u is the user's uuid.
Is it possible to for example set some special env variable from checkpassword and than use it in namespace definition like home variable?
Is the checkpassword tool called for the users in a shared namespace??? This would cost lots of peformance, because you need to call that script for each user, the current user gets shares from.
But if so, return MAIL: http://wiki2.dovecot.org/AuthDatabase/CheckPassword "Dovecot Extensions
If you wish to return extra fields for Dovecot, set them in environment variables and then list them in EXTRA environment variable. The userdb extra fields can be returned by prefixing them with userdb_. For example: "
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBVL9NHHz1H7kL/d9rAQItfAgAn7LKz8PFdcgNKwcIpe6/ZW4cbY51IvZ7 Y0SL1tHWDfkyIk7ogqePo/JjbtnXGXgupWeHS05Gt2gz20sXcbqb+ethbpO2Ziwg lLNYdcxZByk7KWWdsj+X4P2pYLn4JroYp8G50AKUfvMC4iUKil8/sQ05wwuaw25h L4J6HM6v54cwPIxcpRmLBVHnxD0/8Bo78LRMcs5sPHtaMDPblbqy+ugtaZ9ZGSsu RqJpSf7HG483olm1chmozdkZH66lpkyMcgs5tDb0mz6KKIRnjSURLThc0B6I6pJL d6Ru5rDso4QR9CUvz+ZttFBBMwgzCMv+0AJCE4VNBZrqSHLvGXxS1g== =37S3 -----END PGP SIGNATURE-----
If your home is always prefixed by the same lengthed string, cur the user-uuid: http://wiki2.dovecot.org/Variables "You can take a substring of the variable by giving optional offset followed by '.' and width after the '%' character. For example %2u gives first two characters of the username. %2.1u gives third character of the username. "
great! this is exactly what will solve my issue.
You could get somewhere, if you rewrite the login user by user-uuid, then %u is the user's uuid.
Is it possible to for example set some special env variable from
checkpassword and than use it in namespace definition like home variable?
Is the checkpassword tool called for the users in a shared namespace??? This would cost lots of peformance, because you need to call that script for each user, the current user gets shares from.
What is "lot"? I hope, it will be evaluated one once, when user login and only once per each shared folder according to dictionary. So for example, if user have access to two other mailboxes, Dovecot will exec two times checkpassword as userdb lookup. Right?
But if so, return MAIL: http://wiki2.dovecot.org/AuthDatabase/CheckPassword "Dovecot Extensions
If you wish to return extra fields for Dovecot, set them in environment variables and then list them in EXTRA environment variable. The userdb extra fields can be returned by prefixing them with userdb_. For example: "
yes, i do it this way, for "sieve_default" for example. I set userdb_sieve_default env and add its name to userdb_extra. But how can I later access it on the right side for proper evalueating? When I use home dir, there is a "%" shortcut.
participants (2)
-
Peter Hodur
-
Steffen Kaiser