Re: [Exim] smtp auth via courier-imap authdaemon

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Derrick
Ημερομηνία:  
Προς: jonathan vanasco
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] smtp auth via courier-imap authdaemon
On Mon, 29 Mar 2004, jonathan vanasco wrote:

> I'm trying this out. Things aren't working so well.
>
> The exim FAQ suggests this hack:
>
>
>     login:
>       driver = plaintext
>       public_name = LOGIN
>       server_prompts = Username:: : Password::
>       server_condition = \
>         ${if eq {${readsocket{/var/run/courier/authdaemon/socket}\
>         {AUTH 76\n${length_76:exim\nlogin\n$1\n$2\
>         \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\
>         \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\
>         \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n}}}}{FAIL\n} {no}{yes}}
>       server_set_id = $1

>
> That didn't work out of the box. Surprise.
>
> I realized that courier 3.0.2 changed things to:
>     /var/run/authdaemon.courier-imap/socket

>
> So I tried that change too.
>
> No Luck.
>
> Anyone have this going?


From someone off this list I am using the following, only need to watch
the perms on the file.

begin authenticators


login:
driver = plaintext
    public_name = LOGIN
    server_advertise_condition = ${if eq{$tls_cipher}{}{no}{yes}}
    server_prompts = Username:: : Password::
    server_condition = \
        ${if eq {${readsocket{/usr/local/var/authdaemon/socket}\
        {AUTH ${strlen:exim\nlogin\n$1\n$2\n}\nexim\nlogin\n$1\n$2\n}}}\
        {FAIL\n} {no}{yes}}
    server_set_id = $1


plain:
  driver = plaintext
  public_name = PLAIN
  server_advertise_condition = ${if eq{$tls_cipher}{}{no}{yes}}
  server_condition = \
        ${if eq {${readsocket{/usr/local/var/authdaemon/socket}\
        {AUTH ${strlen:exim\nlogin\n$2\n$3\n}\nexim\nlogin\n$2\n$3\n}}}\
        {FAIL\n} {no}{yes}}
  server_set_id = $2