[Dovecot] [bulk]: Deleting metadata smashes file dovecot.dict

Andre Gröbe andre.groebe at fun.de
Wed Aug 8 15:33:03 EEST 2012


missing patch and info:

metadata patch
==============

--- a/src/metadata-backend.c
+++ b/src/metadata-backend.c
@@ -130,7 +130,8 @@ metadata_set_entry(struct metadata_entry *entry, 
struct mail_user *user) {

  	if (!metadata_entry_is_valid(entry))
  		return -METADATA_ERROR_INVALID;
-	if (strlen(metadata_entry_get_value(entry)) > muser->set->maxsize)
+	if (metadata_entry_get_value(entry) != NULL
+	    && strlen(metadata_entry_get_value(entry)) > muser->set->maxsize)
  		return -METADATA_ERROR_TOOLARGE;
  	if (count_entries(muser) > muser->set->maxentries)
  		return -METADATA_ERROR_TOOMANY;

--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,6 @@
  ACLOCAL_AMFLAGS = -I m4

  SUBDIRS = src
+
+pkginc_libdir=$(dovecot_pkgincludedir)/metadata
+nodist_pkginc_lib_HEADERS = metadata-config.h

--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,7 +42,7 @@ lib90_imap_annotatemore_plugin_la_LIBADD = \
  	lib80_metadata_plugin.la
  endif

-noinst_HEADERS = \
+headers = \
  	metadata-backend.h \
  	metadata-entry.h \
  	metadata-entry-private.h \
@@ -55,3 +55,6 @@ noinst_HEADERS = \
  	imap-arg-ext.h \
  	mailbox-ext.h \
  	str-ext.h
+
+pkginc_libdir=$(dovecot_pkgincludedir)/metadata
+pkginc_lib_HEADERS = $(headers)


dovecot -n
==========

# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.35-1exp2-intern-k8-kvm x86_64 Debian 6.0.5 ext3
debug_log_path = /var/opt/dovecot/log/dovecot.log
default_vsz_limit = 512 M
disable_plaintext_auth = no
first_valid_uid = 0
info_log_path = /var/opt/dovecot/log/dovecot.log
lmtp_check_rcpt = yes
lmtp_rcpt_to_parameters {
   * = i:
   ignorequota = b:plugin/quota_ignore
   xtolain = s:plugin/lain
   xtomsgtype = s:plugin/mailtype_xtomsgtype
   xtospam = b:plugin/spamflag_xtospam
   xtovacation = B:plugin/sieve_xtovacation
}
log_path = /var/opt/dovecot/log/dovecot.log
log_timestamp = "%y%m%H%M%S "
mail_gid = mail
mail_home = /var/spool/dovecot/%2.256Hu/%3.4096Hu/%u
mail_location = mdbox:/var/spool/dovecot/%2.256Hu/%3.4096Hu/%u
mail_plugin_dir = /opt/app/dovecot/lib/dovecot
mail_plugins = notify metadata test
mail_uid = mail
namespace inbox {
   inbox = yes
   location =
   prefix = INBOX.
   separator = .
   type = private
}
passdb {
   args = nocache=y /var/spool/dovecot/deny
   deny = yes
   driver = passwd-file
}
passdb {
   args = nopassword=y
   driver = static
}
plugin {
   acl = vfile
   autocreate = INBOX.Drafts
   autocreate2 = INBOX.Sent
   autocreate3 = INBOX.Trash
   metadata_dict = 
file:/var/spool/dovecot/%2.256Hu/%3.4096Hu/%u/dovecot.dict
   metadata_maxsize = 10240
   quota = dict:User 
quota::file:/var/spool/dovecot/%2.256Hu/%3.4096Hu/%u/dovecot.dict
   quota_rule = *:bytes=999999
   quota_rule2 = *:messages=999
   quota_rule3 = *:mailboxes=99
   quota_rule4 = *:levels=9
   quota_rule5 = INBOX.Voicebox:ignore
}
service anvil {
   unix_listener anvil {
     group = dovecot
     mode = 0660
   }
}
service auth-worker {
   user = $default_internal_user
}
service auth {
   unix_listener auth-userdb {
     group = dovecot
     mode = 0660
   }
}
service config {
   unix_listener config {
     group = dovecot
     mode = 0660
   }
}
service dict {
   unix_listener dict {
     mode = 0600
     user = mail
   }
}
service lmtp {
   inet_listener lmtp {
     port = 2003
   }
}
ssl = no
userdb {
   args = /opt/app/dovecot/etc/dovecot/dovecot-tdbfcall.conf.ext
   driver = tdbfcall
}
protocol imap {
   mail_plugins = notify metadata test autocreate imap_metadata 
imap_annotatemore
}
protocol pop3 {
   pop3_uidl_format = %v.%u
}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4910 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20120808/0d589074/attachment-0004.bin>


More information about the dovecot mailing list