A client of mine is using Microsoft Exchange Server. He doesn't want to use POP3 or IMAP4. Is it possible to make connection to an Exchange Server using the Mailhandler? How can I do this?

Comments

Dane Powell’s picture

I assume you mean that he has a mailbox on an Exchange server that he would like to have Mailhandler fetch from, and Mailhandler is running on a separate server from the Exchange server (so local fetching is not an option)

What protocol would he like to use, if not POP3 or IMAP? Those are the only two remotely standard protocols that I'm aware of.

pvanerk’s picture

Hi Dane,

He was saying I could use the Microsoft Exchange Protocol, but he couldn't mention any further details. I guess he meant MAPI (Messaging Application Programming Interface) but I don't know if that's possible. I am not really into the whole mail server thing. I asked how the managers could read their mails on their phone. They all use blackberries and they use a special blackberry server for that.

I suggested to use an internal mail address and use a forward rule to forward all the incoming mails to a gmail account. I could pick up the mails with Mailhandler from the gmail account. However they didn't favor such an approach because they think gmail is not safe enough.

Any ideas on this?

Thanks!

Dane Powell’s picture

Title: Mailhandler and Exchange Server » Retrieve messages from Exchange server (using MAPI protocol)
Status: Active » Closed (won't fix)

I am trying very hard not to be flippant about this, because I understand that it's not your fault, so I'll just say this: Microsoft Exchange is grossly incompatible with a wide number of industry-standard protocols, to which we can now apparently add "POP" and "IMAP". It has been a thorn in the side of Mailhandler for a long time (see #1127706: Extract messageid from body, as a backup to 'in-reply-to' header and #75229: Compatibility with Outlook-generated HTML, just for starters), and I'm very tired of bending over backward to support it.

With specific regard to this issue- we rely on the PHP IMAP library, which I'm sure doesn't support any protocol other than POP or IMAP. Supporting any other protocol would require ripping out the backend of Mailhandler, and replacing it with some other library or custom code to handle MAPI. That's not something that I'm willing to do. However, if it's a project that you'd like to undertake, please do let me know if there's anything that can be changed on Mailhandler's side to assist, such as making the backend library "pluggable". I'm not going to do the legwork on this though, sorry.

pvanerk’s picture

Dane,

Thanks for your extensive comment. I totally agree with you. It's funny to see how big companies think about this. If it's Microsoft, it should be okay. Even top CIOs think like this.

I am going to think about other alternatives. Thanks for your time!

Dane Powell’s picture

Thanks for understanding. Let me know if there's any other way I can help.

Dane Powell’s picture

Just FYI, here's a somewhat related issue that you may want to follow. Although it's also borderline 'won't fix'... #275926: Message retrieval library plugins (in order to avoid PHP IMAP dependency)

Dane Powell’s picture

Title: Retrieve messages from Exchange server (using MAPI protocol) » MAPI retrieval library
Version: 6.x-2.0-alpha6 » 7.x-2.x-dev
Category: support » feature
Status: Closed (won't fix) » Active

Hey, I don't know if this is still an issue for you, but I'm happy to report that this is now a little closer to being possible, now that this issue is fixed: #275926: Message retrieval library plugins (in order to avoid PHP IMAP dependency)

In order to make it work, you'd have to copy MailhandlerPhpImapRetrieve.class.php and adapt it to use MAPI instead of the PHP IMAP library.

pvanerk’s picture

Hi Dane,

Thanks for the info! I will have a look at it.

Dane Powell’s picture

Component: Code » Mailhandler
Status: Active » Postponed

I think work on this should probably wait for #1042112: PHP IMAP alternative... there may be some good lessons to be learned in that process that will be easier to learn on an IMAP rather than MAPI library. Baby steps, you know. :)

Dane Powell’s picture

Issue summary: View changes
Parent issue: » #1042112: PHP IMAP alternative
Dane Powell’s picture

Status: Postponed » Closed (won't fix)
Dane Powell’s picture

I'm happy to review a patch for this but I'm not going to be the one developing it.