Nunzio Falcone
2013-Mar-07 11:27 UTC
[Dovecot] When dovecot delivery, nested maildir (<user>/maildir/maildir) is "auto"created
Scenario: Sogo/Mysql+Postfix+Dovecot(only IMAP)+LDAP (Active Directory) To make clean the understand of my issue I've performed those step go to /var/vmail/utente2 and perform in this directory "rm -rf *" 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 the relevant part of telnet session is: Mar 05 19:53:17 auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth Mar 05 19:53:17 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so Mar 05 19:53:17 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so Mar 05 19:53:17 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so Mar 05 19:53:17 auth: Debug: auth client connected (pid=3286) 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 Mar 05 19:54:35 lda(utente2/maildir/@domain.local): Debug: none: root=, index=, control=, inboxMar 05 19:54:35 lda(utente2/maildir/@domain.local): Info: msgid=<20130305185423.6E56B407B6 at posta.domain.local>: saved mail to INBOX NB: note the wrong path of inbox inbox=/var/vmail/utente2/maildir//maildir From SOGO when I login the "autocreate" work well: in root folder of "utente2" I can see |-maildir |-cur |-new |-tmp But if I send email from SOGO frontend, same error of "telnetting" *What is wrong in my config?* dovecot -n # 2.0.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-279.el6.x86_64 x86_64 CentOS release 6.3 (Final) ext4 auth_debug = yes auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@/ auth_username_format = %Lu first_valid_gid = 500 last_valid_gid = 500 last_valid_uid = 500 log_path = /var/log/dovecot mail_debug = yes mail_location = maildir:/var/vmail/%n/maildir mbox_write_locks = fcntl passdb { driver = pam } postmaster_address = administrator at domain.local protocols = imap service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-userdb { group = vmail mode = 0600 user = vmail } } ssl = no ssl_cert = </etc/pki/dovecot/certs/dovecot.pem ssl_key = </etc/pki/dovecot/private/dovecot.pem userdb { args = uid=500 gid=500 home=/var/vmail/%Lu allow_all_users=yes driver = static } valid_chroot_dirs = /var/vmail /etc/postfix/master.cf (relevant) # Dovecot LDA dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient} /etc/postfix/ldap-groups.cf server_host = domain.local search_base = CN=users,DC=domain,DC=local bind = yes bind_dn = query at domain.local bind_pw = ********** query_filter = (&(objectclass=group) (mail=%s)) leaf_result_attribute = mail special_result_attribute = member version = 3 -- *Nunzio Falcone* nunzio.falcone at gmail.com *Cell * +39 320 1167923 *Voip*+39 081 0117933 *Fax * +39 081 0113049
Steffen Kaiser
2013-Mar-07 13:42 UTC
[Dovecot] When dovecot delivery, nested maildir (<user>/maildir/maildir) is "auto"created
-----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//maildirWhen 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-----
Nunzio Falcone
2013-Mar-08 15:58 UTC
[Dovecot] When dovecot delivery, nested maildir (<user>/maildir/maildir) is "auto"created
Il 08/03/2013 09:44, Steffen Kaiser ha scritto:> #!/bin/bash > > ( date > echo arguments "$@" > id > /usr/libexec/dovecot/deliver "$@" > rc=$? > echo rc=$rc > exit $rc > ) >> /tmp/dovecot-lda-wrapper.$$.log 2>&1this is output Fri Mar 8 16:39:00 CET 2013 arguments -f domain at domain.local -d utente2/maildir/@nolanitalia.local uid=500(vmail) gid=500(vmail) groups=500(vmail) rc=0 the -d argument contains "/maildir"!!! what do you think of this? what postfix config to check? Thanx -- *Nunzio Falcone* nunzio.falcone at gmail.com *Cell * +39 320 1167923 *Voip*+39 081 0117933 *Fax * +39 081 0113049
Nunzio Falcone
2013-Mar-08 17:06 UTC
[Dovecot] When dovecot delivery, nested maildir (<user>/maildir/maildir) is "auto"created
Il 08/03/2013 16:58, Nunzio Falcone ha scritto:> Il 08/03/2013 09:44, Steffen Kaiser ha scritto: >> #!/bin/bash >> >> ( date >> echo arguments "$@" >> id >> /usr/libexec/dovecot/deliver "$@" >> rc=$? >> echo rc=$rc >> exit $rc >> ) >> /tmp/dovecot-lda-wrapper.$$.log 2>&1 > this is output > Fri Mar 8 16:39:00 CET 2013 > arguments -f domain at domain.local -d utente2/maildir/@nolanitalia.local > uid=500(vmail) gid=500(vmail) groups=500(vmail) > rc=0 > > the -d argument contains "/maildir"!!! > > what do you think of this? what postfix config to check?*SOLVED* modifyng /etc/postfix/ldap-users.cf (relevant) from query_filter = (&(objectclass=person) (mail=%s)) result_attribute = sAMAccountName version = 3 result_format=%s/Maildir/ to query_filter = (&(objectclass=person) (mail=%s)) result_attribute = sAMAccountName version = 3 *result_format=%s* ThankU for your support -- *Nunzio Falcone* nunzio.falcone at gmail.com *Cell * +39 320 1167923 *Voip*+39 081 0117933 *Fax * +39 081 0113049