-
zimbra store process
hello, I should fix a zimbra server with incosistent mysql data. After a disk failures-restore i've a lot of messages without the related record in mail_item as shown by the command:
./zmblobchk -m 24 start
...
Mailbox 24, volume 3, /dati/zimbra/store/0/24/msg/33/136036-181524.msg: unexpected blob. File size is 1521.
....
To insert the missing records in the table mail_item, i have to get how calculate the content.
I figure out the rule used to name the message thanks to the wiki page about the mailbox database structure, but i don't know how to set the fields blob_digest, meta_data, parent_id, mod_metadata, index_id.
Maybe i could leave null the index_id and force zimbra to reindex.
It seems zimbra use the chain postfix trasport map - openldap - jetty - java code:
#./postfix/sbin/postconf transport_maps
transport_maps = proxy:ldap:/opt/zimbra/conf/ldap-transport.cf
#/opt/zimbra/openldap/bin/ldapsearch -Hldap://mioserver.it -x -LLL -D "uid=zmpostfix,cn=appaccts,cn=zimbra" -w XXXXXXXX '(zimbraMailTransport=*)'
...
zimbraMailTransport: lmtp:mioserver.it:7025
...
#lsof -i :7025
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
java 14743 zimbra 72u IPv6 8422064 TCP *:7025 (LISTEN)
# ps -p 14743 wwwwwww
PID TTY STAT TIME COMMAND
14743 ? Sl 361:56 /opt/zimbra/java/bin/java -server -Djava.awt.headless=true -XX:+UseConcMarkSweepGC -XX:NewRatio=2 -XX:PermSize=128m -XX:MaxPermSize=128m -XX:SoftRefLRUPolicyMSPerMB=1 -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -Xss256k -Xms1485m -Xmx1485m -Xmn371m -Djava.io.tmpdir=/opt/zimbra/mailboxd/work -Djava.library.path=/opt/zimbra/lib -Djava.endorsed.dirs=/opt/zimbra/mailboxd/common/endorsed -Dzimbra.config=/opt/zimbra/conf/localconfig.xml -Djetty.home=/opt/zimbra/mailboxd -DSTART=/opt/zimbra/mailboxd/etc/start.config -jar /opt/zimbra/mailboxd/start.jar /opt/zimbra/mailboxd/etc/jetty.properties /opt/zimbra/mailboxd/etc/jetty-setuid.xml /opt/zimbra/mailboxd/etc/jetty.xml
The xml file /opt/zimbra/mailboxd/etc/jetty.xml seems to configure the contexts-handlers for the zimbra web applications, the file /opt/zimbra/mailboxd/etc/jetty-setuid.xml it seems open various socket taking parameters by the file /opt/zimbra/mailboxd/etc/jetty.properties.
It calls the method openport of the com.zimbra.common.handlers.PrivilegedHandler, with the hash of proprieties read in the jetty proprieties.file as argument. This class imports ./ZimbraCommon/src/java/com/zimbra/common/util/NetUtil.java to instantiate the socket object.
I can't found the accept call on the socket object, maybe I miss some steps, I'm not a java programmer.
Could anyone help me to understand the stack call used to store the message?
Is there an apposite procedure to create the mysql records from the files?
Should I care something before to insert manually the missing records?