[Dovecot] Using sork-passwd from Horde to change dovecot password

Eduardo M KALINOWSKI eduardo at kalinowski.com.br
Sun Jun 22 00:57:58 EEST 2008


Eduardo M KALINOWSKI wrote:
>    I'm using in my server dovecot and Horde to provide IMAP and
> Webmail for virtual users. Their password are stored in a passwd file,
> since the setup is quite simple and small. I'd like to use the Horde
> module sork-passwd to allow changing of the passwords. Apparently,
> this can be done for the case of passwd file by using an expect
> script, or simply calling a program that receives the data.
>
>    It should not be hard to write a Perl (or Python, or whatever)
> script that does that. I'm just asking if someone has already done
> that and is willing to share the solution.
OK, since apparently nobody needed that before, here's a quick and dirty
solution. There is lots of room for improvement, but it Works For Me
(and My Setup). First, this goes in the passwd's backends.php:

$backends['dovecotpasswdfile'] = array(
    'name' => 'localhost',
    'password policy' => array(),
    'driver' => 'procopen',
    'params' => array(
        'program' => '/usr/local/bin/chdovecotpw'
    )
);

The script is attached. A big problem is that I had to pass the password
in the command-line, because dovecotpw seems to play tricks in order to
read the input, simply writing the password twice to its STDIN does not
seem to work.


-- 
Não deixe a escola atrapalhar seus estudos.

Eduardo M KALINOWSKI
eduardo at kalinowski.com.br
http://move.to/hpkb

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: chdovecotpw
Url: http://dovecot.org/pipermail/dovecot/attachments/20080621/4fcf38a9/attachment.pl 


More information about the dovecot mailing list