5
# For this test, we are running the whole environment on a different
6
# server: imap, ldap, postgresql, postfix, openchange, samba and sogo.
7
# We have configured SOGo backend locally and adjusted defaults to
8
# connect to this remote server.
10
# Finally we are accessing the openchange.ldb file through sshfs and
11
# map it to expected /usr/local/samba/private folder.
12
# sshfs openchange@ip_addr:/usr/local/samba/private /usr/local/samba/private
13
# We have also adjusted the permissions to allow openchange user to
14
# read/write openchange.ldb file remotely.
16
# Do not forget to run memcached with the user account running the
24
sys.path.append("python")
26
import openchange.mapistore as mapistore
28
dirname = "/usr/local/samba/private/mapistore"
29
if not os.path.exists(dirname):
30
os.mkdir("/usr/local/samba/private/mapistore")
32
mapistore.set_mapping_path(dirname)
33
MAPIStore = mapistore.mapistore(syspath="/usr/local/samba/private")
34
mgmt = MAPIStore.management()
37
# d = mgmt.registered_users("SOGo", "Administrator")
39
print "Is SOGo backend registered: %s" % mgmt.registered_backend("SOGo")
40
print "Is NonExistent backend registered: %s" % mgmt.registered_backend("NonExistent")
41
print "Registered message: %s" % mgmt.registered_message("SOGo", "Administrator", "Administrator", "inbox", "61")
42
print "Registered message: %s" % mgmt.registered_message("SOGo", "Administrator", "Administrator", "inbox", "74")
44
mgmt.existing_users("SOGo", "Administrator", "inbox")