Re: [Dovecot] Shared folders, please help.!
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. > h...@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.
Re: [Dovecot] Shared folders, please help.!
2010/10/18 Timo Sirainen : > 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/u...@domain.com/ > >> or INDEX=/shared/%%u/%%n > > That's /shared/u...@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=, method=PLAIN, rip=192.168.50.200, lip=192.168.50.200, mpid=11285, secured Oct 20 09:02:31 beasty dovecot: imap(h...@domain.com): Error: user h...@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(h...@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=, size=325, nrcpt=1 (queue active) Oct 20 09:03:40 beasty dovecot: lda(jo...@domain.com): Error: user jo...@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(jo...@domain.com): Fatal: Invalid user settings. Refer to server log for more information. Oct 20 09:03:40 beasty postfix/pipe[11842]: 4F6403F461: to=, 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
Re: [Dovecot] Shared folders, please help.!
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/u...@domain.com/ > or INDEX=/shared/%%u/%%n That's /shared/u...@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)
Re: [Dovecot] Shared folders, please help.!
2010/10/18 Timo Sirainen : > 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
Re: [Dovecot] Shared folders, please help.!
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.)
Re: [Dovecot] Shared folders, please help.!
2010/10/15 Timo Sirainen : > 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 '^]'. * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready. a login jo...@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" "h...@domain.com" lr "jo...@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 h...@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. this is what i get in the logs. 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: AUTH1 PLAIN service=imapsecured 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(jo...@domain.com,192.168.50.200): query: select password from mailbox where username = 'jo...@domain.com' and active = '1' Oct 18 14:22:49 auth: Debug: client out: OK 1 user=jo...@domain.com Oct 18 14:22:49 auth: Debug: master in: REQUEST 1 98928 1 48479282aecab3b1b82306981b2c7b1b Oct 18 14:22:49 auth: Debug: sql(jo...@domain.com,192.168.50.200): select maildir, concat('*:messages=5:bytes=', quota) as quota_rule from mailbox where username = 'jo...@domain.com' and active = '1' Oct 18 14:22:49 auth: Debug: master out: USER1 jo...@domain.commaildir=domain.com/johan/ quota_rule=*:messages=5:bytes=102400 Oct 18 14:22:49 imap-login: Info: Login: user=, 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=5:bytes=102400 Oct 18 14:22:49 imap(jo...@domain.com): Debug: Effective uid=1004, gid=1004, home= Oct 18 14:22:49 imap(jo...@domain.com): Debug: Quota root: name= backend=dict args=:proxy::quotadict Oct 18 14:22:49 imap(jo...@domain.com): Debug: Quota rule: root= mailbox=* bytes=102400 messages=5 Oct 18 14:22:49 imap(jo...@domain.com): Debug: Quota warning: bytes=9
Re: [Dovecot] Shared folders, please help.!
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
Re: [Dovecot] Shared folders, please help.!
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=, 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
Re: [Dovecot] Shared folders, please help.!
2010/10/14 Timo Sirainen : > 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 jo...@domain.com a BAD Error in IMAP command received by server. a login jo...@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 h...@domain.com b OK Deleteacl complete. c GETACL INBOX * ACL "INBOX" "jo...@domain.com" lrwstipekxacd c OK Getacl completed. d SETACL INBOX h...@domain.com lr d OK Setacl complete. e GETACL INBOX * ACL "INBOX" "h...@domain.com" lr "jo...@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 h...@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(jo...@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=, 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/ - Tekst uit oorspronkelijke bericht weergeven - 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 = 066
Re: [Dovecot] Shared folders, please help.!
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.
Re: [Dovecot] Shared folders, please help.!
2010/10/14 Timo Sirainen > > On Mon, 2010-10-11 at 17:11 +0200, Johan Hendriks wrote: > > a login jo...@domain.com mypass > > b SETACL INBOX h...@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 '^]'. * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready. a login h...@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: '.' thanks for your time on this. I am overlooking something, but i really do not know what regards, Johan Hendriks
Re: [Dovecot] Shared folders, please help.!
On Mon, 2010-10-11 at 17:11 +0200, Johan Hendriks wrote: > a login jo...@domain.com mypass > b SETACL INBOX h...@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