Subject: Newbie question - Integration with other email systems

From: Nick Birren <[email-masked]>
Date: Sun, 1 Feb 2004 10:17:30 -0800 (PST)

Hi
 
I'm trying to figure out what's the best way to connect to a proprietary-protocol email server and expose IMAP functionality. 
I do not wish to import all emails into a flat-file and feed it into the IMAP server, but rather integrate to it by implementing some pre-defined interface that the IMAP server will use (and will, on the other end, act as a client for the proprietary server).
 
Can it be done with WU IMAP? Any other ways that you think I should consider?
 
Any pointers to reading material / code sections to look at will be much appreciated.
 
-N

---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!

---

From: pheonix1t <[email-masked]>
Date: Sun, 01 Feb 2004 12:26:45 -0600

Nick Birren wrote:

> Hi
>  
> I'm trying to figure out what's the best way to connect to a 
> proprietary-protocol email server and expose IMAP functionality.
> I do not wish to import all emails into a flat-file and feed it into 
> the IMAP server, but rather integrate to it by implementing some 
> pre-defined interface that the IMAP server will use (and will, on the 
> other end, act as a client for the proprietary server).
>  
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. *Try it!* 
> <http://us.rd.yahoo.com/evt=21608/*http://webhosting.yahoo.com/ps/sb/> 

do you mean something like www.bynari.com ?

---

From: Mark Crispin <[email-masked]>
Date: Sun, 1 Feb 2004 10:57:49 -0800 (PST)

On Sun, 1 Feb 2004, Nick Birren wrote:
> proprietary-protocol email server and expose IMAP functionality.  I do
> not wish to import all emails into a flat-file and feed it into the IMAP
> server, but rather integrate to it by implementing some pre-defined
> interface that the IMAP server will use (and will, on the other end, act
> as a client for the proprietary server).

This certainly can be done, and relatively easily in UW (not "WU") IMAP.
What you need to do is write a c-client driver that is a client for your
proprietary-protocol email server.  That way, imapd would be a client of
your proprietary-protocol email server; just as imapd can be a client of a
POP3, NNTP, or another IMAP server today.

The tricky thing is deciding how to pass authentication credentials from
the end user to your proprietary-protocol email server.  There's code now
to pass the same userid and password as was used to log in to the IMAP
server, but perhaps you might want to do something better than that.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

---

From: Nick Birren <[email-masked]>
Date: Sun, 1 Feb 2004 11:30:38 -0800 (PST)

Cool. Any recommended reading material for writing c-client drivers?
 
Thanks
-Nick

Mark Crispin <[email-masked]> wrote:

-- Mark --

---

From: Mark Crispin <[email-masked]>
Date: Sun, 1 Feb 2004 11:46:36 -0800 (PST)

> Cool. Any recommended reading material for writing c-client drivers?

I would start with using the latest sources (imap-2004 RC6) instead of
the release version (imap-2002e).

Inside the imap-2004/docs/ directory there is a file called internal.txt
which contains some information about c-client programming.  Look towards
the end under "Driver Interface".  Note that this document was written in
1996 and so should be used as a guideline to understand rather than an
authoritative reference.

Also, look at how existing drivers work.  I suggest looking at the NNTP,
POP3, and IMAP drivers.  Note how some methods are mandatory-to-implement
while others are not; e.g. open is a mandatory method, but search is not.

Sometimes, you have a choice of which method(s) to implement.  For
example, the IMAP driver implements the msgdata method but not header or
text, whereas the other drivers implement header and text but not msgdata.
This is because the IMAP server does message parts, whereas in other
drivers c-client has to do it internally.

There's a bit of a steep learning curve, which is why I recommend looking
at how existing drivers work.  The good news is that once you climb that
curve it's a fairly straightforward task to do the job.

-- Mark --