This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.
Differences between revisions 1 and 7 (spanning 6 versions)
Revision 1 as of 2015-05-13 09:33:36
Size: 1056
Editor: TimoSirainen
Comment:
Revision 7 as of 2019-01-23 09:57:35
Size: 1301
Editor: AkiTuomi
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Quota clone plugin is useful when you want to store everybody's current quota usage to a database, but you don't want to use the database as the authoritative quota database. For example you might want to access everybody's quota via Redis, but you don't store the Redis database permanently so it could become empty once in a while. In this case you can use e.g. dict-file as the authoritative quota database and make a copy of the quota usage to Redis. From Redis you could then once in a while gather everybody's current quota usage and send it to yet another place (e.g. for statistics handling). (Requires v2.2.17+)

Quota clone plugin is useful when you want to store everybody's current quota usage to a database, but you don't want to use the database as the authoritative quota database. For example you might want to access everybody's quota via Redis (or with SQL database, Redis is example here), but you don't store the Redis database permanently so it could become empty once in a while. In this case you can use e.g. [[Quota/Dict|dict-file]] or [[Quota/Count|count]] as the authoritative quota database and make a copy of the quota usage to Redis. From Redis you could then once in a while gather everybody's current quota usage and send it to yet another place (e.g. for statistics handling). 
Line 6: Line 8:

The keys that are written to:
 * priv/quota/storage - storage usage in bytes
 * priv/quota/messages - count of messages
Line 12: Line 18:
  quota_clone_dict = redis:127.0.0.1:6379   quota_clone_dict = redis:host=127.0.0.1:port=6379

Quota Clone Plugin

(Requires v2.2.17+)

Quota clone plugin is useful when you want to store everybody's current quota usage to a database, but you don't want to use the database as the authoritative quota database. For example you might want to access everybody's quota via Redis (or with SQL database, Redis is example here), but you don't store the Redis database permanently so it could become empty once in a while. In this case you can use e.g. dict-file or count as the authoritative quota database and make a copy of the quota usage to Redis. From Redis you could then once in a while gather everybody's current quota usage and send it to yet another place (e.g. for statistics handling).

Every time quota is updated, the value is updated to the cloned dict. There are race conditions with it so the quota may not always be 100% correct. The old value is always replaced with the new one though (not just incremented/decremented) so the cloned quota is never too much wrong.

The keys that are written to:

  • priv/quota/storage - storage usage in bytes
  • priv/quota/messages - count of messages

Configuration

mail_plugins = $mail_plugins quota quota_clone
plugin {
  quota_clone_dict = redis:host=127.0.0.1:port=6379
}

None: Plugins/QuotaClone (last edited 2019-12-12 11:32:53 by 82)