Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-04-2009, 08:27 AM
Active Member
 
Posts: 28
Default KyaPanel offers Zimbra Backup and Restore tool

Interesting announcement from KyaPanel:

Quote:
Zimbra Backup and Restore tool
02/03/2009

This is the greatest new in Version 2.2~1: now KyaPanel has an exclusive tool to make backup and restore in servers with Zimbra. Like all KyaPanel's tools this one goes ahead from the regular tools. This one allow you to restore a single message for a user. How great is this?. Unfortunate not all is perfect. Zimbra still ask for a mailbox restart and this is boring but it's the way Zimbra is.

The tool name is kpzmbkp and it's a beta version, so use it with caution and report us any problems you find to help us to make it better.

In the other hand this version get a lot of bug fixes in many controls like attachment and recipient limit. Take a look on ChangeLog.

Enjoy!
Reply With Quote
  #2 (permalink)  
Old 02-04-2009, 08:33 AM
Moderator
 
Posts: 7,928
Default

A single message for a user can be injected back into Zimbra using zmlmtpinject.
__________________
Reply With Quote
  #3 (permalink)  
Old 02-04-2009, 09:05 AM
Active Member
 
Posts: 28
Default

In my understanding KyaPanel allows you to restore a single message from a backup archive and then you can use zmlmtpinject to inject the message back to the user mailbox.
Reply With Quote
  #4 (permalink)  
Old 02-04-2009, 09:30 AM
Moderator
 
Posts: 1,554
Default

what does

Quote:
Zimbra still ask for a mailbox restart and this is boring but it's the way Zimbra is.
mean?
Reply With Quote
  #5 (permalink)  
Old 02-04-2009, 09:50 AM
Moderator
 
Posts: 6,237
Default

Speaking of using some of the tools like zmlmtpinject or zmmailbox addMessage, some snips from a discussion internally a few months back. Keep in mind we are still very impressed with how well they integrate thus far.

Quote:
This is some pretty dangerous stuff. I don't think they're using imapsync, they appear to be using fetchmail to write the messages to disk in maildir format, and then inserting them with direct calls to mysql to modify the mail_item tables. (No, I am not kidding). c2z.sh is the insert, zp2zmessages.sh is the fetchmail wrapper.

No automated detection of the zimbra install dir, and no use of zmlocalconfig:
Quote:
SQL_USER_PW=`grep -A1 zimbra_mysql_password $ZIMBRAHOME/conf/localconfig.xml | tail -n1 | cut -d\> -f2 | cut -d\< -f1`
Direct invocation of ldap to set cos options, no quoting of passwords for special characters:
Quote:
# Firts thig to do is change the zimbraAllowAnyFromAddress attribute from false to true in cn=default,cn=cos,cn=zimbra
# This is what we has to do to Zimbra show the From field on its webmail.
Z_LDAP_URL=`grep -A1 ldap_master_url $ZIMBRAHOME/conf/localconfig.xml | tail -n1 | cut -d\> -f2 | cut -d\< -f1`
Z_LDAP_DN="cn=config"
Z_LDAP_PW=`grep -A1 zimbra_ldap_password $ZIMBRAHOME/conf/localconfig.xml | tail -n1 | cut -d\> -f2 | cut -d\< -f1`
LDAP_FILE="/tmp/zimbra_zimbraAllowAnyFromAddress"
echo "dn: cn=default,cn=cos,cn=zimbra" > $LDAP_FILE
echo "replace: zimbraAllowAnyFromAddress" >> $LDAP_FILE
echo "zimbraAllowAnyFromAddress: TRUE" >> $LDAP_FILE
$ZIMBRAHOME/openldap/bin/ldapmodify -H $Z_LDAP_URL -D $Z_LDAP_DN -w $Z_LDAP_PW -x -f $LDAP_FILE > /dev/null 2>&1
rm -f $LDAP_FILE
There's this little gem of a folder creation section:
Quote:
echo -e "\tAdding folder *** $F_FOLDER ****"
echo ""
EC=""
EC2=""
${MYSQL_COMM} $MAILBOX_NAME -e"insert into mail_item values($F_MAILBOX_ID,$F_ID,$F_TYPE,$F_PARENT_ID,$F _FOLDER_ID,$F_INDEX_ID,$F_IMAP_ID,$F_DATE,$F_SIZE, $F_VOLUME_ID,$F_BLOB_DIGEST,$F_UNREAD,$F_FLAGS,$F_ TAGS,$F_SENDER,'$F_SUBJECT','$F_NAME','$F_METADATA ','$F_MOD_METADATA',$F_CHANGE_DATE,$F_MOD_CONTENT) ;"
I=`expr $I + 1`
The message creation, much later:
Quote:
#echo -e "\tAdding message $EACH_MESSAGE"
${MYSQL_COMM} $MAILBOX_NAME -e"insert into mail_item values($M_MAILBOX_ID,$M_ID,$M_TYPE,$M_PARENT_ID,$M _FOLDER_ID,$M_INDEX_ID,$M_IMAP_ID,$M_DATE,$M_SIZE, $M_VOLUME_ID,'$M_BLOB_DIGEST',$M_UNREAD,$M_FLAGS,$ M_TAGS,'$M_SENDER','$M_SUBJECT','$M_NAME','$M_META DATA','$M_MOD_METADATA',$M_CHANGE_DATE,$M_MOD_CONT ENT);"
M_DESTINATION=`${MYSQL_COMM} zimbra -e"select path from volume where id = '1';"`

Last edited by mmorse; 02-04-2009 at 11:48 AM..
Reply With Quote
  #6 (permalink)  
Old 02-04-2009, 11:56 AM
Moderator
 
Posts: 6,237
Default

It's an extremely useful tool, just to 'disclaimer': Zimbra can play well with others through APIs. That's how cross-interactions for webservices/applications best. Hacking mysql and localconfig could result in problems down the road and it would be negligent of us not to warn. Hopefully the Kya people will take that feedback and use some of the safer methods in the future.

ie: There's a safer way to communicate. Zimbra can be managed by others - we're based some excellent open source third parties - and that's the point of stuff like this after all. It's up to the admins to take the chance of course; simply making the position on "what's network edition supported" clear.

Started: KyaPanel with Zimbra - Zimbra :: Wiki

Last edited by mmorse; 02-04-2009 at 12:01 PM..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.