<div dir="ltr">I want to be able to provide the absolute path to the user&#39;s INBOX. &nbsp;<div><br></div><div>I should probably share a little background information about this project.</div><div><br></div><div>I&#39;ve got a unified messaging system (voicemail) which stores files in a Maildir-like structure. &nbsp;It lends itself pretty easily to using an IMAP server to fetch messages. &nbsp;Our UM client has IMAP built into it and in fact this is how it is working today with the vendor&#39;s system which we are trying to replace.&nbsp;</div>
<div><br></div><div>Quite simply, there&#39;s a plain text username and password stored in the database. &nbsp;I&#39;ve already got a very simple C program written which is linked to libmysqlclient which connects to the database and fetches the username and password as would be presented to it if the IMAP client had sent something along the lines of:</div>
<div><br></div><div>a01 LOGIN <a href="mailto:1234567890@um01.telcentris.net">1234567890@um01.telcentris.net</a> &lt;password&gt;</div><div><br></div><div>I know very little about cyrus IMAP or cyrus SASL; however, the current vendor&#39;s system uses both to do this very function. &nbsp;</div>
<div><br></div><div>So, if I understand the plugproc documentation correctly, I could either</div><div><br></div><div>A) Write an auxprop plugin to simply provide SASL with the information I have fetched and allow it to do the authentication bits</div>
<div><br></div><div>or</div><div><br></div><div>B) write a server plugin to handle both.</div><div><br></div><div>-Daniel</div><div><br></div><div><div class="gmail_quote">On Fri, Oct 10, 2008 at 2:14 PM, Dan White <span dir="ltr">&lt;<a href="mailto:dwhite@olp.net">dwhite@olp.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Daniel,<br>
<br>
You have several options. I assume you&#39;ve looked in to the SQL auxprop plugin and determined that it is not sufficient for your needs.<br>
<br>
You can write a custom auxprop plugin to retrieve your authentication information from. You cannot (by design) have your auxprop plugin perform the actual authentication itself, but you can store usernames and passwords (in the clear). Auxprop plugins function like a database store.<br>

<br>
You can write a custom saslauthd backend to perform the authentication. Saslauthd gets passed the username and password and essentially returns a yes or no to the server application. Stored passwords don&#39;t need to be in the clear and can be hashed, as long as your backend has enough knowledge to verify the submitted password against it. Using this approach limits the number of authentication mechanisms that your IMAP server can offer to clients. You won&#39;t be able to offer more complex mechanisms, such as DIGEST-MD5, that require a known shared secret.<br>

<br>
The SQL auxprop plugin might be a good plugin to base your&#39;s on.<br>
<br>
What information are you wanting to provide the IMAP server with regards to its location? The name of the mailbox?<br>
<br>
- Dan<br>
<br>
<br>
Daniel Corbe wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="Ih2E3d">
Can you quickly give me a hit of where I need to start?<br>
<br>
I simply want to be given a username and password, that I can do a database query and acknowledge whether it is correct or not and then provide some basic information to the IMAP server to tell it where the user&#39;s INBOX is located, etc.<br>

<br>
Would I need to write a sasl server plugin or an auxprop plugin for this?<br>
<br>
-Daniel<br>
<br></div><div class="Ih2E3d">
On Tue, Sep 30, 2008 at 1:28 PM, Dan White &lt;<a href="mailto:dwhite@olp.net" target="_blank">dwhite@olp.net</a> &lt;mailto:<a href="mailto:dwhite@olp.net" target="_blank">dwhite@olp.net</a>&gt;&gt; wrote:<br>
<br>
 &nbsp; &nbsp;Daniel Corbe wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 &nbsp; &nbsp;Hi,<br>
<br>
 &nbsp; &nbsp;I was wondering if anyone could point me in a general direction<br>
 &nbsp; &nbsp;of writing a custom authentication plugin for SASL so I can get<br>
 &nbsp; &nbsp;Cyrus IMAP working off of my custom database.<br>
<br>
 &nbsp; &nbsp;Thanks.<br>
<br>
 &nbsp; &nbsp;-Daniel<br>
<br>
</blockquote>
<br>
 &nbsp; &nbsp;There is a short SASL Plugin Programmer&#39;s Guide, located in<br>
 &nbsp; &nbsp;/doc/plugprog.html within the source.<br>
<br>
 &nbsp; &nbsp;- Dan<br>
<br>
<br>
</div></blockquote>
<br>
</blockquote></div><br></div></div>