[Dovecot] disable zlib via config to allow per mailbox compression level
Hello
Dovecot v2.0.5
zlib_save_level = 6 # 1..9 zlib_save = gz # or bz2
Is there a config option to disable zlib, even if above config are in place? If so please provide an example.
If no, would it be possible to add one? Like if zlib_save_level = 0 disable zlib. So one can configure per mailbox compression level via sql database.
KuiZ
Thanks
On 10/9/2010 12:45 AM, Kui Zhang wrote:
Hello
Dovecot v2.0.5
zlib_save_level = 6 # 1..9 zlib_save = gz # or bz2
Is there a config option to disable zlib, even if above config are in place? If so please provide an example.
If no, would it be possible to add one? Like if zlib_save_level = 0 disable zlib. So one can configure per mailbox compression level via sql database.
KuiZ
Thanks
-- Yes, with all dovecot "Plugin" parameters, like zlib_save_level, they can be dynamically set by your user_query for instance, on mysql, "SELECT CONCAT('/home/mail', mailboxes.domain, '/', mailboxes.username) AS home, mailboxes.compression AS zlib_save_level, ........ WHERE...."
Mailboxes.compression would be the table.field where the compression level for the user would be set. I know a value of "0" for zlib_save_level would be no compression.
Hope this helps! Remember, any setting that goes under "Plugin{}" can be dynamically set in your userdb_query for LDAP, Mysql, or w/e storage plugin you use. I have sieve_dir and quota_rule2 set by my userdb_query so that some people can have quotas and others don't have an limit.
Jerrale G. SC Senior Admin
Thank you for the reply.
Sorry, my post should have been more clear... I got the dynamic compression part. I dont know how to turn it off, for accounts that does not need/want it.
I tried setting the compression level to 0, dovecot does not appear to like it.
Error: zlib_save_level: Level must be between 1..9
KuiZ On Sat, Oct 9, 2010 at 2:56 PM, Jerrale G jerralegayle@sheltoncomputers.com wrote:
On 10/9/2010 12:45 AM, Kui Zhang wrote:
Hello
Dovecot v2.0.5
zlib_save_level = 6 # 1..9 zlib_save = gz # or bz2
Is there a config option to disable zlib, even if above config are in place? If so please provide an example.
If no, would it be possible to add one? Like if zlib_save_level = 0 disable zlib. So one can configure per mailbox compression level via sql database.
KuiZ
Thanks
-- Yes, with all dovecot "Plugin" parameters, like zlib_save_level, they can be dynamically set by your user_query for instance, on mysql, "SELECT CONCAT('/home/mail', mailboxes.domain, '/', mailboxes.username) AS home, mailboxes.compression AS zlib_save_level, ........ WHERE...."
Mailboxes.compression would be the table.field where the compression level for the user would be set. I know a value of "0" for zlib_save_level would be no compression.
Hope this helps! Remember, any setting that goes under "Plugin{}" can be dynamically set in your userdb_query for LDAP, Mysql, or w/e storage plugin you use. I have sieve_dir and quota_rule2 set by my userdb_query so that some people can have quotas and others don't have an limit.
Jerrale G. SC Senior Admin
Thank you for the reply.
Sorry, my post should have been more clear... I got the dynamic compression part. I dont know how to turn it off, for accounts that does not need/want it.
I tried setting the compression level to 0, dovecot does not appear to like it.
Error: zlib_save_level: Level must be between 1..9
KuiZ On Sat, Oct 9, 2010 at 2:56 PM, Jerrale G jerralegayle@sheltoncomputers.com wrote:
On 10/9/2010 12:45 AM, Kui Zhang wrote:
Hello
Dovecot v2.0.5
zlib_save_level = 6 # 1..9 zlib_save = gz # or bz2
Is there a config option to disable zlib, even if above config are in place? If so please provide an example.
If no, would it be possible to add one? Like if zlib_save_level = 0 disable zlib. So one can configure per mailbox compression level via sql database.
KuiZ
Thanks
Yes, with all dovecot "Plugin" parameters, like zlib_save_level, they can be dynamically set by your user_query for instance, on mysql, "SELECT CONCAT('/home/mail', mailboxes.domain, '/', mailboxes.username) AS home, mailboxes.compression AS zlib_save_level, ........ WHERE...."
Mailboxes.compression would be the table.field where the compression level for the user would be set. I know a value of "0" for zlib_save_level would be no compression.
Hope this helps! Remember, any setting that goes under "Plugin{}" can be dynamically set in your userdb_query for LDAP, Mysql, or w/e storage plugin you use. I have sieve_dir and quota_rule2 set by my userdb_query so that some people can have quotas and others don't have an limit.
Jerrale G. SC Senior Admin
for all other applications in *nix, where it uses the zlib or bzlib
On 10/10/2010 2:26 PM, Kui Zhang wrote: libraries, setting the compression to 0 usually allows disabling it. Can you show your "doveconf -n" output please?
Jerrale G. SC Senior Admin
On 11.10.2010, at 0.48, Jerrale G wrote:
zlib_save_level = 6 # 1..9 zlib_save = gz # or bz2 for all other applications in *nix, where it uses the zlib or bzlib libraries, setting the compression to 0 usually allows disabling it. Can you show your "doveconf -n" output please?
Setting it to 0 doesn't disable it. Setting it to empty ("") might disable it. I'm not sure right now. And setting zlib_save to empty might also disable it .. or with SQL setting it to NULL. Anyway, one of those sound like a good bet.
Thanks guys.
setting both zlib_save_level and zlib_save to null disables zlib
wiki updated.
KuiZ
On Sun, Oct 10, 2010 at 3:36 PM, Timo Sirainen tss@iki.fi wrote:
On 11.10.2010, at 0.48, Jerrale G wrote:
zlib_save_level = 6 # 1..9 zlib_save = gz # or bz2 for all other applications in *nix, where it uses the zlib or bzlib libraries, setting the compression to 0 usually allows disabling it. Can you show your "doveconf -n" output please?
Setting it to 0 doesn't disable it. Setting it to empty ("") might disable it. I'm not sure right now. And setting zlib_save to empty might also disable it .. or with SQL setting it to NULL. Anyway, one of those sound like a good bet.
participants (3)
-
Jerrale G
-
Kui Zhang
-
Timo Sirainen