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

On Thu, 7 Mar 2013, Nunzio Falcone wrote:

After I send email to utente2 via "telenet localhost 25"

I return to /var/vmail/utente2 and perform "ls -la" that shows me:
maildir
|-maildir
   |-cur
   |-new
   |-tmp

but the expected results was
|-maildir
  |-cur
  |-new
  |-tmp

Mar 05 19:54:35 auth: Debug: master in: USER    1 utente2/maildir/@domain.local 
     service=lda
Mar 05 19:54:35 auth: Debug: master out: USER   1  
utente2/maildir/@domain.local      uid=500 gid=500 
home=/var/vmail/utente2/maildir/@domain.local
Mar 05 19:54:35 lda: Debug: auth input: utente2/maildir/@domain.local uid=500  
gid=500 home=/var/vmail/utente2/maildir/@domain.local
Mar 05 19:54:35 lda(utente2/maildir/@domain.local): Debug: Effective uid=500,  
gid=500, home=/var/vmail/utente2/maildir/@domain.local
Mar 05 19:54:35 lda(utente2/maildir/@domain.local): Debug: Home dir not found: 
/var/vmail/utente2/maildir/@domain.local
Mar 05 19:54:35 lda(utente2/maildir/@domain.local): Debug: maildir++: 
root=/var/vmail/utente2/maildir//maildir, index=, control=, 
inbox=/var/vmail/utente2/maildir//maildir

When I interprete lines 1 and 2 correctly, you pass 
"utente2/maildir/@domain.local" as username to Dovecot.
Line 3 evaluates your homedir using "%Lu" correctly, 6th line is using "%n" 
variable, which resembles to
"utente2/maildir/"; there you get the double "maildir//maildir" - note the double /, too, one from the username, one from the mail_location pattern.

For some reason, I do not know, you allow "/" in usernames, hence, they gets 
passed to the
path of homedir and mail location.

The only question now is, do you really send the message to:
utente2/maildir/@domain.local

or does Postfix mangles the recipient in some way?

Via SoGo you do logon with utente2 instead of "utente2/maildir/@domain.local", hence, there is just one "maildir" autocreated, because "%n" is substituted by "utente2" instead of "utente2/maildir/".

From SOGO when I login the "autocreate" work well: in root folder of "utente2" I can see
|-maildir
  |-cur
  |-new
  |-tmp

mail_location = maildir:/var/vmail/%n/maildir
userdb {
 args = uid=500 gid=500 home=/var/vmail/%Lu allow_all_users=yes

dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

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

iQEVAwUBUTiZW13r2wJMiz2NAQLdYwgAkNu9/d2P0EKvi5PnygDRQaT30I4hbfTg
lPfHuO3Zl+B3d87VjOwMC1cq240YHjQoOTQhOBaiCFy1FnlPy5sH8ocPeqZLvTYb
4R27oTt9/o4i+mhGKwzDTYZ69qDdCEzZ+vUYbcrlyU2DAvnj+oo3pEgYDd6acFDf
hDxqJssg6mv0xfk/F6jXjLGXOQ7wEjf4UixW/hQReSPaTzDZE5ZhOJ5938tjYE5s
tHIzioszyyxPwlaK/3U7HC40W6ixzmcbO7qH4NLs4OiZqCJhytSs3lqlemb9eznL
35pw/8L8U0T2zCnmuHL8gtDAmt2SeDhMqmOxjkxOCd0t1V71Z5uvpA==
=9Nai
-----END PGP SIGNATURE-----

Reply via email to