[Dovecot] Shared folders, please help.!
Hello all, First of all sorry for this, it has been discussed many times, but i can not make it work.
I tried for a long time now. I do something wrong, but i do not know what.
First of all, i have virtual users, with virtual domains. Mail is stored in /usr/local/virtual/domain name/user
So if my domain is domain.com and my e-mail address is johan@domain.com the directory is /usr/local/virtual/domain.com/johan
i followed the wiki, and my configuration looks like the following.
beasty dovecot # dovecot -n
# 2.0.5: /usr/local/etc/dovecot/dovecot.conf # OS: FreeBSD 8.1-STABLE amd64 ufs auth_debug = yes auth_debug_passwords = yes auth_mechanisms = plain login auth_verbose = yes dict { acl = mysql:/usr/local/etc/dovecot/dovecot-dict-acl-sql.conf quotadict = mysql:/usr/local/etc/dovecot/dovecot-dict-quota.conf } disable_plaintext_auth = no first_valid_gid = 1004 first_valid_uid = 1004 last_valid_gid = 1004 last_valid_uid = 1004 log_timestamp = .%Y-%m-%d %H:%M:%S . mail_access_groups = vmail mail_debug = yes mail_gid = 1004 mail_location = maildir:/usr/local/virtual/%d/%n mail_uid = 1004 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 mbox_write_locks = fcntl namespace { hidden = no inbox = yes list = yes location = prefix = separator = / subscriptions = yes type = private } namespace { inbox = no list = children location = maildir:/usr/local/virtual/%%d/%%n/shared/:INDEX=/shared/%%n prefix = shared/%%d/%%u/ separator = / subscriptions = no type = shared } passdb { args = /usr/local/etc/dovecot/dovecot-mysql.conf driver = sql } plugin { acl = vfile acl_anyone = allow acl_shared_dict = proxy::acl autocreate = Trash autocreate2 = Junk autocreate3 = Sent autocreate4 = Drafts autocreate5 = Templates autosubscribe = Trash autosubscribe2 = Junk autosubscribe3 = Sent autosubscribe4 = Drafts autosubscribe5 = Templates quota = dict:::proxy::quotadict quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95 quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80 } protocols = imap pop3 service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-master { group = vmail mode = 0660 user = vmail } } service dict { unix_listener dict { mode = 0600 user = vmail } } service imap-login { inet_listener imap { address = 192.168.50.200 port = 143 } } service pop3-login { inet_listener pop3 { address = 192.168.50.200 port = 110 } } ssl = no userdb { args = /usr/local/etc/dovecot/dovecot-mysql.conf driver = sql } protocol imap { imap_client_workarounds = delay-newmail tb-extra-mailbox-sep imap_idle_notify_interval = 2 mins imap_logout_format = bytes=%i/%o imap_max_line_length = 64 k mail_plugins = quota imap_quota autocreate acl imap_acl mail_log notify } protocol pop3 { mail_plugins = quota trash pop3_client_workarounds = outlook-no-nuls oe-ns-eoh pop3_uidl_format = %08Xu%08Xv } protocol lda { auth_socket_path = /var/run/dovecot/auth-master mail_plugins = quota acl mail_log notify postmaster_address = postmaster@test.com sendmail_path = /usr/local/sbin/sendmail }
That is my config file. My dovecot-dict-acl-sql.conf looks like the following
connect = host=localhost dbname=postfix user=postfix password=password
map { pattern = shared/shared-boxes/$to/$from table = user_shares value_field = dummy
fields { from_user = $from to_user = $to } }
That is slightly different than the wiki says, if i use that , it gives me an error. the pattern on the wiki looks like this pattern = shared/shared-boxes/users/$to/$from
if i login as user johan and set ACL on my INBOX i do it this way. i telnet to the server and issue the following
beasty dovecot # telnet 192.168.50.200 143 Trying 192.168.50.200... Connected to beasty.localdomain.local. Escape character is '^]'.
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] imap, pop ready a login johan@domain.com mypass a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS QUOTA ACL RIGHTS=texk] Logged in b SETACL INBOX hans@domain.com lr b OK Setacl complete. c GETACL INBOX
- ACL "INBOX" "hans@domain.com" lr "johan@domain.com" lrwstipekxacd c OK Getacl completed.
This looks good i guess, also my database is filled, with the from and to !
But i can not see the mailbox if i login as user hans.
beasty dovecot # telnet 192.168.50.200 143 Trying 192.168.50.200... Connected to beasty.localdomain.local. Escape character is '^]'.
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] imap, pop ready a login hans@domain.com hanspass a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS QUOTA ACL RIGHTS=texk] Logged in b list "" *
- LIST (\HasNoChildren) "/" "Trash"
- LIST (\HasNoChildren) "/" "Junk"
- LIST (\HasNoChildren) "/" "Sent"
- LIST (\HasNoChildren) "/" "Drafts"
- LIST (\HasNoChildren) "/" "Templates"
- LIST (\HasNoChildren) "/" "INBOX" b OK List completed. c list "" /shared/* c OK List completed.
If been trying this for a very long time now, but can not see what i am missing. It must be something i ovelook, but i really can not find out what.
I also tried some other configs from the mailing list, but still the same, no go.
Thank you for your time to help another one with this issue. i am a little ashamed :D
regards, Jo
On Mon, 2010-10-11 at 17:11 +0200, Johan Hendriks wrote:
a login johan@domain.com mypass b SETACL INBOX hans@domain.com lr .. c list "" /shared/*
c list "" shared/*
Also see what happens with:
d list "" shared/domain.com/johan/* e select shared/domain.com/johan/INBOX
2010/10/14 Timo Sirainen <tss@iki.fi>
On Mon, 2010-10-11 at 17:11 +0200, Johan Hendriks wrote:
a login johan@domain.com mypass b SETACL INBOX hans@domain.com lr .. c list "" /shared/*
c list "" shared/*
Also see what happens with:
d list "" shared/domain.com/johan/* e select shared/domain.com/johan/INBOX
telnet 192.168.50.200 143 Trying 192.168.50.200... Connected to beasty.localdomain.local Escape character is '^]'. thanks for your time on this.
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready. a login hans@domain.com hanspass a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS QUOTA ACL RIGHTS=texk] Logged in d list "" shared/domain.com/johan/* d OK List completed. e select shared/domain.com/johan/INBOX e NO Character not allowed in mailbox name: '.'
I am overlooking something, but i really do not know what
regards, Johan Hendriks
On Thu, 2010-10-14 at 19:40 +0200, Johan Hendriks wrote:
e select shared/domain.com/johan/INBOX e NO Character not allowed in mailbox name: '.'
This looks as if it's not even seeing the shared namespace. What does it log with mail_debug=yes?
namespace { inbox = no list = children location = maildir:/usr/local/virtual/%%d/%%n/shared/:INDEX=/shared/%%n prefix = shared/%%d/%%u/
Also the :INDEX= path is now identical for two users in different domains. You should use %%u or %%d/%%n there as well.
2010/10/14 Timo Sirainen <tss@iki.fi>:
On Thu, 2010-10-14 at 19:40 +0200, Johan Hendriks wrote:
e select shared/domain.com/johan/INBOX e NO Character not allowed in mailbox name: '.'
This looks as if it's not even seeing the shared namespace. What does it log with mail_debug=yes?
namespace { inbox = no list = children location = maildir:/usr/local/virtual/%%d/%%n/shared/:INDEX=/shared/%%n prefix = shared/%%d/%%u/
Also the :INDEX= path is now identical for two users in different domains. You should use %%u or %%d/%%n there as well.
Ok i did the following.
edit the dovecot.conf file also the dovecot-dict-acl.sql file.
telnet 192.168.50.200 143 Trying 192.168.50.200... Connected to beasty.localdomain.local. Escape character is '^]'.
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready. a login johan@domain.com a BAD Error in IMAP command received by server. a login johan@domain.com johanpass a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS QUOTA ACL RIGHTS=texk] Logged in b DELETEACL INBOX hans@domain.com b OK Deleteacl complete. c GETACL INBOX
- ACL "INBOX" "johan@domain.com" lrwstipekxacd c OK Getacl completed. d SETACL INBOX hans@domain.com lr d OK Setacl complete. e GETACL INBOX
- ACL "INBOX" "hans@domain.com" lr "johan@domain.com" lrwstipekxacd e OK Getacl completed. ^C^] telnet> quit Connection closed.
Then i login as hans
telnet 192.168.50.200 143 Trying 192.168.50.200... Connected to beasty.localdomain.local. Escape character is '^]'.
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready. a login hans@domain.com hanspass a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS QUOTA ACL RIGHTS=texk] Logged in b list "" /shared/* b OK List completed. c list "" shared/domain.com/johan/* c OK List completed. d select shared/domain.com/johan/INBOX d NO Character not allowed in mailbox name: '.'
i got the following log in /var/log/maillog
Oct 14 19:56:56 beasty dovecot: dict: mysql: Connected to localhost (postfix) Oct 14 19:58:03 beasty dovecot: imap(johan@domain.com): Connection closed bytes=112/536 Oct 14 19:58:29 beasty dovecot: auth: mysql: Connected to localhost (postfix) Oct 14 19:58:29 beasty dovecot: imap-login: Login: user=<hans@domain.com>, method=PLAIN, rip=192.168.50.200, lip=192.168.50.200, mpid=6615, secured Oct 14 19:59:53 beasty dovecot: dict: Error: sql dict iterate: Invalid/unmapped path: shared/shared-boxes/anyone/ Oct 14 19:59:53 beasty dovecot: dict: mysql: Connected to localhost (postfix)
dovecot -n is now
- Tekst uit oorspronkelijke bericht weergeven -
2.0.5: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 8.1-STABLE amd64 ufs auth_debug = yes auth_debug_passwords = yes auth_mechanisms = plain login auth_verbose = yes dict { acl = mysql:/usr/local/etc/dovecot/dovecot-dict-acl-sql.conf quotadict = mysql:/usr/local/etc/dovecot/dovecot-dict-quota.conf } disable_plaintext_auth = no first_valid_gid = 1004 first_valid_uid = 1004 last_valid_gid = 1004 last_valid_uid = 1004 log_timestamp = .%Y-%m-%d %H:%M:%S . mail_access_groups = vmail mail_debug = yes mail_gid = 1004 mail_location = maildir:/usr/local/virtual/%d/%n mail_uid = 1004 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 mbox_write_locks = fcntl namespace { hidden = no inbox = yes list = yes location = prefix = separator = / subscriptions = yes type = private } namespace { inbox = no list = children location = maildir:/usr/local/virtual/%%d/%%n/shared/:INDEX=/shared/%%d/%%n prefix = shared/%%d/%%u/ passdb {
- Tekst uit oorspronkelijke bericht weergeven - separator = / subscriptions = no type = shared }
args = /usr/local/etc/dovecot/dovecot-mysql.conf driver = sql } plugin { acl = vfile acl_anyone = allow acl_shared_dict = proxy::acl autocreate = Trash autocreate2 = Junk autocreate3 = Sent autocreate4 = Drafts autocreate5 = Templates autosubscribe = Trash autosubscribe2 = Junk autosubscribe3 = Sent autosubscribe4 = Drafts autosubscribe5 = Templates quota = dict:::proxy::quotadict quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95 quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80 } protocols = imap pop3 service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-master { group = vmail mode = 0660 user = vmail } } service dict { unix_listener dict { mode = 0600 user = vmail } } service imap-login { inet_listener imap { address = 192.168.50.200 port = 143 } } service pop3-login { inet_listener pop3 { address = 192.168.50.200 port = 110 } } ssl = no userdb { args = /usr/local/etc/dovecot/dovecot-mysql.conf driver = sql } protocol imap { imap_client_workarounds = delay-newmail tb-extra-mailbox-sep imap_idle_notify_interval = 2 mins imap_logout_format = bytes=%i/%o imap_max_line_length = 64 k mail_plugins = quota imap_quota autocreate acl imap_acl mail_log notify } protocol pop3 { mail_plugins = quota trash pop3_client_workarounds = outlook-no-nuls oe-ns-eoh pop3_uidl_format = %08Xu%08Xv } protocol lda { auth_socket_path = /var/run/dovecot/auth-master mail_plugins = quota acl mail_log notify postmaster_address = postmaster@test.com sendmail_path = /usr/local/sbin/sendmail }
My dovecot-dict-acl-sql.conf file looks like the following
connect = host=localhost dbname=postfix user=postfix password=postfix
map { pattern = shared/shared-boxes/user/$to/$from table = user_shares value_field = dummy
fields { from_user = $from to_user = $to } }
In my table from mysql i see the following mysql> select * from user_shares; +-----------------------+----------------------+-------+ | from_user | to_user | dummy | +-----------------------+----------------------+-------+ | johan@domain.com | hans@domain.com | 1 | +-----------------------+----------------------+-------+ 1 row in set (0.00 sec)
regards, Johan Hendriks
On Thu, 2010-10-14 at 20:12 +0200, Johan Hendriks wrote:
This looks as if it's not even seeing the shared namespace. What does it log with mail_debug=yes? .. Oct 14 19:58:29 beasty dovecot: imap-login: Login: user=<hans@domain.com>, method=PLAIN, rip=192.168.50.200, lip=192.168.50.200, mpid=6615, secured Oct 14 19:59:53 beasty dovecot: dict: Error: sql dict iterate: Invalid/unmapped path: shared/shared-boxes/anyone/
There's not enough logs. The invalid/unmapped path is a bit annoying and should be fixed somehow I guess, but it's not the cause of your problem and is rather harmless.
But you should have seen in logs at login time stuff like:
Debug: Namespace : type=shared, prefix=shared/%d/%n/, sep=/, inbox=no, hidden=no, list=children, subscriptions=no location=maildir:%h/Maildir:INDEX=~/shared-index
On Fri, 2010-10-15 at 13:47 +0100, Timo Sirainen wrote:
But you should have seen in logs at login time stuff like:
Debug: Namespace : type=shared, prefix=shared/%d/%n/, sep=/, inbox=no, hidden=no, list=children, subscriptions=no location=maildir:%h/Maildir:INDEX=~/shared-index
I added some more stuff that gets logged now with mail_debug=yes and could be helpful in figuring out why shared mailboxes don't work:
http://hg.dovecot.org/dovecot-2.0/rev/b277b71fb57f http://hg.dovecot.org/dovecot-2.0/rev/b0e4edc4d79a
2010/10/15 Timo Sirainen <tss@iki.fi>:
On Fri, 2010-10-15 at 13:47 +0100, Timo Sirainen wrote:
But you should have seen in logs at login time stuff like:
Debug: Namespace : type=shared, prefix=shared/%d/%n/, sep=/, inbox=no, hidden=no, list=children, subscriptions=no location=maildir:%h/Maildir:INDEX=~/shared-index
I added some more stuff that gets logged now with mail_debug=yes and could be helpful in figuring out why shared mailboxes don't work:
http://hg.dovecot.org/dovecot-2.0/rev/b277b71fb57f http://hg.dovecot.org/dovecot-2.0/rev/b0e4edc4d79a
Sorry for the late reply. Was not in the office.
Dovecot used /var.log/debug as the debug logfile. I edit the dovecot.conf file, and now it logs all to /var/log/maillog.
i did the following again, telnet 192.168.50.200 143 Trying 192.168.50.200... Connected to beasty.double-l.local. Escape character is '^]'. this is what i get in the logs.
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready. a login johan@domain.com johanpass a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS QUOTA ACL RIGHTS=texk] Logged in b GETACL b BAD Error in IMAP command GETACL: Missing arguments b GETACL INBOX
- ACL "INBOX" "hans@domain.com" lr "johan@domain.com" lrwstipekxacd b OK Getacl completed. ^] telnet> quit Connection closed. beasty log # telnet 192.168.50.200 143 Trying 192.168.50.200... Connected to beasty.double-l.local. Escape character is '^]'.
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready. a login hans@domain.com hanspass a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS QUOTA ACL RIGHTS=texk] Logged in b list "" shared/* b OK List completed. c list "" shared/domain.com/johan/* c OK List completed. d select shared/domain.com/johan/INBOX d NO Mailbox doesn't exist: shared/domain.com/johan/INBOX ^] telnet> quit Connection closed.
Oct 18 14:22:29 auth: Debug: Loading modules from directory: /usr/local/lib/dovecot/auth Oct 18 14:22:29 auth: Debug: auth client connected (pid=98928) Oct 18 14:22:49 auth: Debug: client in: AUTH 1 PLAIN service=imap secured lip=192.168.50.200 rip=192.168.50.200 lport=143 rport=33182 resp=AGpvaGFuQGRvbWFpbi5jb20Aam9oYW5wYXNz Oct 18 14:22:49 auth: Debug: Loading modules from directory: /usr/local/lib/dovecot/auth Oct 18 14:22:49 auth: Info: mysql: Connected to localhost (postfix) Oct 18 14:22:49 auth: Debug: sql(johan@domain.com,192.168.50.200): query: select password from mailbox where username = 'johan@domain.com' and active = '1' Oct 18 14:22:49 auth: Debug: client out: OK 1 user=johan@domain.com Oct 18 14:22:49 auth: Debug: master in: REQUEST 1 98928 1 48479282aecab3b1b82306981b2c7b1b Oct 18 14:22:49 auth: Debug: sql(johan@domain.com,192.168.50.200): select maildir, concat('*:messages=50000:bytes=', quota) as quota_rule from mailbox where username = 'johan@domain.com' and active = '1' Oct 18 14:22:49 auth: Debug: master out: USER 1 johan@domain.com maildir=domain.com/johan/ quota_rule=*:messages=50000:bytes=1024000000 Oct 18 14:22:49 imap-login: Info: Login: user=<johan@domain.com>, method=PLAIN, rip=192.168.50.200, lip=192.168.50.200, mpid=99091, secured Oct 18 14:22:49 imap: Debug: Loading modules from directory: /usr/local/lib/dovecot Oct 18 14:22:49 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib01_acl_plugin.so Oct 18 14:22:49 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib02_imap_acl_plugin.so Oct 18 14:22:49 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib10_quota_plugin.so Oct 18 14:22:49 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib11_imap_quota_plugin.so Oct 18 14:22:49 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib15_notify_plugin.so Oct 18 14:22:49 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib20_autocreate_plugin.so Oct 18 14:22:49 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib20_mail_log_plugin.so Oct 18 14:22:49 imap: Debug: Added userdb setting: plugin/maildir=domain.com/johan/ Oct 18 14:22:49 imap: Debug: Added userdb setting: plugin/quota_rule=*:messages=50000:bytes=1024000000 Oct 18 14:22:49 imap(johan@domain.com): Debug: Effective uid=1004, gid=1004, home= Oct 18 14:22:49 imap(johan@domain.com): Debug: Quota root: name= backend=dict args=:proxy::quotadict Oct 18 14:22:49 imap(johan@domain.com): Debug: Quota rule: root= mailbox=* bytes=1024000000 messages=50000 Oct 18 14:22:49 imap(johan@domain.com): Debug: Quota warning: bytes=972800000 (95%) messages=0 reverse=no command=/usr/local/bin/quota-warning.sh 95 Oct 18 14:22:49 imap(johan@domain.com): Debug: Quota warning: bytes=819200000 (80%) messages=0 reverse=no command=/usr/local/bin/quota-warning.sh 80 Oct 18 14:22:49 imap(johan@domain.com): Debug: dict quota: user=johan@domain.com, uri=proxy::quotadict, noenforcing=0 Oct 18 14:22:49 imap(johan@domain.com): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/usr/local/virtual/domain.com/johan Oct 18 14:22:49 imap(johan@domain.com): Debug: maildir++: root=/usr/local/virtual/domain.com/johan, index=, control=, inbox=/usr/local/virtual/domain.com/johan Oct 18 14:22:49 imap(johan@domain.com): Debug: acl: initializing backend with data: vfile Oct 18 14:22:49 imap(johan@domain.com): Debug: acl: acl username = johan@domain.com Oct 18 14:22:49 imap(johan@domain.com): Debug: acl: owner = 1 Oct 18 14:22:49 imap(johan@domain.com): Debug: acl vfile: Global ACL directory: (null) Oct 18 14:22:49 imap(johan@domain.com): Debug: Namespace : type=shared, prefix=shared/%d/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=no location=maildir:/usr/local/virtual/%d/%n/shared/:INDEX=/shared/%d/%n Oct 18 14:22:49 imap(johan@domain.com): Debug: shared: root=/var/run/dovecot, index=, control=, inbox= Oct 18 14:22:49 imap(johan@domain.com): Debug: acl: initializing backend with data: vfile Oct 18 14:22:49 imap(johan@domain.com): Debug: acl: acl username = johan@domain.com Oct 18 14:22:49 imap(johan@domain.com): Debug: acl: owner = 0 Oct 18 14:22:49 imap(johan@domain.com): Debug: acl vfile: Global ACL directory: (null) Oct 18 14:22:49 imap(johan@domain.com): Debug: Namespace : Using permissions from /usr/local/virtual/domain.com/johan: mode=0700 gid=-1 Oct 18 14:23:28 imap(johan@domain.com): Debug: acl vfile: reading file /usr/local/virtual/domain.com/johan/dovecot-acl Oct 18 14:23:28 imap(johan@domain.com): Debug: acl vfile: reading file /usr/local/virtual/domain.com/johan/dovecot-acl Oct 18 14:25:45 imap(johan@domain.com): Info: Connection closed bytes=26/455 Oct 18 14:25:48 auth: Debug: Loading modules from directory: /usr/local/lib/dovecot/auth Oct 18 14:25:48 auth: Debug: auth client connected (pid=629) Oct 18 14:26:00 auth: Debug: client in: AUTH 1 PLAIN service=imap secured lip=192.168.50.200 rip=192.168.50.200 lport=143 rport=34472 resp=AGhhbnNAZG9tYWluLmNvbQBoYW5zcGFzcw== Oct 18 14:26:00 auth: Debug: Loading modules from directory: /usr/local/lib/dovecot/auth Oct 18 14:26:00 auth: Info: mysql: Connected to localhost (postfix) Oct 18 14:26:00 auth: Debug: sql(hans@domain.com,192.168.50.200): query: select password from mailbox where username = 'hans@domain.com' and active = '1' Oct 18 14:26:00 auth: Debug: client out: OK 1 user=hans@domain.com Oct 18 14:26:00 auth: Debug: master in: REQUEST 1 629 1 4b4d31b52569246bde5ab9457e5fa36d Oct 18 14:26:00 auth: Debug: sql(hans@domain.com,192.168.50.200): select maildir, concat('*:messages=50000:bytes=', quota) as quota_rule from mailbox where username = 'hans@domain.com' and active = '1' Oct 18 14:26:00 auth: Debug: master out: USER 1 hans@domain.com maildir=domain.com/hans/ quota_rule=*:messages=50000:bytes=102400000 Oct 18 14:26:00 imap-login: Info: Login: user=<hans@domain.com>, method=PLAIN, rip=192.168.50.200, lip=192.168.50.200, mpid=730, secured Oct 18 14:26:00 imap: Debug: Loading modules from directory: /usr/local/lib/dovecot Oct 18 14:26:00 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib01_acl_plugin.so Oct 18 14:26:00 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib02_imap_acl_plugin.so Oct 18 14:26:00 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib10_quota_plugin.so Oct 18 14:26:00 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib11_imap_quota_plugin.so Oct 18 14:26:00 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib15_notify_plugin.so Oct 18 14:26:00 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib20_autocreate_plugin.so Oct 18 14:26:00 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib20_mail_log_plugin.so Oct 18 14:26:00 imap: Debug: Added userdb setting: plugin/maildir=domain.com/hans/ Oct 18 14:26:00 imap: Debug: Added userdb setting: plugin/quota_rule=*:messages=50000:bytes=102400000 Oct 18 14:26:00 imap(hans@domain.com): Debug: Effective uid=1004, gid=1004, home= Oct 18 14:26:00 imap(hans@domain.com): Debug: Quota root: name= backend=dict args=:proxy::quotadict Oct 18 14:26:00 imap(hans@domain.com): Debug: Quota rule: root= mailbox=* bytes=102400000 messages=50000 Oct 18 14:26:00 imap(hans@domain.com): Debug: Quota warning: bytes=97280000 (95%) messages=0 reverse=no command=/usr/local/bin/quota-warning.sh 95 Oct 18 14:26:00 imap(hans@domain.com): Debug: Quota warning: bytes=81920000 (80%) messages=0 reverse=no command=/usr/local/bin/quota-warning.sh 80 Oct 18 14:26:00 imap(hans@domain.com): Debug: dict quota: user=hans@domain.com, uri=proxy::quotadict, noenforcing=0 Oct 18 14:26:00 imap(hans@domain.com): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/usr/local/virtual/domain.com/hans Oct 18 14:26:00 imap(hans@domain.com): Debug: maildir++: root=/usr/local/virtual/domain.com/hans, index=, control=, inbox=/usr/local/virtual/domain.com/hans Oct 18 14:26:00 imap(hans@domain.com): Debug: acl: initializing backend with data: vfile Oct 18 14:26:00 imap(hans@domain.com): Debug: acl: acl username = hans@domain.com Oct 18 14:26:00 imap(hans@domain.com): Debug: acl: owner = 1 Oct 18 14:26:00 imap(hans@domain.com): Debug: acl vfile: Global ACL directory: (null) Oct 18 14:26:00 imap(hans@domain.com): Debug: Namespace : type=shared, prefix=shared/%d/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=no location=maildir:/usr/local/virtual/%d/%n/shared/:INDEX=/shared/%d/%n Oct 18 14:26:00 imap(hans@domain.com): Debug: shared: root=/var/run/dovecot, index=, control=, inbox= Oct 18 14:26:00 imap(hans@domain.com): Debug: acl: initializing backend with data: vfile Oct 18 14:26:00 imap(hans@domain.com): Debug: acl: acl username = hans@domain.com Oct 18 14:26:00 imap(hans@domain.com): Debug: acl: owner = 0 Oct 18 14:26:00 imap(hans@domain.com): Debug: acl vfile: Global ACL directory: (null) Oct 18 14:26:00 imap(hans@domain.com): Debug: Namespace : Using permissions from /usr/local/virtual/domain.com/hans: mode=0700 gid=-1 Oct 18 14:26:06 beasty postfix/qmgr[13582]: 18D833F494: from=<johan@schavemaker.com>, size=324, nrcpt=1 (queue active) Oct 18 14:26:06 lda: Debug: Loading modules from directory: /usr/local/lib/dovecot Oct 18 14:26:06 lda: Debug: Module loaded: /usr/local/lib/dovecot/lib01_acl_plugin.so Oct 18 14:26:06 lda: Debug: Module loaded: /usr/local/lib/dovecot/lib10_quota_plugin.so Oct 18 14:26:06 lda: Debug: Module loaded: /usr/local/lib/dovecot/lib15_notify_plugin.so Oct 18 14:26:06 lda: Debug: Module loaded: /usr/local/lib/dovecot/lib20_mail_log_plugin.so Oct 18 14:26:06 auth: Debug: master in: USER 1 johan@domain.com service=lda Oct 18 14:26:06 auth: Debug: sql(johan@domain.com): select maildir, concat('*:messages=50000:bytes=', quota) as quota_rule from mailbox where username = 'johan@domain.com' and active = '1' Oct 18 14:26:06 auth: Debug: master out: USER 1 johan@domain.com maildir=domain.com/johan/ quota_rule=*:messages=50000:bytes=1024000000 Oct 18 14:26:06 lda: Debug: auth input: johan@domain.com maildir=domain.com/johan/ quota_rule=*:messages=50000:bytes=1024000000 Oct 18 14:26:06 lda: Debug: Added userdb setting: plugin/maildir=domain.com/johan/ Oct 18 14:26:06 lda: Debug: Added userdb setting: plugin/quota_rule=*:messages=50000:bytes=1024000000 Oct 18 14:26:06 lda(johan@domain.com): Debug: Effective uid=1004, gid=1004, home= Oct 18 14:26:06 lda(johan@domain.com): Debug: Quota root: name= backend=dict args=:proxy::quotadict Oct 18 14:26:06 lda(johan@domain.com): Debug: Quota rule: root= mailbox=* bytes=1024000000 messages=50000 Oct 18 14:26:06 lda(johan@domain.com): Debug: Quota warning: bytes=972800000 (95%) messages=0 reverse=no command=/usr/local/bin/quota-warning.sh 95 Oct 18 14:26:06 lda(johan@domain.com): Debug: Quota warning: bytes=819200000 (80%) messages=0 reverse=no command=/usr/local/bin/quota-warning.sh 80 Oct 18 14:26:06 lda(johan@domain.com): Debug: dict quota: user=johan@domain.com, uri=proxy::quotadict, noenforcing=0 Oct 18 14:26:06 lda(johan@domain.com): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/usr/local/virtual/domain.com/johan Oct 18 14:26:06 lda(johan@domain.com): Debug: maildir++: root=/usr/local/virtual/domain.com/johan, index=, control=, inbox=/usr/local/virtual/domain.com/johan Oct 18 14:26:06 lda(johan@domain.com): Debug: acl: initializing backend with data: vfile Oct 18 14:26:06 lda(johan@domain.com): Debug: acl: acl username = johan@domain.com Oct 18 14:26:06 lda(johan@domain.com): Debug: acl: owner = 1 Oct 18 14:26:06 lda(johan@domain.com): Debug: acl vfile: Global ACL directory: (null) Oct 18 14:26:06 lda(johan@domain.com): Debug: Namespace : type=shared, prefix=shared/%d/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=no location=maildir:/usr/local/virtual/%d/%n/shared/:INDEX=/shared/%d/%n Oct 18 14:26:06 lda(johan@domain.com): Debug: shared: root=/var/run/dovecot, index=, control=, inbox= Oct 18 14:26:06 lda(johan@domain.com): Debug: acl: initializing backend with data: vfile Oct 18 14:26:06 lda(johan@domain.com): Debug: acl: acl username = johan@domain.com Oct 18 14:26:06 lda(johan@domain.com): Debug: acl: owner = 0 Oct 18 14:26:06 lda(johan@domain.com): Debug: acl vfile: Global ACL directory: (null) Oct 18 14:26:06 lda(johan@domain.com): Debug: Quota root: name= backend=dict args=:proxy::quotadict Oct 18 14:26:06 lda(johan@domain.com): Debug: Quota warning: bytes=0 (95%) messages=0 reverse=no command=/usr/local/bin/quota-warning.sh 95 Oct 18 14:26:06 lda(johan@domain.com): Debug: Quota warning: bytes=0 (80%) messages=0 reverse=no command=/usr/local/bin/quota-warning.sh 80 Oct 18 14:26:06 lda(johan@domain.com): Debug: dict quota: user=johan@domain.com, uri=proxy::quotadict, noenforcing=0 Oct 18 14:26:06 lda(johan@domain.com): Debug: none: root=, index=, control=, inbox= Oct 18 14:26:06 dict: Info: mysql: Connected to localhost (postfix) Oct 18 14:26:06 lda(johan@domain.com): Info: save: box=INBOX, uid=2, msgid=<20101018121703.18D833F494@mailserver.schavemaker.com>, size=384 Oct 18 14:26:06 lda(johan@domain.com): Info: msgid=<20101018121703.18D833F494@mailserver.schavemaker.com>: saved mail to INBOX Oct 18 14:26:06 beasty postfix/pipe[787]: 18D833F494: to=<johan@domain.com>, relay=dovecot, delay=544, delays=544/0.02/0/0.03, dsn=2.0.0, status=sent (delivered via dovecot service) Oct 18 14:26:06 beasty postfix/qmgr[13582]: 18D833F494: removed Oct 18 14:27:51 dict: Error: sql dict iterate: Invalid/unmapped path: shared/shared-boxes/anyone/ Oct 18 14:27:51 dict: Info: mysql: Connected to localhost (postfix) Oct 18 14:27:51 imap(hans@domain.com): Debug: Quota root: name= backend=dict args=:proxy::quotadict Oct 18 14:27:51 imap(hans@domain.com): Debug: Quota rule: root= mailbox=* bytes=102400000 messages=50000 Oct 18 14:27:51 imap(hans@domain.com): Debug: Quota warning: bytes=97280000 (95%) messages=0 reverse=no command=/usr/local/bin/quota-warning.sh 95 Oct 18 14:27:51 imap(hans@domain.com): Debug: Quota warning: bytes=81920000 (80%) messages=0 reverse=no command=/usr/local/bin/quota-warning.sh 80 Oct 18 14:27:51 imap(hans@domain.com): Debug: dict quota: user=johan@domain.com, uri=proxy::quotadict, noenforcing=0 Oct 18 14:27:51 imap(hans@domain.com): Debug: maildir++: root=/usr/local/virtual/domain.com/johan/shared, index=/shared/domain.com/johan, control=, inbox=/usr/local/virtual/domain.com/johan/shared Oct 18 14:27:51 imap(hans@domain.com): Debug: Namespace shared/domain.com/johan@domain.com/: Permission lookup failed from /usr/local/virtual/domain.com/johan/shared Oct 18 14:27:51 imap(hans@domain.com): Debug: Namespace shared/domain.com/johan@domain.com/: Using permissions from /usr/local/virtual/domain.com/johan/shared: mode=0700 gid=-1 Oct 18 14:27:51 imap(hans@domain.com): Debug: acl: initializing backend with data: vfile Oct 18 14:27:51 imap(hans@domain.com): Debug: acl: acl username = hans@domain.com Oct 18 14:27:51 imap(hans@domain.com): Debug: acl: owner = 0 Oct 18 14:27:51 imap(hans@domain.com): Debug: acl vfile: Global ACL directory: (null) Oct 18 14:27:51 imap(hans@domain.com): Debug: acl vfile: file /usr/local/virtual/domain.com/johan/shared/dovecot-acl not found Oct 18 14:28:54 imap(hans@domain.com): Debug: Quota root: name= backend=dict args=:proxy::quotadict Oct 18 14:28:54 imap(hans@domain.com): Debug: Quota rule: root= mailbox=* bytes=102400000 messages=50000 Oct 18 14:28:54 imap(hans@domain.com): Debug: Quota warning: bytes=97280000 (95%) messages=0 reverse=no command=/usr/local/bin/quota-warning.sh 95 Oct 18 14:28:54 imap(hans@domain.com): Debug: Quota warning: bytes=81920000 (80%) messages=0 reverse=no command=/usr/local/bin/quota-warning.sh 80 Oct 18 14:28:54 imap(hans@domain.com): Debug: dict quota: user=johan, uri=proxy::quotadict, noenforcing=0 Oct 18 14:28:54 imap(hans@domain.com): Debug: maildir++: root=/usr/local/virtual//johan/shared, index=/shared//johan, control=, inbox=/usr/local/virtual//johan/shared Oct 18 14:28:54 imap(hans@domain.com): Debug: acl: initializing backend with data: vfile Oct 18 14:28:54 imap(hans@domain.com): Debug: acl: acl username = hans@domain.com Oct 18 14:28:54 imap(hans@domain.com): Debug: acl: owner = 0 Oct 18 14:28:54 imap(hans@domain.com): Debug: acl vfile: Global ACL directory: (null) Oct 18 14:28:54 imap(hans@domain.com): Debug: acl vfile: file /usr/local/virtual//johan/shared/dovecot-acl not found Oct 18 14:29:04 imap(hans@domain.com): Info: Connection closed bytes=97/410
regards, Johan Hendriks
On Mon, 2010-10-11 at 17:11 +0200, Johan Hendriks wrote:
namespace { inbox = no list = children location = maildir:/usr/local/virtual/%%d/%%n/shared/:INDEX=/shared/%%n
Somehow I missed this first: There's an extra "shared/" in the mail location. You're now telling Dovecot to access other users' mails from nonexistent shared directory. So use:
location = maildir:/usr/local/virtual/%%d/%%n:INDEX=/shared/%%n
(Oh, and if I didn't already mention you should include either %%d or %% u in the INDEX path as well to avoid conflicts between domains.)
2010/10/18 Timo Sirainen <tss@iki.fi>:
On Mon, 2010-10-11 at 17:11 +0200, Johan Hendriks wrote:
namespace { inbox = no list = children location = maildir:/usr/local/virtual/%%d/%%n/shared/:INDEX=/shared/%%n
Somehow I missed this first: There's an extra "shared/" in the mail location. You're now telling Dovecot to access other users' mails from nonexistent shared directory. So use:
location = maildir:/usr/local/virtual/%%d/%%n:INDEX=/shared/%%n
(Oh, and if I didn't already mention you should include either %%d or %% u in the INDEX path as well to avoid conflicts between domains.)
Thank you very much it works. Finally :D
I knew i missed something, and i tried a lot of options, but always leave that shared behind %%n the INDEX=/shared/%%n where does this point to? Must i use INDEX=/shared/%%d/%%u or INDEX=/shared/%%u/%%n What is a better value.
And thanks again.
regards, Johan Hendriks
On Mon, 2010-10-18 at 16:18 +0200, Johan Hendriks wrote:
location = maildir:/usr/local/virtual/%%d/%%n:INDEX=/shared/%%n
I knew i missed something, and i tried a lot of options, but always leave that shared behind %%n the INDEX=/shared/%%n where does this point to?
To /shared/user
Must i use INDEX=/shared/%%d/%%u
That's /shared/domain.com/user@domain.com/
or INDEX=/shared/%%u/%%n
That's /shared/user@domain.com/user/
What is a better value.
%%d/%%n would more sense than either of those, but since these are indexes only for users who have shared mailboxes to you, %%u alone would work fine.
Also my guess is that you don't really want /shared, but INDEX=/usr/local/virtual/%u/%n/shared/%%u
(or really, you should be using home directories to avoid that whole /usr/local/virtual/%u/%n everywhere)
2010/10/18 Timo Sirainen <tss@iki.fi>:
On Mon, 2010-10-18 at 16:18 +0200, Johan Hendriks wrote:
location = maildir:/usr/local/virtual/%%d/%%n:INDEX=/shared/%%n
I knew i missed something, and i tried a lot of options, but always leave that shared behind %%n the INDEX=/shared/%%n where does this point to?
To /shared/user
Must i use INDEX=/shared/%%d/%%u
That's /shared/domain.com/user@domain.com/
or INDEX=/shared/%%u/%%n
That's /shared/user@domain.com/user/
What is a better value.
%%d/%%n would more sense than either of those, but since these are indexes only for users who have shared mailboxes to you, %%u alone would work fine.
Also my guess is that you don't really want /shared, but INDEX=/usr/local/virtual/%u/%n/shared/%%u
(or really, you should be using home directories to avoid that whole /usr/local/virtual/%u/%n everywhere)
It works with the following settings.
mail_location = maildir:/usr/local/virtual/%d/%n/
namespace { hidden = no inbox = yes list = yes location = prefix = separator = / subscriptions = yes type = private }
namespace { inbox = no list = children location = maildir:/usr/local/virtual/%%d/%%n:INDEX=/usr/local/virtual/%d/%n/shared/%%u prefix = shared/%%d/%%n/ separator = / subscriptions = no type = shared }
I have read the the wiki and tried to use the home folder. I created a dir /usr/home/virtual/ gave it the right permissions.
But the wiki is not very clear (for me ) where i must alter my config to use the home dir. In my understanding , i must set the home dir by doing the following. mail_location = maildir: home=/usr/home/virtual/%d/%n/ mail=/usr/local/virtual/%d/%n
But the i get a few errors
Oct 20 09:02:31 beasty dovecot: imap-login: Login: user=<hans@domain.com>, method=PLAIN, rip=192.168.50.200, lip=192.168.50.200, mpid=11285, secured Oct 20 09:02:31 beasty dovecot: imap(hans@domain.com): Error: user hans@domain.com: Initialization failed: Namespace '': mkdir( home=/usr/home/virtual/domain.com/hans/ mail=/usr/local/virtual/domain.com/hans) in directory /var/run/dovecot failed: Permission denied (euid=1004(vmail) egid=1004(vmail), euid is not dir owner) Oct 20 09:02:31 beasty dovecot: imap(hans@domain.com): Error: Invalid user settings. Refer to server log for more information.
also when sending mail, i get the following error
Oct 20 09:03:40 beasty postfix/qmgr[1775]: 4F6403F461: from=<root@localdomain.com>, size=325, nrcpt=1 (queue active) Oct 20 09:03:40 beasty dovecot: lda(johan@domain.com): Error: user johan@domain.com: Initialization failed: Namespace '': mkdir( home=/usr/home/virtual/domain.com/johan/ mail=/usr/local/virtual/domain.com/johan) in directory /var/spool/postfix failed: Permission denied (euid=1004(vmail) egid=1004(vmail), euid is not dir owner) Oct 20 09:03:40 beasty dovecot: lda(johan@domain.com): Fatal: Invalid user settings. Refer to server log for more information. Oct 20 09:03:40 beasty postfix/pipe[11842]: 4F6403F461: to=<johan@domain.com>, relay=dovecot, delay=0.08, delays=0.02/0.01/0/0.06, dsn=4.3.0, status=deferred (temporary failure)
Sorry for being a novice on this.... :D
regards, Johan Hendriks
On Wed, 2010-10-20 at 09:06 +0200, Johan Hendriks wrote:
(or really, you should be using home directories to avoid that whole /usr/local/virtual/%u/%n everywhere)
I have read the the wiki and tried to use the home folder. I created a dir /usr/home/virtual/ gave it the right permissions.
My idea was more like:
mail_home = /usr/local/virtual/%d/%n mail_location = maildir:~/
Even better would be:
mail_location = maildir:~/Maildir
but you'd have to move existing maildirs below the Maildir/ then.
hans@domain.com: Initialization failed: Namespace '': mkdir( home=/usr/home/virtual/domain.com/hans/ mail=/usr/local/virtual/domain.com/hans) in directory /var/run/dovecot
Above it's trying to create a directory called "/var/run/dovecot/home=/usr/home/virtual/domain.com/hans/ mail=/usr/local/virtual/domain.com/hans", which is of course completely wrong.
participants (2)
-
Johan Hendriks
-
Timo Sirainen