[Dovecot] possible: two private namespaces with different quota?

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Thu Jan 17 16:29:12 EET 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

in thread "how to setup different quota for multiple namespaces" I tried 
to get an additional, private namespace "archive" with yet another quota.

Every message, regardless if delivered to INBOX or archive, counts for 
both namespaces, the default one and the archive one. Furthermore the dict 
records the quota of the archive namespace as user "ns=archive". Because 
the quota_rules does not accept "*", I see no way to have two or more 
private quota roots.

Could one improve

quota_root_rule_find(struct quota_root_settings *root_set, const char *name)
{
 	struct quota_rule *rule;

 	array_foreach_modifiable(&root_set->rules, rule) {
 		char *p = strchr(rule->mailbox_name, '\0');
 		if(p && p > rule->mailbox_name + 1 && p[-1] == '*' ) {
 			/* compare box* */
 			if(memcmp(rule->mailbox_name, name, p - rule->mailbox_name - 2) == 0)
 				return rule;
 		} else
 		if (strcmp(rule->mailbox_name, name) == 0)
 			return rule;
 	}
 	return NULL;
}

So one could add a relative rule for the default private namespace.

Kind regards,

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUPgKuF3r2wJMiz2NAQJRbAf/Rb993MR/j6NeLqxqqaqkry6BU2Kw2Sti
xVwU9P6hAK/tb4o647PO1015Pd5XbbUpY0itqNzHguqof8+PuT4bGeECT33Y9mKA
l0+Soq0Pi9war+ZHKYoQZizNDSb+fQkyGPSi3AsuHDapSpxwc6zj9v/HjxpHkr7+
l1ln8NcFG9gKZ/dB+eIM14GNHOsVKVI/lKfR4b50CFabIX871KIyXP8GEGyl9mUC
te6ROCzcNTbRpyksQEjCh/UQ8PVWz8GNKAzreLMqGfdxp9SRkhSKiJYSGL9i8Rn6
CTKBmLy0Gq5MoF+7roAMBLzJe1TC0mxCkeT6s0G/iJB5vCVnYyo9BQ==
=K3ko
-----END PGP SIGNATURE-----


More information about the dovecot mailing list