[Dovecot] [checkpassword] I can't get a password from fd3

2009-01-12 Thread Durk Strooisma
Hi all, I'm trying to implement checkpassword authentication with a simple bash script. In some way I can't get the password from file descriptor 3. The start of script looks like this: #!/bin/bash read -d '\0' -r -u 3 USERNAME="${REPLY}" read -d '\0' -r -u 3 PASSWORD="${REPLY}" if [ -z "${

Re: [Dovecot] [checkpassword] I can't get a password from fd3

2009-01-12 Thread Durk Strooisma
> On Mon, 2009-01-12 at 18:31 +0100, Durk Strooisma wrote: >> #!/bin/bash >> >> read -d '\0' -r -u 3 > > Are you sure this is supposed to work? \0 character is an end-of-string > character in C language, and I wouldn't be surprised if read simply > d

Re: [Dovecot] [checkpassword] I can't get a password from fd3

2009-01-12 Thread Durk Strooisma
> On Mon, 2009-01-12 at 20:54 +0100, Durk Strooisma wrote: >> > On Mon, 2009-01-12 at 18:31 +0100, Durk Strooisma wrote: >> >> #!/bin/bash >> >> >> >> read -d '\0' -r -u 3 >> > >> > Are you sure this is supposed to work? \

Re: [Dovecot] [checkpassword] I can't get a password from fd3

2009-01-13 Thread Durk Strooisma
>> read -d '\0' -r -u 3 > You are missing the correct syntax to interpret backslash escapes here: > > read -d $'\0' -r -u 3 > > will work. Thanks a lot!! I was indeed missing the $ sign! And it is nicely documented here: http://www.gnu.org/software/bash/manual/bashref.html#ANSI_002dC-Quoting I n

Re: [Dovecot] [checkpassword] I can't get a password from fd3

2009-01-13 Thread Durk Strooisma
Thanks for the example and your info about fd4. Durk > Durk Strooisma wrote: >> Okay, thanks for verifying. What kind of scripting language would you >> suggest for checkpassword instead? > > Perl works for me. Extract from such script: > >use constant C

[Dovecot] Enforcing STARTTLS for all mechs while disabling imaps

2009-01-15 Thread Durk Strooisma
Hi all, Is there a way to enforce STARTTLS for all connections, regardless their authentication mechanism? disable_plaintext_auth only takes care of the auth conversation, but I would like to have all communication encrypted. As far as I can see, this would only be possible when using imaps and d

Re: [Dovecot] Enforcing STARTTLS for all mechs while disabling imaps

2009-01-15 Thread Durk Strooisma
> On 1/15/2009, Durk Strooisma (d...@kern.nl) wrote: >> As far as I can see, this would only be possible when using imaps and >> disabling imap. However, I would like to have the other way around; >> disabling imaps and using imap for all communication (with enforced >>

Re: [Dovecot] Enforcing STARTTLS for all mechs while disabling imaps

2009-01-15 Thread Durk Strooisma
> First you need to disable any ssl_listen in the protocol section: > > protocol imap { > listen = *:143 > # ssl_listen = *:993 > } > protocol pop3 { > listen = *:110 > #ssl_listen = *:995 > } > > Then set: > disable_plaintext_auth = yes > > That will give you the ability for users

Re: [Dovecot] Enforcing STARTTLS for all mechs while disabling

2009-01-15 Thread Durk Strooisma
Hi Timo, > Not possible currently. Okay. > Hmm. I don't want to add a new setting for this, but some existing one > could be updated/replaced.. Perhaps ssl_disable=required? Although that > sounds weird. Maybe deprecate that setting and have > ssl=yes/no/required. The setting "ssl" sounds fine.

Re: [Dovecot] Enforcing STARTTLS for all mechs while disabling

2009-01-16 Thread Durk Strooisma
> On Thu, 2009-01-15 at 17:10 +0100, Durk Strooisma wrote: >> Hi Timo, >> >> > Not possible currently. >> >> Okay. >> >> > Hmm. I don't want to add a new setting for this, but some existing >> > one could be updated/replaced.. Per