Introduction to Kopano Jelle van der Waa 1 / 22 www.kopano.com $ - - PowerPoint PPT Presentation

introduction to kopano
SMART_READER_LITE
LIVE PREVIEW

Introduction to Kopano Jelle van der Waa 1 / 22 www.kopano.com $ - - PowerPoint PPT Presentation

www.kopano.com Introduction to Kopano Jelle van der Waa 1 / 22 www.kopano.com $ whoami Developer @ Kopano Arch Linux Developer jelle@vdwaa.nl / j.vanderwaa@kopano.com @jelly @jvdwaa 2 / 22 www.kopano.com Introduction Open


slide-1
SLIDE 1

www.kopano.com

Introduction to Kopano

Jelle van der Waa 1 / 22

slide-2
SLIDE 2

www.kopano.com

$ whoami

Developer @ Kopano Arch Linux Developer  jelle@vdwaa.nl / j.vanderwaa@kopano.com  @jelly  @jvdwaa 2 / 22

slide-3
SLIDE 3

www.kopano.com

Introduction

Open source communication, collaboration and sharing platform Email, video, calendaring, tasks, notes and file sharing Fork of Zarafa Implements the MAPI Specification AGPLv3 3 / 22

slide-4
SLIDE 4

www.kopano.com

IMAP / POP3 / CalDav support ActiveSync for mobile devices / OL (13 and higher) Our own web and desktop client plugin support for web / desktop client

Architecture (clients)

4 / 22

slide-5
SLIDE 5

www.kopano.com

Use of any MTA possible MySQL as MAPI storage db Various user backends: LDAP, AD, DB, Unix Attachments on disk

  • r S3 based

(protocol) Multi-server architecture

Architecture (backend)

5 / 22

slide-6
SLIDE 6

www.kopano.com

Architecture (backend)

All data is stored as MAPI objects Bindings for C++, PHP, Python for MAPI Clients Conversion to eml, vcf, ics to and from MAPI SOAP for transport Does not implement the DCE/RPC, MAPI/HTTP or "Outlook anywhere" 6 / 22

slide-7
SLIDE 7

www.kopano.com

Z-Push

Open Source ActiveSync implementation Sync mail, calender, contacts and tasks to    Written in PHP (uses PHP-mapi extension) Supports multiple backends (Kopano, Maildir, Vcard, IMAP) Kopano Outlook Extension (KOE) - Extends the feature-set of OL's ActiveSync Implementation http://z-push.org https://stash.z-hub.io/projects/ZP/repos/z-push/browse https://stash.kopano.io/projects/KOE/repos/kopano_ol_extension_source/browse 7 / 22

slide-8
SLIDE 8

www.kopano.com

MAPI (Objects)

Store └── Folder └── Item └── Attachment

Proptag Proptype Value PR_SUBJECT PT_STRING 'hello' PR_HASATTACH PT_BOOLEAN False PR_CREATION_TIME PT_SYSTIME 2017-01-26 10:26:22 PR_MESSAGE_FLAGS PT_LONG 8

PR_SUBJECT = PROP_TAG( PT_TSTRING, 0x0037) mapiobj.SetProps([SPropValue(PR_SUBJECT, 'subject')], 0) mapiobj.GetProps([PR_SUBJECT], 0)

8 / 22

slide-9
SLIDE 9

www.kopano.com

MAPI (Good parts)

T echnology from ~ '80, still developed Extensible ICS framework (Incremental change synchronisation) 9 / 22

slide-10
SLIDE 10

www.kopano.com

MAPI (Bad parts)

Hard to grasp Low-level Documentation Legacy 10 / 22

slide-11
SLIDE 11

www.kopano.com

Python-kopano

2 years ago started hacking on a high level Python API Acts as a MAPI client Abstracts MAPI Easy to interface T

  • ols / programs built on top of it

Examples: Search Backup Spam learning daemon Debugging tools Functional tests https://stash.kopano.io/projects/KSC/repos/lab-scripts/browse/python- kopano https://stash.kopano.io/projects/KSC/repos/kopano-spamd/browse 11 / 22

slide-12
SLIDE 12

www.kopano.com

MAPI Example (email)

session = OpenECSession('user1','pass',os.getenv('KOPANO_SOCKET'))

12 / 22

slide-13
SLIDE 13

www.kopano.com

MAPI Example (email)

session = OpenECSession('user1','pass',os.getenv('KOPANO_SOCKET')) store = GetDefaultStore(session)

  • utboxid = HrGetOneProp(store, PR_IPM_OUTBOX_ENTRYID).Value
  • utbox = store.OpenEntry(outboxid, None, MAPI_MODIFY)

13 / 22

slide-14
SLIDE 14

www.kopano.com

MAPI Example (email)

session = OpenECSession('user1','pass',os.getenv('KOPANO_SOCKET')) store = GetDefaultStore(session)

  • utboxid = HrGetOneProp(store, PR_IPM_OUTBOX_ENTRYID).Value
  • utbox = store.OpenEntry(outboxid, None, MAPI_MODIFY)

message = outbox.CreateMessage(None, 0)

14 / 22

slide-15
SLIDE 15

www.kopano.com

MAPI Example (email)

session = OpenECSession('user1','pass',os.getenv('KOPANO_SOCKET')) store = GetDefaultStore(session)

  • utboxid = HrGetOneProp(store, PR_IPM_OUTBOX_ENTRYID).Value
  • utbox = store.OpenEntry(outboxid, None, MAPI_MODIFY)

message = outbox.CreateMessage(None, 0) message.ModifyRecipients(0, [[SPropValue(PR_RECIPIENT_TYPE, MAPI_TO), SPropValue(PR_DISPLAY_NAME, 'Jelle van der Waa'), SPropValue(PR_EMAIL_ADDRESS_A, 'j.vanderwaa@kopano.com') ]]) message.SetProps([SPropValue(PR_SUBJECT, 'hello fosdem'), SPropValue(PR_BODY, 'empty body!')])

15 / 22

slide-16
SLIDE 16

www.kopano.com

MAPI Example (email)

session = OpenECSession('user1','pass',os.getenv('KOPANO_SOCKET')) store = GetDefaultStore(session)

  • utboxid = HrGetOneProp(store, PR_IPM_OUTBOX_ENTRYID).Value
  • utbox = store.OpenEntry(outboxid, None, MAPI_MODIFY)

message = outbox.CreateMessage(None, 0) message.ModifyRecipients(0, [[SPropValue(PR_RECIPIENT_TYPE, MAPI_TO), SPropValue(PR_DISPLAY_NAME, 'Jelle van der Waa'), SPropValue(PR_EMAIL_ADDRESS_A, 'j.vanderwaa@kopano.com') ]]) message.SetProps([SPropValue(PR_SUBJECT, 'hello fosdem'), SPropValue(PR_BODY, 'empty body!')]) message.SubmitMessage(0)

16 / 22

slide-17
SLIDE 17

www.kopano.com

Python-kopano Example (e-mail)

import kopano server = kopano.Server(auth_user='user1', auth_pass='user1') user = server.user('user1')

17 / 22

slide-18
SLIDE 18

www.kopano.com

Python-kopano Example (e-mail)

import kopano server = kopano.Server(auth_user='user1', auth_pass='user1') user = server.user('user1') # Send e-mail user.outbox.create_item(subject='hello fosdem', body='empty body!', to='jelle van der Waa <j.vanderwaa@kopano.com>').send()

18 / 22

slide-19
SLIDE 19

www.kopano.com

Python-kopano Example

# access MAPI property item = next(user.inbox.items()) item.subject = 'new subject' # Iterate users for user in server.users(): print(user) print(user.enabled) print(user.outofoffice.enabled) # Search! for item in user.inbox.search('hello'): print(item) # Low-level possible item.mapiobj.GetProps([PR_SUBJECT], 0)

19 / 22

slide-20
SLIDE 20

www.kopano.com

Downstream

Debian - process of getting into Debian https://wiki.debian.org/groupware/kopano OpenSUSE - build service repository https://build.opensuse.org/project/show/server:mail:kopano 20 / 22

slide-21
SLIDE 21

www.kopano.com

Conclusion

Main website https://kopano.io Packages https://download.kopano.io/community/ Git https://stash.kopano.io  https://github.com/Kopano-mirror/ 21 / 22

slide-22
SLIDE 22

www.kopano.com

Questions

22 / 22