On Fri, Jan 03, 2003 at 02:25:08PM +0000, Brian Candler wrote:
> 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 found a way around this. authdaemond doesn't seem to mind additional
newlines after the end of the request, so you just pad out the request with
newlines at the end and then truncate to a fixed size: e.g.
# exim -be '${readsocket{/var/courier-imap/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}}}'
Here, I have added 64 newlines at the end, giving a minimum length of
5 exim\n
6 login\n
1 \n between username and password
64 trailing \n
--
76
and it works correctly as long as the total length of username and password
is not more than 64 characters.
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