Julien Kerihuel | 2 Mar 2009 05:45
Favicon
Gravatar

[openchange]Outlook displays mailbox folder list with openchange server

Hi List,

I have pushed code in trunk which makes Outlook launches properly and
display the Mailbox folder list. The server also works with
"openchangeclient --mailbox".

The interesting thing is that none of the data sent to
Outlook/openchangeclient are hardcoded. They are all fetched from the
openchange dispatcher database (which is provisioned using openchange
python scripts).

A screenshot of this POC is available at the URL below:
http://www.openchange.org/screenshots/third_outlook_step.png

Cheers ;-)
Julien.

--

-- 
Julien Kerihuel
j.kerihuel <at> openchange.org
OpenChange Project Manager

GPG Fingerprint: 0B55 783D A781 6329 108A  B609 7EF6 FE11 A35F 1F79

_______________________________________________
devel mailing list
devel <at> lists.openchange.org
http://mailman.openchange.org/listinfo/devel
(Continue reading)

Miklos Balazs | 2 Mar 2009 13:39
Picon

Re: [openchange]mapiproxy module for interfacing third party groupware suites

Dear Julien!

Thank you for the answer, it made a lot of things clear to me. So now I think the best way to accomplish what I want would be to write a backend to the mapistore layer, and write a custom EMSABP provider for the address book (as, as far as I can tell, your EMSABP implementation lacks a middle abstraction layer like the mapistore in your EMSMDB implementation).

I've looked at the mapiproxy code a bit, and saw that the emsmdb/mapistore code currently available in the repo consists mostly of initialization related stuff. Since I don't have an insight on how much work needs to be done implementing these providers, could you please give me a rough estimate on when can I expect that your EMSMDB implementation will have enough features, and a stable API, so that I can start implemening my own mapistore backend? I don't need an exact date, I just would like to know that it'll be in 1-2 months or more like 5-6 months?

Regards,
Miklos Balazs

_______________________________________________
devel mailing list
devel <at> lists.openchange.org
http://mailman.openchange.org/listinfo/devel
Julien Kerihuel | 2 Mar 2009 16:04
Favicon
Gravatar

Re: [openchange]mapiproxy module for interfacing third party groupware suites

On Mon, 2009-03-02 at 13:39 +0100, Miklos Balazs wrote:
> Dear Julien!
> 
> Thank you for the answer, it made a lot of things clear to me. So now
> I think the best way to accomplish what I want would be to write a
> backend to the mapistore layer, and write a custom EMSABP provider for
> the address book (as, as far as I can tell, your EMSABP implementation
> lacks a middle abstraction layer like the mapistore in your EMSMDB
> implementation).

Hi Miklos,

Indeed the EMSABP provider was not designed to include a middle
abstraction layer. NSPI/EMSABP is roughly just a wrapper/proxy over
Active Directory: turning AD information into MAPI data structures and
translating search request/replies (It is just like a 1-1 mapping
between AD attributes and MAPI property tags)

I am not sure writing a custom EMSABP provider would be the best
solution, maybe working on making sure NSPI/EMSABP can properly fetch
information from a LDAP backend would give you the flexibility you're
looking for. Mixing LDAP schemas within a heterogeneous environment
Samba with LDAP backend + 3rd party groupware with LDAP auth scheme +
whatever other services look to me like a more reasonable way to
proceed.

> I've looked at the mapiproxy code a bit, and saw that the
> emsmdb/mapistore code currently available in the repo consists mostly
> of initialization related stuff. Since I don't have an insight on how
> much work needs to be done implementing these providers, could you
> please give me a rough estimate on when can I expect that your EMSMDB
> implementation will have enough features, and a stable API, so that I
> can start implemening my own mapistore backend? I don't need an exact
> date, I just would like to know that it'll be in 1-2 months or more
> like 5-6 months?

A stable/frozen API is IMHO - at least - 5-6 months far from here.
However preliminary working version including some of the semantics
required to read/write messages, get contents table etc should probably
be available within 2 or 3 weeks, maybe less, maybe more.

It is intended to be working for POC-1.

Now openchange server lets Outlook opens properly, it make testing a lot
more easier (both with openchangeclient and Outlook).

Cheers,
Julien.

--

-- 
Julien Kerihuel
j.kerihuel <at> openchange.org
OpenChange Project Manager

GPG Fingerprint: 0B55 783D A781 6329 108A  B609 7EF6 FE11 A35F 1F79

_______________________________________________
devel mailing list
devel <at> lists.openchange.org
http://mailman.openchange.org/listinfo/devel
rptq | 3 Mar 2009 06:53
Favicon

[openchange]mapi client prog, some special cases

Currently I am running test cases through a client program that I built out 
of exchange2mbox and the 0.8 release of exchange2ical. Right now I have two 
strange cases for which I would need some advice.

The first one was created accidentally. I sent a message with attachments
from OWA and then I moved the message from Sent Items to the Inbox.
In OWA it looks like a regular mail with names and addresses on the
To and CC lines. However, when I use my mapi client to download this
message, I don't get any PR_TRANSPORT_MESSAGE_HEADERS. That's not 
surprising since this message hasn't really been sent, it's a local copy.
But how can I get the To and CC (and BCC) information? I tried all sorts
of tags that have EMAIL, TO or CC in it, but they all come up empty. 
Since I can see this info in OWA, it must be somewhere. (Normally I 
rely only on the transport headers to get all the to & from info.)

The second case is an invitation that I sent from Thunderbird. In OWA
it shows up as an email with the calendar icon. It has a text line in
the body that was apparently generated by TB. It also has an attachment
called invite.ics. Now let's look at a code snippet:
http://www.pastebin.ca/1351665
The debug print statements in lines 33-38 all print some reasonable
information. But the OpenMessage on line 41 fails with MAP_E_INVALID_PARAMETER.
(exchange2ical also calls OpenMessage for each item is processes.)

The obvious question is of course, why does this fail and what kind of test
should I do before calling OpenMessage?
But then I am also wondering what I can do with the table I got from QueryRows 
(line 29), what is the set of tags that could get at this stage, and for what 
operations do I need to call OpenMessage? Can I get the full body and the 
attachments after QueryRows or does that require a message object from 
OpenMessage?

--

-- 
Be Yourself  <at>  mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com
Julien Kerihuel | 3 Mar 2009 16:00
Favicon
Gravatar

Re: [openchange]mapi client prog, some special cases

On Tue, 2009-03-03 at 13:53 +0800, rptq <at> whoever.com wrote:
> Currently I am running test cases through a client program that I built out 
> of exchange2mbox and the 0.8 release of exchange2ical. Right now I have two 
> strange cases for which I would need some advice.

Further version of exchange2ical will rely on libical. However I don't
think this will change the MAPI semantics involved in the tool.

> The first one was created accidentally. I sent a message with attachments
> from OWA and then I moved the message from Sent Items to the Inbox.
> In OWA it looks like a regular mail with names and addresses on the
> To and CC lines. However, when I use my mapi client to download this
> message, I don't get any PR_TRANSPORT_MESSAGE_HEADERS. That's not 
> surprising since this message hasn't really been sent, it's a local copy.
> But how can I get the To and CC (and BCC) information? I tried all sorts
> of tags that have EMAIL, TO or CC in it, but they all come up empty. 
> Since I can see this info in OWA, it must be somewhere. (Normally I 
> rely only on the transport headers to get all the to & from info.)

These fields should normally be available in OpenMessage reply and you
should be able to retrieve them using GetRecipientTable +
GetABRecipientInfo if you're looking for additional information for
Exchange organization users.

> 
> The second case is an invitation that I sent from Thunderbird. In OWA
> it shows up as an email with the calendar icon. It has a text line in
> the body that was apparently generated by TB. It also has an attachment
> called invite.ics. Now let's look at a code snippet:
> http://www.pastebin.ca/1351665
> The debug print statements in lines 33-38 all print some reasonable
> information. But the OpenMessage on line 41 fails with MAP_E_INVALID_PARAMETER.
> (exchange2ical also calls OpenMessage for each item is processes.)

OpenMessage returns MAPI_E_INVALID_PARAMETER if obj_store is invalid or
if it was unable to retrieve the session pointer from opaque obj_store.
I don't think Exchange (but I may be wrong) actually returns
MAPI_E_INVALID_PARAMETER on its own as a valid mapi_response retval for
this call. Maybe enabling debug would show you whether the call is
actually being packed and relay to Exchange or not.

> But then I am also wondering what I can do with the table I got from QueryRows 
> (line 29), what is the set of tags that could get at this stage, and for what 
> operations do I need to call OpenMessage? 

You don't need any other tags but PR_FID and PR_MID to call OpenMessage.
With QueryRows you will - in the code you pasted - be able to retrieve
any properties specified with SetColumns and available on a contents
table.

> Can I get the full body and the 
> attachments after QueryRows or does that require a message object from 
> OpenMessage?

You need to OpenMessage and GetProps on obj_message object.

---
Julien Kerihuel
j.kerihuel <at> openchange.org
OpenChange Project Manager

GPG Fingerprint: 0B55 783D A781 6329 108A  B609 7EF6 FE11 A35F 1F79
rptq | 3 Mar 2009 17:55
Favicon

Re: [openchange]mapi client prog, some special cases

Merci Julien.

> > Currently I am running test cases through a client program that I 
> > built out of exchange2mbox and the 0.8 release of exchange2ical. 
> > Right now I have two strange cases for which I would need some 
> > advice.
> 
> Further version of exchange2ical will rely on libical. However I don't
> think this will change the MAPI semantics involved in the tool.

saw that already, but I haven't followed the changes you already made

> > The first one was created accidentally. I sent a message with attachments
> > from OWA and then I moved the message from Sent Items to the Inbox.
> > In OWA it looks like a regular mail with names and addresses on the
> > To and CC lines. However, when I use my mapi client to download this
> > message, I don't get any PR_TRANSPORT_MESSAGE_HEADERS. That's not 
> > surprising since this message hasn't really been sent, it's a 
> > local copy.
> > But how can I get the To and CC (and BCC) information? I tried all sorts
> > of tags that have EMAIL, TO or CC in it, but they all come up 
> > empty. Since I can see this info in OWA, it must be somewhere. 
> > (Normally I rely only on the transport headers to get all the to 
> > & from info.)
> 
> These fields should normally be available in OpenMessage reply and you
> should be able to retrieve them using GetRecipientTable +
> GetABRecipientInfo if you're looking for additional information for
> Exchange organization users.

Ok, thanks, will look into this tomorrow. Already past midnight here.

> > The second case is an invitation that I sent from Thunderbird. In OWA
> > it shows up as an email with the calendar icon. It has a text line in
> > the body that was apparently generated by TB. It also has an attachment
> > called invite.ics. Now let's look at a code snippet:
> > http://www.pastebin.ca/1351665
> > The debug print statements in lines 33-38 all print some reasonable
> > information. But the OpenMessage on line 41 fails with 
> > MAP_E_INVALID_PARAMETER.
> > (exchange2ical also calls OpenMessage for each item is processes.)
> 
> OpenMessage returns MAPI_E_INVALID_PARAMETER if obj_store is invalid or

I think we can exclude that because then the contents table shouldn't
have worked either. Isn't obj_store the root, i.e. if that is invalid,
nothing will work?

> if it was unable to retrieve the session pointer from opaque obj_store.
> I don't think Exchange (but I may be wrong) actually returns
> MAPI_E_INVALID_PARAMETER on its own as a valid mapi_response retval for
> this call. Maybe enabling debug would show you whether the call is
> actually being packed and relay to Exchange or not.

not knowing what debug_level means, I set it to 5. 
Then I got a message "ndr_pull_error(2): Bad switch value 0"
Then I numbered all these ndr_pull_error and found that this one
came from ndr_pull_EcDoRpc_MAPI_REPL_UNION

> > But then I am also wondering what I can do with the table I got 
> > from QueryRows (line 29), what is the set of tags that could get 
> > at this stage, and for what operations do I need to call 
> > OpenMessage?
> 
> You don't need any other tags but PR_FID and PR_MID to call OpenMessage.
> With QueryRows you will - in the code you pasted - be able to retrieve
> any properties specified with SetColumns and available on a contents
> table.

Understood that for OpenMessage I need only FID and MID. However, after
QueryRows (and before OpenMessage) it seems that I have access to more
tags than those listed in
http://msdn.microsoft.com/en-us/library/cc842083.aspx
Is there some sort of "select * from tableX" where you get to see
all the fields that are actually available?
Anyway, just curious, if we can figure out this ndr_pull_error,
then hopefully we can get OpenMessage to work on this message
and then there's no need to fiddle around

> > Can I get the full body and the attachments after QueryRows or 
> > does that require a message object from OpenMessage?
> 
> You need to OpenMessage and GetProps on obj_message object.
> 

--

-- 
Be Yourself  <at>  mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com
Julien Kerihuel | 3 Mar 2009 18:30
Favicon
Gravatar

Re: [openchange]mapi client prog, some special cases

On Wed, 2009-03-04 at 00:55 +0800, rptq <at> whoever.com wrote:
> > if it was unable to retrieve the session pointer from opaque obj_store.
> > I don't think Exchange (but I may be wrong) actually returns
> > MAPI_E_INVALID_PARAMETER on its own as a valid mapi_response retval for
> > this call. Maybe enabling debug would show you whether the call is
> > actually being packed and relay to Exchange or not.
> 
> not knowing what debug_level means, I set it to 5. 
> Then I got a message "ndr_pull_error(2): Bad switch value 0"
> Then I numbered all these ndr_pull_error and found that this one
> came from ndr_pull_EcDoRpc_MAPI_REPL_UNION

The overall problem is very likely to come from here. Looks like libmapi
has troubles with the mapi_response sent by Exchange for a particular
call. To make it short: whenever ndr_pull_error is met means something
is wrong with libmapi. 

It is possible this may be a special case we didn't yet handle in
libmapi. If you could provide me more feedback on this one such as "when
does it occur" etc. I may be able to trigger this bug and fix it.

A wireshark capture may also be very useful here.

Cheers,
Julien.

---
Julien Kerihuel
j.kerihuel <at> openchange.org
OpenChange Project Manager

GPG Fingerprint: 0B55 783D A781 6329 108A  B609 7EF6 FE11 A35F 1F79
rptq | 4 Mar 2009 10:14
Favicon

Re: [openchange]mapi client prog, some special cases

> From: "Julien Kerihuel"
> 
> On Wed, 2009-03-04 at 00:55 +0800, rptq <at> whoever.com wrote:
> > > if it was unable to retrieve the session pointer from opaque obj_store.
> > > I don't think Exchange (but I may be wrong) actually returns
> > > MAPI_E_INVALID_PARAMETER on its own as a valid mapi_response retval for
> > > this call. Maybe enabling debug would show you whether the call is
> > > actually being packed and relay to Exchange or not.
> >
> > not knowing what debug_level means, I set it to 5. Then I got a 
> > message "ndr_pull_error(2): Bad switch value 0"
> > Then I numbered all these ndr_pull_error and found that this one
> > came from ndr_pull_EcDoRpc_MAPI_REPL_UNION
> 
> The overall problem is very likely to come from here. Looks like libmapi
> has troubles with the mapi_response sent by Exchange for a particular
> call. To make it short: whenever ndr_pull_error is met means something
> is wrong with libmapi.
> 
> It is possible this may be a special case we didn't yet handle in
> libmapi. If you could provide me more feedback on this one such as "when
> does it occur" etc. I may be able to trigger this bug and fix it.

This message is created by Thunderbird with the Lightning plug-in.
Go to the calendar, create a new event, invite some attendees, then
save, and say "yes" when it asks whether the attendees should receive
an email. It also asks something about Outlook compatibility, but that
doesn't seem to matter. If you want, I can send you such an invitation.
The problem occurs when I'm calling OpenMessage.

> A wireshark capture may also be very useful here.

I've done that and will send it to you privately.

Regarding the other case:
GetRecipientTable fixed my problem regarding To, CC and BCC.
I still have a problem with From. Instead of an email address I can
get only some sort of LDAP string. What does GetABRecipientInfo 
expect in terms of username?

--

-- 
Be Yourself  <at>  mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com
Paolo Abeni | 4 Mar 2009 17:54
Picon

[openchange][PATCH] IMAPISupport Subscribe(): add sanity check

hello,

The attached patch add a sanity check on session->notify_ctx in the
IMAPISupport/Subscribe() function.

I think the check is useful, since while writing a libmapi-enabled
application, I got a core dump calling Subscribe().  The fault was
caused by the session->notify_ctx not being initialized: I forget to
call RegisterNotification(), but I suppose that in such situation
Subscribe() should fail without segfaulting the caller. Am I missing
something ?!?

The patch is against current (r1271) svn.

Cheer,

Paolo
Attachment (add_sanity_check.patch): application/octet-stream, 592 bytes
_______________________________________________
devel mailing list
devel <at> lists.openchange.org
http://mailman.openchange.org/listinfo/devel
Paolo Abeni | 4 Mar 2009 18:12
Picon

Re: [openchange][PATCH] IMAPISupport Subscribe(): add sanity check

Hello,

Please ignore the patch in the previous mail and consider the one
attached to the current message  (due to my excessive hastiness, the
original patch contains a very dumb mistake).

Thank you for your attention and patience,

Paolo
Attachment (add_sanity_check.patch): application/octet-stream, 441 bytes
_______________________________________________
devel mailing list
devel <at> lists.openchange.org
http://mailman.openchange.org/listinfo/devel

Gmane