Connect with System Attendant using MFCmapi without Outlook

Jan 26, 2012 at 4:09 PM

Good Afternoon,

I am trying to use MFCmapi from different machines (v6.5.7830.0 & v15.0.0.1031) to connect to my Exchange 2003 server to view Public Folders.

I have a requirement to do this from a machine that does not and can not have Outlook installed.

So, I am using CDO (v6.5.8165.0 & 6.5.8244.0) but I am having no luck.

All machines in question are 32bit W2K3 machines and are all in a single child domain.

I have tested this from various machines with the same results.  I am able to use MFCmapi on these machines with any other account and I can see the mailbox database and the PF database fine.  If I use a machine with Outlook (this is only for testing) then I can indeed use the SA account and see the MB DB and the PF DB fine. But the requirement I have is to use the SA account from a machine without Outlook and this I can't seem to do.

The error I get when using the SA account from a machine without Outlook is the typical: MAPI_E_LOGON_FAILED

Any ideas?

Jan 26, 2012 at 4:56 PM

MAPI_E_LOGON_FAILED is an interesting error to get. I presume this was from MAPILogonEx? Typically, in this scenario, the error you'd be getting would be MAPI_E_FAILONEPROVIDER from OpenMsgStore. If MAPILogonEx is failing, then it sounds like you're not getting the profile created correctly, like you got through CreateMsgService, but didn't get through ConfigureMsgService. How did you create/configure the profile?

Jan 26, 2012 at 6:31 PM

I created the SA profile by first opening MFCmapi and when prompted for a profile to use I selected New - then used the FQDN of my E2K3 server and the LEDN of the SA mailbox (from adsiedit)

I did it this way on both the server with outlook on it (which works) and the server with CDO on it (doesn't work) but one thing I noticed in both cases is the error 'The name could not be matched to a name in the address list' and if I choose OK twice it will work on the server with Outlook but not on the server with CDO.

I don't know if it's even possible to have the SA visible in the GAL

Jan 26, 2012 at 6:52 PM

They way I've always gotten into the SA mailbox on a 2003 server is to open an Admin mailbox with rights and from there open the mailbox table for the server. Then I can enter the SA. It's possible to build a profile by hand for the SA, but it involves a good bit of twiddling in the profile.

Jan 26, 2012 at 7:18 PM

Is there any procedure for the manual creation of a profile?

I would open the SA mailbox with another account just as you mention but my end goal is to look into Public Folders from the machine that cannot have Outlook to 'see' exactly what the SA account sees.  So if I log in as anyone else that will skew what I can see

Jan 26, 2012 at 7:35 PM

It's been so long since anyone's tried to do this (most can just jump from the other mailbox to meet their needs) that I don't really recall the details. By any chance do you have a program already logging in to the mailbox using MAPI? You could hijack their profile - even if they delete it after logging on.

Jan 26, 2012 at 7:48 PM

I never thought of hijacking their profile, maybe I'll go that route.

Thanks for all your help.