Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have users in external database. So far - ssh, postfix, dovecot and some others - use entries with no problem.
I have Maildirs inside /home/[user] and if the homedir exists - everything is ok - sending, receiving.
If homedir does not exist Postfix/Dovecot prints error, ssh - after login results in brand new homedir made - it uses entry in /etc/pam.d/[in few files].

Postfix/Dovecot - successfully use pam.d with database backend but ignores entries with pam_mkhomedir - I have read a lot of hints in which file and on what position place it.
Maybe it's a matter of nameing file /etc/pam.d/[file] ??

share|improve this question
It is very hard to understand what you want. Can you give more informations and examples? You are only telling "it does not work". – mailq Nov 17 '11 at 19:59
I want Postfix be able to create homedirs for the users. – Arek B. Nov 17 '11 at 20:31
up vote 2 down vote accepted

Postfix is not responsible for creating home directories. Postfix assumes that the home directories already exist when using the built-in local delivery agent.

If you instead use Dovecot as the LDA then Dovecot also relies on the fact that the home directory exists.

With virtual users you can set the variable lda_mailbox_autocreate = yes so that Dovecot automatically creates the necessary directories.

And as Dovecot (and Postfix) do not "log-in" a user for mail delivery, the pam_mkhomedir never gets triggered. PAM is only used for authentication in this case.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.