[Dovecot] Dovecot 2.2.4 does not create home directory?

Dmitry . rcpt.dmitry at gmail.com
Wed Jul 17 15:32:55 EEST 2013


Hi,

Does not create, or something I did wrong?

Here
http://wiki2.dovecot.org/VirtualUsers/Home
it is written

Home vs. mail directory
Home directory shouldn't be the same as mail directory. It's possible to do
that, but you might run into trouble with it sooner or later. Some problems
with this are:

and

Ways to set up home directory
The home directory is the same as the mail directory.
If for example home=/var/vmail/domain/user/
mail=/var/vmail/domain/user/mail/, set:
mail_home = /var/vmail/%d/%n
mail_location = maildir:~/mail

I think I've done it so.

And yet, here
http://wiki.dovecot.org/HowTo/SimpleVirtualInstall
it is written
Users can be added by editing this file. Dovecot automatically notices the
new users immediately after they're added. It also creates their home
directories when the user logs in.

However, the directory is not created.

My config:

# dovecot -n
# 2.2.4: /etc/dovecot/dovecot.conf
# OS: Linux 3.9.6 x86_64 Slackware 14.0
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain login digest-md5 cram-md5 rpa apop
auth_verbose = yes
auth_verbose_passwords = plain
debug_log_path = /var/log/dovecot/dovecot.debug.log
disable_plaintext_auth = no
info_log_path = /var/log/dovecot/dovecot.info.log
lda_mailbox_autocreate = yes
listen = 192.168.1.1
log_path = /var/log/dovecot/dovecot.log
mail_debug = yes
mail_gid = dovecot
mail_uid = dovecot
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags
copy include variables body enotify environment mailbox date ihave
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox Spam {
    auto = subscribe
    special_use = \Junk
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  antispam_allow_append_to_spam = NO
  antispam_backend = dspam
  antispam_debug_target = syslog
  antispam_dspam_args = --user;%Lu;--deliver=;--source=error;--signature=%%s
  antispam_dspam_binary = /usr/bin/dspam
  antispam_dspam_notspam = --class=innocent
  antispam_dspam_result_blacklist = Virus;Blocklisted;Blacklisted
  antispam_dspam_result_header = X-DSPAM-Result
  antispam_dspam_spam = --class=spam
  antispam_signature = X-DSPAM-Signature
  antispam_signature_missing = move
  antispam_skip_from_line = NO
  antispam_spam = Spam;spam;SPAM;Junk;junk;JUNK;
  antispam_trash = Trash;trash;Deleted;deleted;Deleted Items;Deleted
Messages;
  antispam_verbose_debug = 1
  sieve = ~/.dovecot.sieve
  sieve_default = /etc/dovecot/sieve/default.sieve
  sieve_dir = ~/sieve
  sieve_global_dir = /etc/dovecot/sieve/
}
protocols = imap pop3 lmtp sieve
service lmtp {
  inet_listener lmtp {
    address = 127.0.0.1
    port = 24
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}
ssl_cert = </etc/dovecot/ssl/key.pem
ssl_key = </etc/dovecot/ssl/key.pem
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
verbose_ssl = yes
protocol lmtp {
  mail_plugins = " sieve"
}
protocol lda {
  mail_plugins = " sieve"
}
protocol imap {
  mail_max_userip_connections = 15
  mail_plugins = " antispam"
}
protocol imaps {
  mail_max_userip_connections = 15
  mail_plugins = " antispam"
}


# grep -v '^ *\(#.*\)\?$' dovecot-sql.conf
driver = pgsql
connect = host=localhost dbname=dbname user=user password=password
default_pass_scheme = PLAIN
password_query = SELECT password FROM users WHERE email = '%u' AND enabled
= 1
user_query = SELECT \
concat('/var/spool/vmail/', home) AS home, \
concat('maildir:', maildir) AS mail \
FROM users WHERE email = '%u' AND enabled = 1

where in db
home = "example.com/test/"
maildir = "Maildir/"

/etc/passwd
dovecot:x:1202:202:Dovecot:/dev/null:/bin/bash
dovenull:x:1203:203:Dovenull:/dev/null:/bin/false

/etc/group
dovecot:x:202:
dovenull:x:203:

cd /var/spool
# ls -l
drwxrwxr-x 4 dovecot dovecot  4096 Jul 17 12:41 vmail


/var/log/dovecot/dovecot.debug.log

Jul 17 12:49:41 auth: Debug: Loading modules from directory:
/usr/lib64/dovecot/auth
Jul 17 12:49:41 auth: Debug: Read auth token secret from
/var/run/dovecot/auth-token-secret.dat
Jul 17 12:49:41 auth: Debug: auth client connected (pid=10501)
Jul 17 12:49:41 auth: Debug: client in: AUTH    1       CRAM-MD5
service=imap    session=RONGFqLhrgDAqAPO        lip=192.168.1.1
rip=192.168.1.2      lport=143       rport=50094
Jul 17 12:49:41 auth: Debug: client passdb out: CONT    1
PDk3MDcyMzA1OTYxMTU0MzguMTM3Mzk4NjE4MUBtYWlsPg==
Jul 17 12:49:41 auth: Debug: client in: CONT    1
dGVzdEBoYXJkcmV2aWV3LnJ1IDFhOTE0NDBmZDk1OGE5ZWI0MWVkN2Q4ZDdhOGIzNzFi
(previous base64 data may contain sensitive data)
Jul 17 12:49:41 auth: Debug:
sql(test at example.com,192.168.1.2,<RONGFqLhrgDAqAPO>):
query: SELECT password FROM users WHERE email = 'test at example.com' AND
enabled = 1
Jul 17 12:49:41 auth: Debug:
password(test at example.com,192.168.1.2,<RONGFqLhrgDAqAPO>):
Generating CRAM-MD5 from user 'test at example.com@', password 'test'
Jul 17 12:49:41 auth: Debug:
password(test at example.com,192.168.1.2,<RONGFqLhrgDAqAPO>):
Credentials:
6062bc903ac97de43f0b5d33ebe8c1a63bb9ae1a88ec39cf6fd85a645de8c63a
Jul 17 12:49:41 auth: Debug: client passdb out: OK      1       user=
test at example.com

Jul 17 12:49:41 auth: Debug: master in: REQUEST 2206334977      10501
1       49e1fcdcc5e1c2becb50c3b47d31cdeb        session_pid=10506
Jul 17 12:49:41 auth: Debug:
sql(test at example.com,192.168.1.2,<RONGFqLhrgDAqAPO>):
SELECT concat('/var/spool/vmail/', home) AS home, concat('maildir:',
maildir) AS mail FROM users WHERE email = 'test at example.com' AND enabled = 1
Jul 17 12:49:41 auth: Debug: master userdb out: USER    2206334977
test at example.com      home=/var/spool/vmail/example.com/test/
mail=maildir:Maildir/  auth_token=670c839af976e3c0c74db1754e28ff40a2557095
Jul 17 12:49:41 imap: Debug: Loading modules from directory:
/usr/lib64/dovecot
Jul 17 12:49:41 imap: Debug: Module loaded:
/usr/lib64/dovecot/lib90_antispam_plugin.so
Jul 17 12:49:41 imap: Debug: Added userdb setting: mail=maildir:Maildir/
Jul 17 12:49:41 imap(test at example.com): Debug: Effective uid=1202, gid=202,
home=/var/spool/vmail/example.com/test/
Jul 17 12:49:41 imap(test at example.com): Debug: Home dir not found:
/var/spool/vmail/example.com/test/
Jul 17 12:49:41 imap(test at example.com): Debug: Namespace inbox:
type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes,
subscriptions=yes location=maildir:Maildir/
Jul 17 12:49:41 imap(test at example.com): Debug: maildir++: root=Maildir,
index=, indexpvt=, control=, inbox=Maildir, alt=
Jul 17 12:49:41 imap(test at example.com): Debug: Namespace : Maildir doesn't
exist yet, using default permissions
Jul 17 12:49:41 imap(test at example.com): Debug: Namespace : Using
permissions from Maildir: mode=0700 gid=default



Thank you!

Regards,
Dmitry


More information about the dovecot mailing list