Re: [Exim] Possible FAQ entry: SMTP-auth with courier-authda…

Top Page
Delete this message
Reply to this message
Author: Mark Bergsma
Date:  
To: Sven Geggus
CC: exim-users
Subject: Re: [Exim] Possible FAQ entry: SMTP-auth with courier-authdaemon
Sven Geggus wrote:

> I think that this is something which should probably be added to the FAQ,
> since many People are using Courier IMAP in conjunction with the Exim-Mailer
> to set up a complete email server solution.


> Probably a more elegant way to solve this Problem would be the use of
> embedded perl, which would allow to remove the \n hack.


How about these:

COURIERSOCKET=/var/run/courier/authdaemon/socket

plain:
         driver = plaintext
         public_name = PLAIN
         server_prompts = :
         server_condition = ${if eq{${readsocket{COURIERSOCKET}{AUTH
${eval:13${sg{$2$3}{.}{+1}}}\nexim\n\login\n$2\n$3\n}{5s}{ }{FAIL
}}{FAIL }{no}{yes}}
         server_set_id = $2


login:
         driver = plaintext
         public_name = LOGIN
         server_prompts = Username:: : Password::
         server_condition = ${if eq{${readsocket{COURIERSOCKET}{AUTH
${eval:13${sg{$1$2}{.}{+1}}}\nexim\n\login\n$1\n$2\n}{5s}{ }{FAIL
}}{FAIL }{no}{yes}}
         server_set_id = $1


I used the new ${eval: } operator in cooperation with ${sg } to
calculate the string length. It still is a dirty hack, ofcourse. :)

Philip, I think we need a ${strlen: }... ;-)

--
Mark

mark@???