[Dovecot] Using checkpassword to block ips?

Timo Sirainen tss at iki.fi
Thu Jun 19 01:29:44 EEST 2008


On Sun, 2008-06-15 at 19:04 -0400, Larry Ludwig wrote:
> if ( $result == 0) {
>         @ENV{"SHELL","USER","HOME"} = ($shell,$user,$home);
>         exit 0;
> }
> else {
>         exit 1;
> }

1) If you want to allow the user, deny=yes passdb check must fail. So
exit with 1 in that case.

2) With deny=yes Dovecot doesn't care about shell or home. USER is most
likely also useless unless your check changes it.

3) If you want to block the user, the checkpassword must succeed. exit 0
doesn't mean success. You have to execute the checkpassword-reply binary
as specified by http://wiki.dovecot.org/PasswordDatabase/CheckPassword

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080619/a5d60291/attachment.bin 


More information about the dovecot mailing list