-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 9 Nov 2009, Frank Bonnet wrote:

Is it possible to activate home directories auto creation when using
real UNIX users ( NIS ) on the dovecot server ?

Well, you can use post-login scripting to run thing along the lines of:

#!/bin/bash

error () {
        logger ....
        exit 1
}

if ! test -d "$HOME"; then
        sudo mkdir "$HOME" || error
        sudo chown "$USER" "$HOME" || error
        cp -r /etc/skel/* /etc/skel/.??* "$HOME" || error
fi

exec /usr/local/libexec/dovecot/imap "$@"


See: http://wiki.dovecot.org/PostLoginScripting esp.:

"WARNING: The process still runs as root at this point! The privileges are dropped only after the imap process starts. You can change this by setting mail_drop_priv_before_exec=yes."

Bye,

- -- Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBSvf63XWSIuGy1ktrAQI23gf8DnLI/8SnM+IGRIbap5opIs5pmFWgOXmU
apahr3h2giNNPiC9A1z5V3xLdRBk8yDDriLq1Ce5Ovm4P+oVB/sxhZ1/8/ZHxi8d
IETYpHLdZnWA2VQheY+ghpDD73AHlOa0BFy7llsF1qJufw4Yg7+OPst5S+XBmkw+
kWO11CiJbgLtEQcna7VTkXnpkE7hX9d1Nw6bQq94BjrOqyH8ApnC3htWKsPC5LfY
CMiyzqf3TEZOyglkfcLcpfcL1wNGKr6bjDlS0tk0qn+Cqwk4tjRkUInmWvqGGQnP
u+7+jJQ1jUap6Rd+9HSSUw6GL/PDmdTSiomNG3Cs+PWC7CUMM3XxPw==
=gDHX
-----END PGP SIGNATURE-----

Reply via email to