On Fri, Jan 03, 2003 at 12:33:00PM +0000, Sven Geggus wrote:
> I'm about to setup an Email system using exim and courier-imap.
> 
> This works fine so far, with one notable exeption.
> 
> I would like to be able to use courier-authdaemon for SMTP-auth.

Hmm, not tried that. In most cases you can configure exim to do the
authentication itself: using ${lookup dbmnz} you can read userdb.dat, using
${lookup ldap} you can query an LDAP database, etc.

However, exim-4.12 has the ability to send a string to a socket and read
back the response, using the ${readsocket} expansion: see point 23 in
doc/NewStuff. If you can work out the authdaemond protocol then you could
just do this directly. Judging by the source, it looks to be something like
this:

AUTH len\n<len-bytes>

where <len-bytes> are service\nauthtype\nauthdata...
                  eg. service\nlogin\nusername\npassword\n

And in fact the following works for me:

# exim -be '${readsocket{/var/courier-imap/authdaemon/socket}{AUTH 
41\nexim\nlogin\[EMAIL PROTECTED]\ntesting\n}}'
[EMAIL PROTECTED]
UID=90
GID=90
HOME=/mail/0/6/37/30/brian%tst.example.com/
[EMAIL PROTECTED]
MAILDIR=/mail/0/6/37/30/brian%tst.example.com/
QUOTA=10000000S
.

(the response is FAIL for a bad login)

However, I don't think there's an operator to give the decimal length of a
string, so you'd probably still need to use Perl to assemble the AUTH string
before stuffing it down the socket.

I do love the flexibility of exim so much: almost anything is possible with
a string expansion :-)

Regards,

Brian.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to