Re: Dovecot shared folders - examples of the "doveadm acl" command?

2023-08-05 Thread Graham Leggett via dovecot
On 30 Jul 2023, at 16:47, Benny Pedersen  wrote:

>> Does anyone have a concrete example of “doveadm acl” to grant someone
>> access to a shared folder?
> 
> https://doc.dovecot.org/search/?q=acl

Unfortunately the search query above doesn’t return any examples of the doveadm 
acl command.

For the record, you can do this:

doveadm acl add -u sha...@example.com INBOX user=j...@example.com create delete 
expunge insert lookup read write write-deleted write-seen
doveadm acl add -u sha...@example.com INBOX user=j...@example.com create delete 
expunge insert lookup read write write-deleted write-seen

Regards,
Graham
—

___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Dovecot shared folders - examples of the "doveadm acl" command?

2023-07-30 Thread Benny Pedersen

Graham Leggett via dovecot skrev den 2023-07-30 17:29:


Does anyone have a concrete example of “doveadm acl” to grant someone
access to a shared folder?


https://doc.dovecot.org/search/?q=acl
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Dovecot shared folders - examples of the "doveadm acl" command?

2023-07-30 Thread Graham Leggett via dovecot
Hi all,

The old wiki has been taken down, and all the links I can find through google 
are now broken.

Does anyone have a concrete example of “doveadm acl” to grant someone access to 
a shared folder?

Regards,
Graham
—

___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Migrate from Courier to Dovecot - shared folders - can't subscribe

2015-02-16 Thread Никита Борисенков
Hello, I try to migrate from Courier to Dovecot and i have a trouble 
with shared folders.


Shared mailbox is visible in list, but i can't subscribe to it.

user - b...@test.sunlink.ru
shared folder - mail-r...@test.sunlink.ru

Here is a raw log:
LOGIN-AND-FIND-SUBSCRIBED-IN:
2 namespace
3 ENABLE CONDSTORE
4 ID (name Thunderbird version 31.4.0)
5 list (subscribed)  INBOX.*
6 list (subscribed)  shared.*
7 list  INBOX
8 select INBOX (CONDSTORE)
9 myrights INBOX
10 getacl INBOX
11 getquotaroot INBOX
12 UID fetch 33:* (FLAGS)
13 IDLE
DONE
14 list (subscribed)  INBOX.*
15 list  INBOX.%
16 list  INBOX.%.%
17 list (subscribed)  shared.*
18 list  shared.%
19 list  shared.%.%
20 IDLE
DONE
21 list  shared.shared/%
22 list  shared.shared/%/%
23 IDLE
DONE
24 list  shared.mail-rack.%
25 list  shared.mail-rack.%.%
26 IDLE
DONE
27 close
28 logout

LOGIN-AND-FIND-SUBSCRIBED-OUT:
1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE 
IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS 
THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN 
NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH 
ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE BINARY 
MOVE NOTIFY QUOTA ACL RIGHTS=texk] Logged in

* NAMESPACE ((INBOX. .)) ((shared. .)) NIL
2 OK Namespace completed.
* ENABLED CONDSTORE
3 OK Enabled.
* ID (name Dovecot)
4 OK ID completed.
* LIST (\Subscribed) . INBOX.Archives
* LIST (\Subscribed) . INBOX.Drafts
* LIST (\Subscribed) . INBOX.Junk
* LIST (\Subscribed) . INBOX.Sent
* LIST (\Subscribed) . INBOX.Trash
* LIST (\Subscribed) . INBOX.INBOX.1
* LIST (\Subscribed) . INBOX.1
5 OK List completed.
6 OK List completed.
* LIST (\HasChildren) . INBOX
7 OK List completed.
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk $Forwarded Junk)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk 
$Forwarded Junk \*)] Flags permitted.

* 24 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1423308312] UIDs valid
* OK [UIDNEXT 39] Predicted next UID
* OK [HIGHESTMODSEQ 675] Highest
8 OK [READ-WRITE] Select completed (0.000 secs).
* MYRIGHTS INBOX lrwstipekxacd
9 OK Myrights completed.
* ACL INBOX b...@test.sunlink.ru lrwstipekxacd
10 OK Getacl completed.
* QUOTAROOT INBOX User quota
* QUOTA User quota (STORAGE 79458 512000)
11 OK Getquotaroot completed.
* 24 FETCH (UID 32 FLAGS (\Seen NonJunk))
12 OK Fetch completed.
+ idling
13 OK Idle completed.
* LIST (\Subscribed) . INBOX.Archives
* LIST (\Subscribed) . INBOX.Drafts
* LIST (\Subscribed) . INBOX.Junk
* LIST (\Subscribed) . INBOX.Sent
* LIST (\Subscribed) . INBOX.Trash
* LIST (\Subscribed) . INBOX.INBOX.1
* LIST (\Subscribed) . INBOX.1
14 OK List completed.
* LIST (\HasNoChildren \UnMarked) . INBOX.1
* LIST (\HasNoChildren \UnMarked \Sent) . INBOX.Sent
* LIST (\HasNoChildren \UnMarked \Junk) . INBOX.Junk
* LIST (\HasNoChildren \UnMarked \Drafts) . INBOX.Drafts
* LIST (\HasNoChildren \UnMarked) . INBOX.Archives
* LIST (\HasNoChildren \Trash) . INBOX.Trash
15 OK List completed.
* LIST (\HasNoChildren \UnMarked) . INBOX.INBOX.1
16 OK List completed.
17 OK List completed.
* LIST (\HasChildren) . shared.mail-rack
18 OK List completed.
* LIST (\HasNoChildren \UnMarked) . shared.mail-rack.Trash
19 OK List completed.
+ idling
20 OK Idle completed.
21 OK List completed.
22 OK List completed.
+ idling
23 OK Idle completed.
* LIST (\HasNoChildren \UnMarked) . shared.mail-rack.Trash
24 OK List completed.
25 OK List completed.
+ idling
26 OK Idle completed.
27 OK Close completed.
* BYE Logging out
28 OK Logout completed.

SUBSCRIBE-IN:
2 ENABLE CONDSTORE
3 ID (name Thunderbird version 31.4.0)
4 subscribe shared.mail-rack
5 list (subscribed)  INBOX.*
6 list (subscribed)  shared.*
7 list  INBOX
8 logout

SUBSCRIBE-OUT:
1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE 
IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS 
THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN 
NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH 
ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE BINARY 
MOVE NOTIFY QUOTA ACL RIGHTS=texk] Logged in

* ENABLED CONDSTORE
2 OK Enabled.
* ID (name Dovecot)
3 OK ID completed.
4 NO [CANNOT] This namespace has no subscriptions
* LIST (\Subscribed) . INBOX.Archives
* LIST (\Subscribed) . INBOX.Drafts
* LIST (\Subscribed) . INBOX.Junk
* LIST (\Subscribed) . INBOX.Sent
* LIST (\Subscribed) . INBOX.Trash
* LIST (\Subscribed) . INBOX.INBOX.1
* LIST (\Subscribed) . INBOX.1
5 OK List completed.
6 OK List completed.
* LIST (\HasChildren) . INBOX
7 OK List completed.
* BYE Logging out
8 OK Logout completed.

As I understood from documentation if shared. namespace have 
subscription = no then there shall be a parent namespace to match, 
before shared.. But i have inbox namespace with prefix INBOX.


Where I was mistaken in a configuration?

$ dovecot -n
# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-xen-686 i686 Debian 7.8 xfs

[Dovecot] shared folders

2014-02-10 Thread develop
Hi,

I can't access a shared folder , when I try to debug

doveadm acl debug -u john.doe shared/ a_shared_mail /inbox

I receive this message:

doveadm acl debug -u john.doe shared/a_shared_mail/inbox
doveadm(john.doe): Error: stat(/home/a_shared_mail/Maildir/.inbox) failed: 
Permission denied
doveadm(john.doe): Error: stat(/home/a_shared_mail/Maildir/.inbox) failed: 
Permission denied
doveadm(john.doe): Error: stat(/home/a_shared_mail/Maildir/.inbox/tmp) failed: 
Permission denied (euid=1003(john.doe) egid=1004(john.doe) missing +x perm: 
/home/a_shared_mail/Maildir, dir owned by 1006:1007 mode=0700)
doveadm(john.doe): Error: Can't open mailbox 
shared/a_shared_mail/inbox:Internal error occurred. Refer to server log for 
more information. [2014-02-10 17:30:42]

unfortunately I don't see anything useful in my logs:

Feb 10 17:27:59 ip-xx-xx-xxx-xx dovecot: master: Warning: Killed with signal 15 
(by pid=1 uid=0 code=kill)
Feb 10 17:27:59 ip-xx-xx-xxx-xx dovecot: log: Warning: Killed with signal 15 
(by pid=1 uid=0 code=kill)
Feb 10 17:27:59 ip-xx-xx-xxx-xx dovecot: master: Dovecot v2.0.19 starting up 
(core dumps disabled)
Feb 10 17:30:23 ip-xx-xx-xxx-xx dovecot: auth: Debug: Loading modules from 
directory: /usr/lib/dovecot/modules/auth
Feb 10 17:30:23 ip-xx-xx-xxx-xx dovecot: auth: Debug: Module loaded: 
/usr/lib/dovecot/modules/auth/libdriver_mysql.so
Feb 10 17:30:23 ip-xx-xx-xxx-xx dovecot: auth: Debug: auth client connected 
(pid=3398)
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: auth: Debug: client in: 
AUTH#0111#011PLAIN#011service=imap#011secured#011lip=127.0.0.1#011rip=127.0.0.1#011lport=143#011rport=40438#011resp=AHRlY2huaWNzADFMd01Hek0wZjdIVzc3dWZaaWhBWUdlSTJIWmQ5cEdi
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: auth-worker: Debug: Loading modules 
from directory: /usr/lib/dovecot/modules/auth
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: auth-worker: Debug: Module loaded: 
/usr/lib/dovecot/modules/auth/libdriver_mysql.so
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: auth-worker: Debug: 
pam(a_shared_mail,127.0.0.1): lookup service=dovecot
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: auth-worker: Debug: 
pam(a_shared_mail,127.0.0.1): #1/1 style=1 msg=Password:
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: auth: Debug: client out: 
OK#0111#011user=a_shared_mail
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: auth: Debug: master in: 
REQUEST#0113071934465#0113398#0111#011530aafc2ed51a8ee026b48c2bfa924d3
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: auth: Debug: 
passwd(a_shared_mail,127.0.0.1): lookup
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: auth: Debug: master out: 
USER#0113071934465#011a_shared_mail#011system_groups_user=a_shared_mail#011uid=1006#011gid=1007#011home=/home/a_shared_mail
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap-login: Login: 
user=a_shared_mail, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=3401, 
secured
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap: Debug: Loading modules from 
directory: /usr/lib/dovecot/modules
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap: Debug: Module loaded: 
/usr/lib/dovecot/modules/lib01_acl_plugin.so
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap: Debug: Module loaded: 
/usr/lib/dovecot/modules/lib02_imap_acl_plugin.so
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: Effective 
uid=1006, gid=1007, home=/home/a_shared_mail
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: Namespace 
: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, 
subscriptions=yes location=maildir:/home/a_shared_mail/Maildir
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: maildir++: 
root=/home/a_shared_mail/Maildir, index=, control=, 
inbox=/home/a_shared_mail/Maildir, alt=
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: acl: 
initializing backend with data: vfile
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: acl: acl 
username = a_shared_mail
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: acl: owner 
= 1
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: acl vfile: 
Global ACL directory: (none)
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: Namespace 
: type=shared, prefix=shared/%u/, sep=/, inbox=no, hidden=no, list=children, 
subscriptions=yes 
location=maildir:%h/Maildir:INDEX=/home/a_shared_mail/Maildir/shared/%u
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: shared: 
root=/var/run/dovecot, index=, control=, inbox=, alt=
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: acl: 
initializing backend with data: vfile
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: acl: acl 
username = a_shared_mail
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: acl: owner 
= 0
Feb 10 17:30:28 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: acl vfile: 
Global ACL directory: (none)
Feb 10 17:30:33 ip-xx-xx-xxx-xx dovecot: imap(a_shared_mail): Debug: acl vfile: 

Re: [Dovecot] shared folders and subscriptions = yes

2013-03-20 Thread Timo Sirainen
On 15.3.2013, at 19.29, Lars Uhlmann dove...@lars-uhlmann.de wrote:

 To have all IMAP-Users automatically updated their shared folder
 structure I use subscriptions = yes.
 This works with the side effect, that all IMAP-Users can see _all_
 folders in every namespace even if they do not have lookup access.
 This is of course not wanted.
 
 Is it possible to have dovecot check the ACL file in the root of a
 namespace before it parses the subscrptions file?


I guess it could be checking ACLs for subscriptions when they're coming from a 
public namespace with subscriptions=yes. See if you can implement it. :)



[Dovecot] shared folders and subscriptions = yes

2013-03-15 Thread Lars Uhlmann
Example (dovecot 1.2.15):

,-[dovecot.conf]
| namespace public {
|separator = /
|prefix = management
|location = maildir:/path/to/management
|subscriptions = yes
| }
| 
| namespace public {
|separator = /
|prefix = sales
|location = maildir:/path/to/sales
|subscriptions = yes
| }
`-

To have all IMAP-Users automatically updated their shared folder
structure I use subscriptions = yes.
This works with the side effect, that all IMAP-Users can see _all_
folders in every namespace even if they do not have lookup access.
This is of course not wanted.

Is it possible to have dovecot check the ACL file in the root of a
namespace before it parses the subscrptions file?

regards
Lars


Re: [Dovecot] Shared folders not shown if INBOX.shared.%.% is used with dovecot 2.1.10

2012-10-26 Thread Christoph Bußenius

Hi,

On 22.10.2012 16:33, Christoph Bußenius wrote:

. list  INBOX.shared.%.%

Dovecot 2.1.10 does not list any folders in response to this command.


I hope this helps: I bisected this bug and found it was introduced with 
this changeset:


http://hg.dovecot.org/dovecot-2.1/rev/a41f64348d0d

changeset:   14453:a41f64348d0d
user:Timo Sirainen t...@iki.fi
date:Fri Apr 20 15:18:14 2012 +0300
files:   src/lib-storage/list/mailbox-list-fs-iter.c
description:
layout=fs: Don't assume '/' hierarchy separator when finding mailbox roots.

Cheers,
Christoph

--
Christoph Bußenius
Rechnerbetriebsgruppe der Fakultäten Informatik und Mathematik
Technische Universität München
+49 89-289-18519  Raum 00.05.040  Boltzmannstr. 3  Garching


Re: [Dovecot] Shared folders not shown if INBOX.shared.%.% is used with dovecot 2.1.10

2012-10-26 Thread Timo Sirainen
On 26.10.2012, at 12.17, Christoph Bußenius wrote:

 On 22.10.2012 16:33, Christoph Bußenius wrote:
 . list  INBOX.shared.%.%
 
 Dovecot 2.1.10 does not list any folders in response to this command.
 
 I hope this helps: I bisected this bug and found it was introduced with this 
 changeset:
 
 http://hg.dovecot.org/dovecot-2.1/rev/a41f64348d0d

I couldn't reproduce this exactly and I don't see how a41f64348d0d makes any 
difference .. but I did find another way to reproduce at least a similar bug. 
Maybe this fixes your problem too? 
http://hg.dovecot.org/dovecot-2.1/rev/22875bcaa952



Re: [Dovecot] Shared folders not shown if INBOX.shared.%.% is used with dovecot 2.1.10

2012-10-26 Thread Christoph Bußenius

Hello Timo,

On 26.10.2012 12:07, Timo Sirainen wrote:

but I did find another way to reproduce at least a similar bug. Maybe this 
fixes your problem too? http://hg.dovecot.org/dovecot-2.1/rev/22875bcaa952


That does fix the problem, thank you!

Cheers,
Christoph

--
Christoph Bußenius
Rechnerbetriebsgruppe der Fakultäten Informatik und Mathematik
Technische Universität München
+49 89-289-18519  Raum 00.05.040  Boltzmannstr. 3  Garching


[Dovecot] Shared folders not shown if INBOX.shared.%.% is used with dovecot 2.1.10

2012-10-22 Thread Christoph Bußenius

Hi,

Thunderbird uses the following IMAP command to list shared folders:

. list  INBOX.shared.%.%

Dovecot 2.1.10 does not list any folders in response to this command.

Dovecot 2.0.21 does list them:

* LIST (\HasNoChildren) . INBOX.shared.user1.folder
. OK List completed.

Both versions list the folders if * is used instead of INBOX.shared.%.%.

Because of this issue, shared folders are not shown in Thunderbird.

The ACL of the folder in question is ACL keilrwtscd for user1 (who is 
trying to access them using Thunderbird).


config:

# 2.1.10: /usr/local/dovecot/etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-42-server x86_64 Ubuntu 10.04.4 LTS
disable_plaintext_auth = no
mail_gid = vmail
mail_location = mdbox:~/mail
mail_plugins = acl
mail_uid = vmail
namespace {
  inbox = no
  list = children
  location = mdbox:%%h/mail
  prefix = INBOX.shared.%%u.
  separator = .
  subscriptions = no
  type = shared
}
namespace default {
  inbox = yes
  location =
  prefix = INBOX.
  separator = .
  type = private
}
passdb {
  args = scheme=CRYPT username_format=%u 
/usr/local/dovecot/etc/dovecot/users

  driver = passwd-file
}
plugin {
  acl = vfile
  acl_shared_dict = file:/mail/shared-mailboxes
}
protocols = imap pop3
service auth {
  unix_listener auth-userdb {
group = vmail
mode = 0660
  }
}
ssl_cert = /etc/ssl/certs/dovecot.pem
ssl_key = /etc/ssl/private/dovecot.pem
userdb {
  args = /usr/local/dovecot/etc/dovecot/users
  driver = passwd-file
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep
  mail_max_userip_connections = 20
  mail_plugins = acl imap_acl acl
}


Cheers,
Christoph

--
Christoph Bußenius
Rechnerbetriebsgruppe der Fakultäten Informatik und Mathematik
Technische Universität München
+49 89-289-18519  Raum 00.05.040  Boltzmannstr. 3  Garching


[Dovecot] Shared folders and home directories

2011-07-21 Thread Christian Lerrahn
Hi,
I've recently migrated a server from a Qmail/VPOPMail setup to a
Postfix/system accounts setup. Everything worked pretty much out of the
box after just changing the passdb and userdb to pam and passwd.
However, I cannot get my shared folders to work. In the logs I will
always see something like

Jul 21 07:24:10 mybox dovecot: IMAP(foobar): Namespace 'shared/':
Could not lookup home for user bla
Jul 21 07:24:11 mybox dovecot: IMAP(foobar): userdb
lookup: connect(/var/run/dovecot/auth-master) failed: No such file or
directory

Now, I don't understand why I need auth-master to find the home
directory of user bla (who owns the shared folder). However, even if
I configure auth-master, only the error messages will go away but I
still can't see the shared folders.

The configuration (as shown below) worked fine with vpopmail and is
just taken from http://wiki.dovecot.org/SharedMailboxes/Shared . What
do I have to change to make this work with passwd instead? Do I really
need auth-master? If yes, how do I need to set it up to do the job
properly?

Cheers,
Christian


# 1.2.15: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-xen-686 i686 Debian 6.0.2 
protocols: imaps pop3s
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
mbox_write_locks: fcntl dotlock
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_plugins(default): acl imap_acl
mail_plugins(imap): acl imap_acl
mail_plugins(pop3): 
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
namespace:
  type: private
  separator: /
  inbox: yes
  list: yes
  subscriptions: yes
namespace:
  type: shared
  separator: /
  prefix: shared/%%n/
  location: maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  list: children
lda:
  mail_plugins: acl
auth default:
  username_chars:
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@%
passdb: driver: pam
  userdb:
driver: passwd
plugin:
  acl: vfile
  acl_anyone: allow
  acl_shared_dict: file:/var/lib/dovecot/shared-mailboxes


Re: [Dovecot] shared folders invisible on new setup

2011-06-03 Thread Timo Sirainen
On Tue, 2011-05-31 at 15:36 +0200, Torsten Harenberg wrote:

 mailserver# doveadm mailbox subscribe -u harenber public.fb8 
..
 namespace {
   list = children
   location = maildir:/var/mail/public:INDEX=~/public
   prefix = public.
   separator = .
   subscriptions = no
   type = public
 }

Looks like doveadm mailbox subscribe ignores the subscriptions=no
setting. It's a bit difficult to fix, since all the difficult code is in
imap-specific code.. Looks like I need to move it elsewhere, maybe for
v2.1..

 But I cannot access this fb8 folder with any client. Alpine says that the 
 public folder is empty:

Try:

doveadm acl debug -u harenber public.fb8




Re: [Dovecot] shared folders invisible on new setup

2011-06-03 Thread Torsten Harenberg
Thanks Timo...

Am 03.06.2011 um 14:34 schrieb Timo Sirainen:

 
 doveadm acl debug -u harenber public.fb8

mailserver# doveadm acl debug -u harenber public.fb8
doveadm(harenber): Error: Can't open mailbox public.fb8: Mailbox doesn't exist: 
fb8
mailserver# 

Or do I miss here something:

mailserver# cd /var/mail/public/fb8/   
mailserver# ls -al
total 58
drwxrwxrwx  5 root  mail512 May 31 12:03 .
drwxrwxrwx  3 root  mail512 May 31 15:27 ..
drwxrwxrwx  2 root  mail512 May 31 10:16 cur
-rwxrwxrwx  1 root  mail 54 May 31 11:46 dovecot-acl
-rwxrwxrwx  1 root  mail 97 May 31 10:16 dovecot-keywords
-rwxrwxrwx  1 root  mail  0 May 31 12:01 dovecot-shared
-rwxrwxrwx  1 root  mail  19228 May 31 10:16 dovecot-uidlist
drwxrwxrwx  2 root  mail  23040 May 31 10:16 new
-rw-r--r--  1 root  mail  5 May 31 12:03 subscriptions
drwxrwxrwx  2 root  mail512 May 31 10:16 tmp

(Content has been copied with the cyrus2dovecot.pl script).

Best regards,

Torsten

--

  
 Dr. Torsten Harenberg harenb...@physik.uni-wuppertal.de  
 Bergische Universitaet   
 FB C - Physik Tel.: +49 (0)202 439-3521  
 Gaussstr. 20  Fax : +49 (0)202 439-2811  
 42097 Wuppertal  
  
 Of course it runs NetBSD http://www.netbsd.org  




Re: [Dovecot] shared folders invisible on new setup

2011-06-03 Thread Timo Sirainen
On Fri, 2011-06-03 at 14:37 +0200, Torsten Harenberg wrote:

 mailserver# doveadm acl debug -u harenber public.fb8
 doveadm(harenber): Error: Can't open mailbox public.fb8: Mailbox doesn't 
 exist: fb8
 mailserver# 
 
 Or do I miss here something:
 
 mailserver# cd /var/mail/public/fb8/  
  

Yeah, either rename this to /var/mail/public/.fb8/ or add :LAYOUT=fs to
namespace location.




Re: [Dovecot] shared folders invisible on new setup

2011-06-03 Thread Torsten Harenberg

Am 03.06.2011 um 14:45 schrieb Timo Sirainen:

 Yeah, either rename this to /var/mail/public/.fb8/ or add :LAYOUT=fs to
 namespace location.

Ahh.. that worked :)

Thanks a lot!!! I think I wouldn't have found it.

Best regards,

   Torsten

--

  
 Dr. Torsten Harenberg harenb...@physik.uni-wuppertal.de  
 Bergische Universitaet   
 FB C - Physik Tel.: +49 (0)202 439-3521  
 Gaussstr. 20  Fax : +49 (0)202 439-2811  
 42097 Wuppertal  
  
 Of course it runs NetBSD http://www.netbsd.org  




[Dovecot] shared folders invisible on new setup

2011-05-31 Thread Torsten Harenberg
Dear list,

I hope this is not an old issue, but I couldn't find a solution even after 
google'ing quite some time. 

I try to migrate our institute's mail server (~200 users) from an old 
cyrus-based Mac installation to a new machine (NetBSD, dovecot 2.0.13). 
Everything went quite smoothly so far, but we are used to have shared folders 
(public folders in dovecot) and I simply couldn't make them to appear.

I have two separate folders for private (user) mails and for public ones (yes, 
I set everything to 777 for the moment to avoid file access problems):

mailserver# pwd
/var/mail
mailserver# ls -al
total 8
drwxrwxrwt   4 dovecot  wheel  512 May 31 12:26 .
drwxr-xr-x  28 root wheel  512 Mar 29 15:05 ..
drwxrwxrwx   3 root mail   512 May 31 15:18 public
drwxrwxrwx   4 root wheel  512 May 31 12:26 user

In the public folder there is a shared folder named fb8:

mailserver# pwd
/var/mail/public
mailserver# ls -al
total 8
drwxrwxrwx  3 root mail   512 May 31 15:18 .
drwxrwxrwt  4 dovecot  wheel  512 May 31 12:26 ..
-rw-rw-rw-  1 10001mail 0 May 31 15:14 dovecot-acl-list
-rwxrwxrwx  1 root mail 0 May 31 11:06 dovecot-shared
drwxrwxrwx  5 root mail   512 May 31 12:03 fb8


Now my own username (LDAP-based) is harenber and I try to subscribe myself to 
this list:

mailserver# doveadm mailbox subscribe -u harenber public.fb8 
mailserver# 

So a subscriptions file appears:

mailserver# ls -al
total 8
drwxrwxrwx  3 root mail   512 May 31 15:18 .
drwxrwxrwt  4 dovecot  wheel  512 May 31 12:26 ..
-rw-rw-rw-  1 10001mail 0 May 31 15:14 dovecot-acl-list
-rwxrwxrwx  1 root mail 0 May 31 11:06 dovecot-shared
drwxrwxrwx  5 root mail   512 May 31 12:03 fb8
-rw-rw-rw-  1 10001mail 4 May 31 15:18 subscriptions
mailserver# cat subscriptions  
fb8
mailserver# 

(although I think this is wrong, as I have

namespace {
  list = children
  location = maildir:/var/mail/public:INDEX=~/public
  prefix = public.
  separator = .
  subscriptions = no
  type = public
}

I would assume this file to appear somewhere in 
/var/mail/user/harenber/public... )

But I cannot access this fb8 folder with any client. Alpine says that the 
public folder is empty:

--Folder-Collection
 test 

  
--


   
   [No Folders in 
Collection]   

and also Apple Mail sees nothing beneath public.

Tried to speak IMAP directly shows:

01 login harenber X
01 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE 
SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN 
NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT 
SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS ACL RIGHTS=texk] Logged in
02 namespace
* NAMESPACE (( .)) NIL ((public. .))
02 OK Namespace completed.
03 list  *
* LIST (\HasNoChildren) . Trash
* LIST (\HasNoChildren) . ALiCEnext

[...]

* LIST (\HasNoChildren) . sent-mail
* LIST (\HasNoChildren) . tier2
* LIST (\HasNoChildren) . trash
* LIST (\HasNoChildren) . INBOX
* LIST (\Noselect \HasChildren) . public
03 OK List completed

Maybe someone of you has a clue what I do wrong here, I'm completely lost at 
the moment.

Thanks for any hint and best regards,

   Torsten

mailserver# doveconf -n   
# 2.0.13: /usr/pkg/etc/dovecot/dovecot.conf
# OS: NetBSD 5.1 amd64  ffs
auth_debug = yes
auth_verbose = yes
base_dir = /var/run/dovecot/
mail_debug = yes
mail_gid = 6
mail_location = maildir:/var/mail/user/%u
mail_plugins = acl
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
namespace {
  inbox = yes
  location = 
  prefix = 
  separator = .
  type = private
}
namespace {
  list = children
  location = maildir:/var/mail/public:INDEX=%u/public
  prefix = public.
  separator = .
  subscriptions = no
  type = public
}
passdb {
  args = /usr/pkg/etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  acl = vfile
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap pop3 lmtp sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660

Re: [Dovecot] dovecot+shared folders

2011-05-11 Thread Timo Sirainen
On Fri, 2011-05-06 at 17:03 +0400, Alexey Eropkin wrote:

 And all seems ok, but I cannot understand how to make delet flag per user.
 If I permit t and e in ACL, users delet message forever for all.

Not possible currently. Although you could easily modify the source code
to do that.




[Dovecot] dovecot+shared folders

2011-05-06 Thread Alexey Eropkin
Hi all.

I have dovecot 1.2.15 on debian + mysql+shared folders.

My config

login_process_size = 128
login_processes_count = 10
login_process_per_connection = no
login_max_connections = 3000
login_max_processes_count = 1000
mail_process_size = 1024

protocols = imap imaps pop3 pop3s managesieve

protocol managesieve {
   login_executable = /usr/lib/dovecot/managesieve-login
   mail_executable = /usr/lib/dovecot/managesieve
}

disable_plaintext_auth = no
log_timestamp = %Y-%m-%d %H:%M:%S 

mail_location = maildir:~
namespace private {
   separator = /
   prefix =
   inbox = yes
   hidden = no
   subscriptions = yes
}

namespace shared {
  separator = /
  prefix = shared/%%u/
  location = maildir:%%h:INDEX=~/shared/%%u:CONTROL=~/shared/%%u
  inbox = no
  hidden = no
  subscriptions = no
  list = children
}

mail_privileged_group = vmail

first_valid_uid = 500
last_valid_uid = 5
first_valid_gid = 500
last_valid_gid = 5

protocol imap {
  imap_client_workarounds = outlook-idle
  mail_plugins = acl imap_acl
}

protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}

protocol managesieve {
  mail_location = mbox:~/
}

protocol lda {
  postmaster_address = postmast...@chronopay.ru
  mail_plugin_dir = /usr/lib/dovecot/modules/lda
  auth_socket_path = /var/run/dovecot/auth-master
  mail_plugins = acl sieve
}

auth default {
  mechanisms = plain login
  #digest-md5 cram-md5

  passdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
  }

  passdb sql {
args = /etc/dovecot/dovecot-sql.conf
  }

 #userdb ldap {
 #   args = /etc/dovecot/dovecot-ldap.conf
 # }

  userdb static {
args = uid=5000 gid=5000 home=/.mail/%d/%n
  }

  user = root

  socket listen {
 master {
   path = /var/run/dovecot/auth-master
   mode = 0660
   user = vmail # User running Dovecot LDA
   group = vmail # Or alternatively mode 0660 + LDA user in this group
 }
client {
  path = /var/spool/postfix/private/auth
  mode = 0660
  user = postfix
  group = postfix
}
   }

}

plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir=~/sieve
  acl = vfile
  acl_shared_dict = file:/.mail/%d/shared-mailboxes.db
}


And all seems ok, but I cannot understand how to make delet flag per user.
If I permit t and e in ACL, users delet message forever for all.

-- 
Software is like sex, it is better when it's free


Re: [Dovecot] Shared Folders via Symlinking

2011-01-01 Thread Adrian Mardlin


On 30 Dec 2010, at 11:46, Timo Sirainen wrote:

 On Wed, 2010-12-22 at 11:02 +, Adrian Mardlin wrote:
 I've managed to fix this initial problem by using INDEX=MEMORY. However, 
 there's another side-effect. When deleting a symlinked folder, it leaves 
 behind a file called ..DOVECOT-TRASHED, which is still symlinked. This then 
 prevents that user from deleting any other folders.
 
 Well, http://hg.dovecot.org/dovecot-2.0/rev/b78e772cf1d2 fixes this
 problem but I'm not sure what to do about the indexing problem.. I'll
 either have to fix it some way or just disallow symlinks..
 

How about simply deleting the index files before removing the symlink? Why 
would the Index files need to indicate that a mailbox has been deleted - surely 
that's handled by the fact that it's not there any more?

Regards,

Adrian


The content of this email and any attachment is private and may be legally 
privileged.  If you are not the intended recipient, any use, disclosure, 
copying or forwarding of this email and/or its attachments is unauthorised.  If 
you have received this email in error please notify the sender by email and 
delete this message and any attachments immediately from this system.

The Very Good Email Company is a trading style of APM Internet Limited. APM 
Internet Limited is a limited company incorporated in England and Wales with 
registration number 04601087 and whose registered office is at Charter Court, 
Midland Road, Hemel Hempstead, Hertfordshire HP2 5GE


Re: [Dovecot] Shared Folders via Symlinking

2011-01-01 Thread Timo Sirainen
On Sat, 2011-01-01 at 16:35 +, Adrian Mardlin wrote:
 
  Well, http://hg.dovecot.org/dovecot-2.0/rev/b78e772cf1d2 fixes this
  problem but I'm not sure what to do about the indexing problem..
 I'll
  either have to fix it some way or just disallow symlinks..
  
 
 How about simply deleting the index files before removing the symlink?
 Why would the Index files need to indicate that a mailbox has been
 deleted - surely that's handled by the fact that it's not there any
 more?

It's to avoid race conditions when another session accesses a mailbox
during mailbox deletion. For example quota could get screwed up.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Shared Folders via Symlinking

2010-12-30 Thread Timo Sirainen
On Wed, 2010-12-22 at 11:02 +, Adrian Mardlin wrote:
 I've managed to fix this initial problem by using INDEX=MEMORY. However, 
 there's another side-effect. When deleting a symlinked folder, it leaves 
 behind a file called ..DOVECOT-TRASHED, which is still symlinked. This then 
 prevents that user from deleting any other folders.

Well, http://hg.dovecot.org/dovecot-2.0/rev/b78e772cf1d2 fixes this
problem but I'm not sure what to do about the indexing problem.. I'll
either have to fix it some way or just disallow symlinks..



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Shared Folders via Symlinking

2010-12-22 Thread Adrian Mardlin
I've managed to fix this initial problem by using INDEX=MEMORY. However, 
there's another side-effect. When deleting a symlinked folder, it leaves behind 
a file called ..DOVECOT-TRASHED, which is still symlinked. This then prevents 
that user from deleting any other folders.

Adrian Mardlin in charge @ The Very Good Email Company 
t 01442 892641 m 07920 102401 f 01442 808081 w www.verygoodemail.com



On 21 Dec 2010, at 11:26, Adrian Mardlin wrote:

 Hi folks,
 
 I'm trying to set up shared folders via symlinking and have come across a 
 problem. I created a folder for one user, then symlinked it to another. I 
 figured that one thing that is likely to happen at some point is that user 2 
 is going to decide they don't want to look at that folder any more, and will 
 delete it, so I tried this. Much to my relief, it didn't delete the actual 
 mails, just the symlink. However, it did alter the dovecot.index.cache file 
 to indicate that the folder had been removed, and subsequent attempts to 
 select this folder via the primary user resulted in an error, NO Mailbox was 
 deleted under us. I had to delete dovecot.index.cache to get it working 
 again.
 
 Sorry - can't bring myself to call folders mailboxes... ;-)
 
 Adrian Mardlin in charge @ The Very Good Email Company 
 t 01442 892641 m 07920 102401 f 01442 808081 w www.verygoodemail.com
 
 
 
 
 
 The content of this email and any attachment is private and may be legally 
 privileged.  If you are not the intended recipient, any use, disclosure, 
 copying or forwarding of this email and/or its attachments is unauthorised.  
 If you have received this email in error please notify the sender by email 
 and delete this message and any attachments immediately from this system.
 
 The Very Good Email Company is a trading style of APM Internet Limited. APM 
 Internet Limited is a limited company incorporated in England and Wales with 
 registration number 04601087 and whose registered office is at Charter Court, 
 Midland Road, Hemel Hempstead, Hertfordshire HP2 5GE



The content of this email and any attachment is private and may be legally 
privileged.  If you are not the intended recipient, any use, disclosure, 
copying or forwarding of this email and/or its attachments is unauthorised.  If 
you have received this email in error please notify the sender by email and 
delete this message and any attachments immediately from this system.

The Very Good Email Company is a trading style of APM Internet Limited. APM 
Internet Limited is a limited company incorporated in England and Wales with 
registration number 04601087 and whose registered office is at Charter Court, 
Midland Road, Hemel Hempstead, Hertfordshire HP2 5GE

[Dovecot] Shared Folders via Symlinking

2010-12-21 Thread Adrian Mardlin
Hi folks,

I'm trying to set up shared folders via symlinking and have come across a 
problem. I created a folder for one user, then symlinked it to another. I 
figured that one thing that is likely to happen at some point is that user 2 is 
going to decide they don't want to look at that folder any more, and will 
delete it, so I tried this. Much to my relief, it didn't delete the actual 
mails, just the symlink. However, it did alter the dovecot.index.cache file to 
indicate that the folder had been removed, and subsequent attempts to select 
this folder via the primary user resulted in an error, NO Mailbox was deleted 
under us. I had to delete dovecot.index.cache to get it working again.

Sorry - can't bring myself to call folders mailboxes... ;-)

Adrian Mardlin in charge @ The Very Good Email Company 
t 01442 892641 m 07920 102401 f 01442 808081 w www.verygoodemail.com





The content of this email and any attachment is private and may be legally 
privileged.  If you are not the intended recipient, any use, disclosure, 
copying or forwarding of this email and/or its attachments is unauthorised.  If 
you have received this email in error please notify the sender by email and 
delete this message and any attachments immediately from this system.

The Very Good Email Company is a trading style of APM Internet Limited. APM 
Internet Limited is a limited company incorporated in England and Wales with 
registration number 04601087 and whose registered office is at Charter Court, 
Midland Road, Hemel Hempstead, Hertfordshire HP2 5GE

Re: [Dovecot] shared folders general question

2010-10-25 Thread Timo Sirainen
On Fri, 2010-10-22 at 15:42 +0200, Johan Hendriks wrote:
 I have one more question.
 Is it possible if you share the inbox, that all subfolders will be 
 visable to.
 I can not see the subfolders of the shared inbox.
 
 This is not very useful if the user which shares his inbox, has sieve 
 rules active that stores e-mail directly into subfolders.

You have to explicitly specify all the mailboxes you want to share.
There is no ACL inheritance.




Re: [Dovecot] Shared folders, please help.!

2010-10-25 Thread Timo Sirainen
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.




[Dovecot] shared folders general question

2010-10-22 Thread Johan Hendriks

Hello all.

Thanks to the patience off Timo i finally got my shared folders working.

I have one more question.
Is it possible if you share the inbox, that all subfolders will be 
visable to.

I can not see the subfolders of the shared inbox.

This is not very useful if the user which shares his inbox, has sieve 
rules active that stores e-mail directly into subfolders.


Thanks
regards,
Johan


Re: [Dovecot] Shared folders, please help.!

2010-10-20 Thread Johan Hendriks
2010/10/18 Timo Sirainen t...@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/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=h...@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(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=r...@localdomain.com, 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=jo...@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


Re: [Dovecot] Shared folders, please help.!

2010-10-18 Thread Johan Hendriks
2010/10/15 Timo Sirainen t...@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 '^]'.
* 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=jo...@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=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:

Re: [Dovecot] Shared folders, please help.!

2010-10-18 Thread 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.)




Re: [Dovecot] Shared folders, please help.!

2010-10-18 Thread Johan Hendriks
2010/10/18 Timo Sirainen t...@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


Re: [Dovecot] Shared folders, please help.!

2010-10-18 Thread 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)



Re: [Dovecot] Shared folders, please help.!

2010-10-15 Thread Timo Sirainen
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=h...@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




Re: [Dovecot] Shared folders, please help.!

2010-10-15 Thread 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




Re: [Dovecot] Shared folders, please help.!

2010-10-14 Thread 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




Re: [Dovecot] Shared folders, please help.!

2010-10-14 Thread Johan Hendriks
2010/10/14 Timo Sirainen t...@iki.fi

 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.!

2010-10-14 Thread 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.




Re: [Dovecot] Shared folders, please help.!

2010-10-14 Thread Johan Hendriks
2010/10/14 Timo Sirainen t...@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 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=h...@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/
- 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 = 0660
   user = 

[Dovecot] Shared folders, please help.!

2010-10-11 Thread Johan Hendriks

 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 jo...@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 = postmas...@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 jo...@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 h...@domain.com lr
b OK Setacl complete.
c GETACL INBOX
* ACL INBOX h...@domain.com lr jo...@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...

Re: [Dovecot] Shared folders issue

2010-07-23 Thread Timo Sirainen
On Fri, 2010-07-23 at 15:17 +0200, Emmanuel Gonzalez Carmona wrote:
 Hello guys,
 I have an issue with shared folders:
 
 1) The USERA shares his INBOX with USERB
 2) USERB subscribes the USERA share without problems.
 3) USERA deletes all his / or some directories from his INBOX (Trash, 
 Drafts and Sent)
 4) USERA logouts and makes login, so dovecot recreates the folders.
 5) USERB gains access to subscrive those folders (Trash, Drafts and Sent)

Ugh. I guess it's time for v1.2.13. Fixed:
http://hg.dovecot.org/dovecot-1.2/rev/aae3b2a12cd0




[Dovecot] shared folders - dbox

2010-07-22 Thread Hajo Locke

Hello,

iam interested in using dbox format with dovecot2.
Ist it possible to use shared folders with this storage format?
i only see references to Maildir.

Thanks,
Hajo


Re: [Dovecot] shared folders - dbox

2010-07-22 Thread Timo Sirainen
On Thu, 2010-07-22 at 17:17 +0200, Hajo Locke wrote:

 iam interested in using dbox format with dovecot2.
 Ist it possible to use shared folders with this storage format?
 i only see references to Maildir.

Yes, it works pretty much the same way, but currently you can't have
per-user \Seen flags like with Maildir.




[Dovecot] Shared folders in 2.0

2010-04-08 Thread B. Johannessen
Anyone using shared folders in 2.0? If so, would you care to share your 
configuration? I'm seeing all kinds of strangeness, and the only 
consistent thing so far is that my results are thoroughly inconsistent.


There's a very good chance this is all because of my very limited 
experience with Dovecot, which is why I'd like to be able to start my 
experiments from a known good configuration.


Anyone?


Bob


[Dovecot] Shared folders

2010-03-16 Thread Неворотин Вадим
I need to create a shared folder (mailbox for group mailing list) with
access of several accounts to it. But all peoples with access to this
mailbox should be able to work with this folder absolutely in the same way,
as with local mailbox. Each user should be able to delete emails and mark it
as readed. But this changes must be only for one user, not for others. For
example user1 and user2 have access to folder Trades. There is a new
incoming mail. User1 read it and delete. But in user2's client this mail
must be not readed and not deleted. So there should be only one copy of a
email (in group mailbox), but state (unreaded|readed|deleted) of this email
shoud be different for each user.
Can I do this with dovecot? Yes, I know that I can send a copy of group
letter to each user's mailbox, but unfortunately I has a lot of groups and
very big letters, so I can't duplicate each letter to many mailboxes. The
purpose is to story only one instance of each letter, but to allow users to
work with it like with their own letters. Now I use Maildir++ mailboxes.


Re: [Dovecot] shared folders in v1.2 with one uid per user

2009-06-15 Thread Timo Sirainen
On Sat, 2009-06-06 at 14:48 -0300, Ezequiel Alfíe wrote:

 What are the steps for correctly setting up shared folders with acls
 if I choose one uid per user?

It's going to be annoyingly difficult.
http://wiki.dovecot.org/SharedMailboxes/Permissions describes the
issues, but doesn't really tell what is a good way to do it, because
there really are only bad ways. Dovecot v3.0 will hopefully solve
this. :)



signature.asc
Description: This is a digitally signed message part


[Dovecot] shared folders in v1.2 with one uid per user

2009-06-06 Thread Ezequiel Alfíe
Hello everyone.

I'm new to dovecot and I'm setting up a server for one domain only. I
have not yet decided whether I will be using one uid per user or one
uid for all of them.

What are the steps for correctly setting up shared folders with acls
if I choose one uid per user?

What advantages or disadvantages has setting one uid for all users vs
one uid per user, considering I wish to setup shared folders
(including security, performance, etc) ?

Thanks in advance,

Ezequiel


Re: [Dovecot] Shared folders and subscriptions

2009-04-18 Thread Markus Werner
On Fri, Apr 17, 2009 at 07:07:49PM -0400, Timo Sirainen wrote:
 I tried this. The following is logged:

 Apr 18 00:12:01 asterix dovecot: IMAP(mar...@example.com):
 fchown(/var/spool/dovecot/users/example.com/markus/Maildir/control/ 
 shared/subscriptions.lock,
 -1, 0) failed: Operation not permitted

 It tries to preserve the group. Try chmod g+s to the empty directory.

That worked. Thanks again.


[Dovecot] Shared folders and subscriptions

2009-04-17 Thread Markus Werner
Hi,

I've got a problem with user shared folders and subscriptions. When I try to
subscribe a folder, dovecot returns OK Subscribe completed, but the newly
subscribed folder is not listed with LSUB:

a1 login t...@example.com ***
a1 OK [CAP.
a2 list  *
* LIST (\HasChildren) / INBOX
* LIST (\Noselect \HasChildren) / #User
* LIST (\Noselect \HasChildren) / #User/mar...@example.com
* LIST (\HasNoChildren) / #User/mar...@example.com/ForTest
a3 subscribe #User/mar...@example.com/ForTest
a3 OK Subscribe completed.
a4 lsub  *
* LSUB (\Noselect) / #User/mar...@example.com


Dovecot is 1.2-rc3, namespace configuration as follows:

namespace private {
separator = /
prefix = INBOX/
inbox = yes
subscriptions = yes
}

namespace public {
separator = /
prefix = #Shared/
location = 
maildir:/var/spool/dovecot/sharedfolders:INDEX=~/Maildir/index/public:CONTROL=~/Maildir/control/public
subscriptions = yes
}

namespace shared {
separator = /
prefix = #User/%%u/
location = 
maildir:%%h/Maildir:INDEX=~/Maildir/index/shared/%%u:CONTROL=~/Maildir/control/shared
subscriptions = yes
list = yes
}

I tried without CONTROL= directory in the shared namespace, but that made no 
difference.

Contents of the subscriptions (with CONTROL=) file after subscribing:

ForTestUser



Regards,
Markus


Re: [Dovecot] Shared folders and subscriptions

2009-04-17 Thread Timo Sirainen
On Fri, 2009-04-17 at 22:48 +0200, Markus Werner wrote:
 namespace shared {
 separator = /
 prefix = #User/%%u/
 location = 
 maildir:%%h/Maildir:INDEX=~/Maildir/index/shared/%%u:CONTROL=~/Maildir/control/shared
 subscriptions = yes
 list = yes
 }

The CONTROL must have also %%u in it, otherwise different shared users'
control files get mixed together and everything breaks.

Preferably you should also be using subscriptions=no so you wouldn't
have to specify CONTROL at all, but for that you'd need to have a
namespace with prefix=.

Anyway, this fixes subscriptions=yes:
http://hg.dovecot.org/dovecot-1.2/rev/0dcb7e34a216


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Shared folders and subscriptions

2009-04-17 Thread Markus Werner
On Fri, Apr 17, 2009 at 05:22:32PM -0400, Timo Sirainen wrote:
 On Fri, 2009-04-17 at 22:48 +0200, Markus Werner wrote:
  namespace shared {
  separator = /
  prefix = #User/%%u/
  location = 
  maildir:%%h/Maildir:INDEX=~/Maildir/index/shared/%%u:CONTROL=~/Maildir/control/shared
  subscriptions = yes
  list = yes
  }
 
 The CONTROL must have also %%u in it, otherwise different shared users'
 control files get mixed together and everything breaks.

Thanks. I completely overlooked that missing part.

 Preferably you should also be using subscriptions=no so you wouldn't
 have to specify CONTROL at all, but for that you'd need to have a
 namespace with prefix=.

Would an additional namespace, for subscriptions only, work? I would
like to keep all subfolders of an Mailbox under INBOX/ .

 Anyway, this fixes subscriptions=yes:
 http://hg.dovecot.org/dovecot-1.2/rev/0dcb7e34a216

Works, thanks.


Re: [Dovecot] Shared folders and subscriptions

2009-04-17 Thread Timo Sirainen
On Fri, 2009-04-17 at 23:38 +0200, Markus Werner wrote:
  Preferably you should also be using subscriptions=no so you wouldn't
  have to specify CONTROL at all, but for that you'd need to have a
  namespace with prefix=.
 
 Would an additional namespace, for subscriptions only, work? I would
 like to keep all subfolders of an Mailbox under INBOX/ .

It would be possible to do both. The INBOX/ could be set up as a hidden
namespace and the  namespace would be the default one. Or is there a
reason why you wouldn't want  namespace to show up anything?

Or you could also see if you could create a private namespace with
prefix=#User/ and subscriptions=yes, perhaps with
location=maildir:/var/lib/dovecot/empty:CONTROL=~/Maildir/shared where
the empty directory would be a world-readable non-writable empty
directory. That namespace should then catch subscriptions to shared
mailboxes.


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Shared folders and subscriptions

2009-04-17 Thread Markus Werner
On Fri, Apr 17, 2009 at 05:43:01PM -0400, Timo Sirainen wrote:
 It would be possible to do both. The INBOX/ could be set up as a hidden
 namespace and the  namespace would be the default one. Or is there a
 reason why you wouldn't want  namespace to show up anything?

Crying users, because suddenly something in their clients looks very
different :) I have many of those.

 Or you could also see if you could create a private namespace with
 prefix=#User/ and subscriptions=yes, perhaps with
 location=maildir:/var/lib/dovecot/empty:CONTROL=~/Maildir/shared where
 the empty directory would be a world-readable non-writable empty
 directory. That namespace should then catch subscriptions to shared
 mailboxes.

I tried this. The following is logged:

Apr 18 00:12:01 asterix dovecot: IMAP(mar...@example.com):
fchown(/var/spool/dovecot/users/example.com/markus/Maildir/control/shared/subscriptions.lock,
-1, 0) failed: Operation not permitted
Apr 18 00:12:01 asterix dovecot: IMAP(mar...@example.com):
file_dotlock_open() failed with subscription file
/var/spool/dovecot/users/example.com/markus/Maildir/control/shared/subscriptions:
Operation not permitted


Re: [Dovecot] Shared folders and subscriptions

2009-04-17 Thread Timo Sirainen

On Apr 17, 2009, at 6:28 PM, Markus Werner wrote:


Or you could also see if you could create a private namespace with
prefix=#User/ and subscriptions=yes, perhaps with
location=maildir:/var/lib/dovecot/empty:CONTROL=~/Maildir/shared  
where

the empty directory would be a world-readable non-writable empty
directory. That namespace should then catch subscriptions to shared
mailboxes.


I tried this. The following is logged:

Apr 18 00:12:01 asterix dovecot: IMAP(mar...@example.com):
fchown(/var/spool/dovecot/users/example.com/markus/Maildir/control/ 
shared/subscriptions.lock,

-1, 0) failed: Operation not permitted


It tries to preserve the group. Try chmod g+s to the empty directory.



Re: [Dovecot] Shared Folders

2009-03-11 Thread Charles Marcus
 So I do have permission to open the directory but dovecot doesn't
 agree  (Is this a sign I should just give up on 1.0.7? :-)

Yes... 1.1 is much better, but 1.2 is getting very close and is even
better still...

Personally, I'd just move on to 1.2...


Re: [Dovecot] Shared Folders

2009-03-11 Thread Stephen Carville
On Wed, Mar 11, 2009 at 4:02 AM, Charles Marcus
cmar...@media-brokers.com wrote:
 So I do have permission to open the directory but dovecot doesn't
 agree  (Is this a sign I should just give up on 1.0.7? :-)

 Yes... 1.1 is much better, but 1.2 is getting very close and is even
 better still...

 Personally, I'd just move on to 1.2...


I upgraded to 1.1.7 and still get the same error tho with a lot more log output:

Mar 11 08:46:49 scacifs02-lnx dovecot: auth(default): client in:
AUTH#0111#011PLAIN#011service=imap#011secured#011lip=10.212.166.21#011rip=10.212.202.63#011lport=993#011rport=57543#011resp=hidden
Mar 11 08:46:49 scacifs02-lnx dovecot: auth-worker(default):
pam(stephen,10.212.202.63): lookup service=dovecot
Mar 11 08:46:49 scacifs02-lnx dovecot: auth-worker(default):
pam(stephen,10.212.202.63): #1/1 style=1 msg=Password:
Mar 11 08:46:49 scacifs02-lnx dovecot: auth(default): client out:
OK#0111#011user=stephen
Mar 11 08:46:49 scacifs02-lnx dovecot: auth(default): master in:
REQUEST#0112#01123763#0111
Mar 11 08:46:49 scacifs02-lnx dovecot: auth(default):
passwd-file(stephen,10.212.202.63): lookup: user=stephen
file=/etc/imap.passwd
Mar 11 08:46:49 scacifs02-lnx dovecot: auth(default): master out:
USER#0112#011stephen#011uid=501#011gid=10#011home=/home/stephen
Mar 11 08:46:49 scacifs02-lnx dovecot: imap-login: Login:
user=stephen, method=PLAIN, rip=10.212.202.63, lip=10.212.166.21,
TLS
Mar 11 08:46:49 scacifs02-lnx dovecot: IMAP(stephen): Effective
uid=501, gid=10, home=/home/stephen
Mar 11 08:46:49 scacifs02-lnx dovecot: IMAP(stephen): Namespace:
type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes,
subscriptions=yes
Mar 11 08:46:49 scacifs02-lnx dovecot: IMAP(stephen): maildir: data=~/Maildir
Mar 11 08:46:49 scacifs02-lnx dovecot: IMAP(stephen): maildir++:
root=/home/stephen/Maildir, index=, control=,
inbox=/home/stephen/Maildir
Mar 11 08:46:49 scacifs02-lnx dovecot: IMAP(stephen): Namespace:
type=public, prefix=CS/, sep=/, inbox=no, hidden=no, list=yes,
subscriptions=no
Mar 11 08:46:49 scacifs02-lnx dovecot: IMAP(stephen): maildir:
data=/var/spool/mail/public/cs/mail:CONTROL=~/Maildir/CS:INDEX=~/Maildir/CS
Mar 11 08:46:49 scacifs02-lnx dovecot: IMAP(stephen): maildir++:
root=/var/spool/mail/public/cs/mail, index=/home/stephen/Maildir/CS,
control=/home/stephen/Maildir/CS, inbox=
Mar 11 08:46:49 scacifs02-lnx dovecot: IMAP(stephen):
opendir(/var/spool/mail/public/cs/mail) failed: Permission denied
Mar 11 08:46:49 scacifs02-lnx dovecot: IMAP(stephen): Connection
closed bytes=42/1069
Mar 11 08:46:49 scacifs02-lnx dovecot: auth(default): new auth
connection: pid=23773


Dovecot still insists I don't have permission to open the directory.

As an ordinary IMAP server Dovecot performs very well.  It is only
public/shared folders that are causing a problem.  Unfortunately that
is exactly what the boss wants now.

-- 
Stephen Carville


Re: [Dovecot] Shared Folders

2009-03-11 Thread Stephen Carville
I did some more testing and it looks like public really means public !

For example:

$ id stephen
uid=501(stephen) gid=100(users) groups=100(users),10(wheel),1000(cs)

Normally stephen should have rwx access to the following directory:

$ ls -ald /usr/mail/public/cs
drwxrwx--- 4 cs cs 4096 Mar 11 07:22 /usr/mail/public/cs

But dovecot it insists

Mar 11 09:59:23 scacifs02-lnx dovecot: IMAP(stephen):
opendir(/usr/mail/public/cs) failed: Permission denied

Id I change the permissions:

$ ls -ald /usr/mail/public/cs
drwxrwxr-x 4 cs cs 4096 Mar 11 07:22 /usr/mail/public/cs

it now fails at:

Mar 11 10:07:02 scacifs02-lnx dovecot: IMAP(stephen):
opendir(/usr/mail/public/cs/mail) failed: Permission denied

If I change the permission on that directory

$ ls -lad /usr/mail/public/cs/mail
drwxrwxr-x 3 cs cs 4096 Mar 10 22:07 /usr/mail/public/cs/mail

Mar 11 10:14:12 scacifs02-lnx dovecot: IMAP(stephen):
opendir(/usr/mail/public/cs/mail/.Incoming) failed: Permission denied

one more level

$ ls -lad /usr/mail/public/cs/mail/.Incoming
drwxrwxr-x 5 cs cs 4096 Mar 10 21:01 /usr/mail/public/cs/mail/.Incoming

Mar 11 10:16:45 scacifs02-lnx dovecot: IMAP(stephen):
opendir(/usr/mail/public/cs/mail/.Incoming/new) failed: Permission
denied

and again:

$ ls -lA /usr/mail/public/cs/mail/.Incoming
total 12
drwxrwxr-x 2 cs cs 4096 Mar 10 21:01 cur
-rw-rw 1 cs cs0 Mar 10 21:01 dovecot-shared
drwxrwxr-x 2 cs cs 4096 Mar 10 21:01 new
drwxrwxr-x 2 cs cs 4096 Mar 10 21:01 tmp

Now I try to move a mail into the Incoming folder:

Mar 11 10:20:50 scacifs02-lnx dovecot: IMAP(stephen):
open(/usr/mail/public/cs/mail/.Incoming/tmp/1236792050.M931023P1390.scacifs02-lnx.totalflood.com)
failed: Permission denied

The only two ways I can get public folders to work is to

1.  set the directory perms to 777.

2.  make sure all user have the same primary group and make that
groups for the public folder.

Neither of the above are particularly desirable nor practical.  Is
there another way?


Re: [Dovecot] Shared Folders

2009-03-11 Thread Stephen Carville
Looks like ACL's might work.


[Dovecot] Shared Folders

2009-03-10 Thread Stephen Carville
I am trying to get a shared folder to work.  I created a directory /var/mail/CS:

drwxr-xr-x 3 root root 4096 Mar 10 16:09 /var/mail/CS

Inside of that I put

-rw-rw 1 root cs  0 Mar 10 16:49 dovecot-shared
drwxrws--- 5 root cs   4096 Mar 10 16:09 .Incoming

When I try to subscribe to Incoming, I get the following error:

Mar 10 16:45:17 scacifs02-lnx dovecot: imap-login: Login:
user=stephen, method=PLAIN, rip=10.212.202.63, lip=10.212.166.21,
TLS
Mar 10 16:45:17 scacifs02-lnx dovecot: IMAP(stephen):
mkdir(/var/mail/CS/cur) failed: Permission denied
Mar 10 16:45:28 scacifs02-lnx dovecot: IMAP(stephen): Connection closed

whats happening here?  Why is dovecot even trying to create var/mail/CS/cur?

Version = 1.0.7

protocols: imaps
listen: *
ssl_cert_file: /etc/pki/dovecot/certs/scacifs02-lnx.dovecot.crt
ssl_key_file: /etc/pki/dovecot/private/scacifs02-lnx.dovecot.key
disable_plaintext_auth: yes
login_dir: /var/run/dovecot/login
login_executable: /usr/libexec/dovecot/imap-login
mail_location: maildir:~/Maildir
maildir_copy_with_hardlinks: yes
namespace:
  type: private
  separator: /
  inbox: yes
namespace:
  type: public
  separator: /
  prefix: CS/
  location: maildir:/var/mail/CS:CONTROL=~/Maildir/CS:INDEX=~/Maildir/CS
auth default:
  passdb:
driver: pam
  userdb:
driver: passwd-file
args: /etc/imap.passwd


-- 
Stephen Carville


Re: [Dovecot] Shared Folders

2009-03-10 Thread Timo Sirainen

On Mar 10, 2009, at 8:21 PM, Stephen Carville wrote:


Mar 10 16:45:17 scacifs02-lnx dovecot: IMAP(stephen):
mkdir(/var/mail/CS/cur) failed: Permission denied
Mar 10 16:45:28 scacifs02-lnx dovecot: IMAP(stephen): Connection  
closed


whats happening here?  Why is dovecot even trying to create var/mail/ 
CS/cur?


Version = 1.0.7


Because v1.0 is buggy here and always tries to create the Maildir  
directories. Either create the cur/new/tmp for it or upgrade to v1.1.




Re: [Dovecot] Shared Folders

2009-03-10 Thread Stephen Carville
On Tue, Mar 10, 2009 at 5:46 PM, Timo Sirainen t...@iki.fi wrote:
 On Mar 10, 2009, at 8:21 PM, Stephen Carville wrote:

 Mar 10 16:45:17 scacifs02-lnx dovecot: IMAP(stephen):
 mkdir(/var/mail/CS/cur) failed: Permission denied
 Mar 10 16:45:28 scacifs02-lnx dovecot: IMAP(stephen): Connection closed

 whats happening here?  Why is dovecot even trying to create
 var/mail/CS/cur?

 Version = 1.0.7

 Because v1.0 is buggy here and always tries to create the Maildir
 directories. Either create the cur/new/tmp for it or upgrade to v1.1.



Still no joy

My account on the imap server
$ id stephen
uid=501(stephen) gid=100(users) groups=10(wheel),100(users),1000(cs)

shared account user
$ id cs
uid=1000(cs) gid=1000(cs) groups=1000(cs)

as user=stephen (some hidden files removed from listing)

$ ls -lA /var/spool/mail/public
total 20
drwxrwx--- 4 cs   cs4096 Mar 10 21:26 cs
drwx-- 2 root root 16384 Mar 10 12:08 lost+found

$ ls -lA /var/spool/mail/public/cs
total 40
drwxrwx--- 6 cs cs 4096 Mar 10 21:26 mail

$ ls -lA /var/spool/mail/public/cs/mail
total 16
drwxrwx--- 2 cs cs 4096 Mar 10 21:09 cur
-rw-rw 1 cs cs0 Mar 10 19:56 dovecot-shared
drwxrwx--- 5 cs cs 4096 Mar 10 21:01 .Incoming
drwxrwx--- 2 cs cs 4096 Mar 10 21:09 new
drwxrwx--- 2 cs cs 4096 Mar 10 21:09 tmp

$ ls -lA /var/spool/mail/public/cs/mail/.Incoming
total 12
drwxrwx--- 2 cs cs 4096 Mar 10 21:01 cur
-rw-rw 1 cs cs0 Mar 10 21:01 dovecot-shared
drwxrwx--- 2 cs cs 4096 Mar 10 21:01 new
drwxrwx--- 2 cs cs 4096 Mar 10 21:01 tmp

Now when I try to subscribe

Mar 10 21:37:19 scacifs02-lnx dovecot: IMAP(stephen):
opendir(/var/spool/mail/public/cs/mail) failed: Permission denied
Mar 10 21:37:19 scacifs02-lnx dovecot: IMAP(stephen): Connection closed

This make no sense to me.  I am a member if the cs group which has rwx
perms for all the directories from cs on down.  How can I not have
permission to open the directory?

In fact:

$ perl -e 'opendir DIR,/var/spool/mail/public/cs/mail or die
$!;@aa=readdir(DIR);close DIR;foreach(@aa){print $_\n;}'
.
cur
new
.Incoming
..
tmp

So I do have permission to open the directory but dovecot doesn't
agree  (Is this a sign I should just give up on 1.0.7? :-)

My config changed a bit:

# 1.0.7: /etc/dovecot.conf
protocols: imaps
listen: *
ssl_cert_file: /etc/pki/dovecot/certs/scacifs02-lnx.dovecot.crt
ssl_key_file: /etc/pki/dovecot/private/scacifs02-lnx.dovecot.key
disable_plaintext_auth: yes
login_dir: /var/run/dovecot/login
login_executable: /usr/libexec/dovecot/imap-login
mail_location: maildir:~/Maildir
maildir_copy_with_hardlinks: yes
namespace:
  type: private
  separator: /
  inbox: yes
namespace:
  type: public
  separator: /
  prefix: CS/
  location: 
maildir:/var/spool/mail/public/cs/mail:CONTROL=~/Maildir/CS:INDEX=~/Maildir/CS
auth default:
  debug: yes
  passdb:
driver: pam
  userdb:
driver: passwd-file
args: /etc/imap.passwd


-- 
Stephen Carville


[Dovecot] Shared folders and LDAP?

2007-07-19 Thread Gavin Henry
Dear All,

Is it possible to store shared folder lists in an LDAP Directory along
with your virtual users?

Will check the wiki too.

Thanks,

Gavin.

-- 
Kind Regards,

Gavin Henry.
Managing Director.

T +44 (0) 1224 279484
M +44 (0) 7930 323266
F +44 (0) 1224 824887
E [EMAIL PROTECTED]

Open Source. Open Solutions(tm).

http://www.suretecsystems.com/




Re: [Dovecot] Shared folders and LDAP?

2007-07-19 Thread Timo Sirainen
On Thu, 2007-07-19 at 07:56 +0100, Gavin Henry wrote:
 Dear All,
 
 Is it possible to store shared folder lists in an LDAP Directory along
 with your virtual users?

You could have LDAP return namespaces. First define a private namespace
in dovecot.conf, and then return another from LDAP. You'd have to return
fields like:

namespace_2=maildir:/shared/boxes
namespace_2_prefix=Shared/

Or you could just configure the second namespace in dovecot.conf as well
and just override the location with namespace_2.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Shared folders and LDAP?

2007-07-19 Thread Timo Sirainen
On Thu, 2007-07-19 at 10:17 +0100, Gavin Henry wrote:
 quote who=Timo Sirainen
  On Thu, 2007-07-19 at 07:56 +0100, Gavin Henry wrote:
  Dear All,
 
  Is it possible to store shared folder lists in an LDAP Directory along
  with your virtual users?
 
  You could have LDAP return namespaces. First define a private namespace
  in dovecot.conf, and then return another from LDAP. You'd have to return
  fields like:
 
  namespace_2=maildir:/shared/boxes
  namespace_2_prefix=Shared/
 
  Or you could just configure the second namespace in dovecot.conf as well
  and just override the location with namespace_2.
 
 Sounds all good, but I can't find any info about LDAP lookups for
 namespaces on the wiki.

This isn't specific to either namespaces or LDAP. You can override any
setting with any userdb (that's documented,
http://wiki.dovecot.org/UserDatabase/ExtraFields). The internal names
for namespace settings aren't documented anywhere though, and they're
going to change in Dovecot v2.0.

 If this is a often requested feature, should we do a dovecot.schema file
 for these kind of things. I'd be willing to develop/discuss one and
 contribute it.

First I've heard. :)


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Shared folders and LDAP?

2007-07-19 Thread Gavin Henry
quote who=Timo Sirainen
 On Thu, 2007-07-19 at 10:17 +0100, Gavin Henry wrote:
 quote who=Timo Sirainen
  On Thu, 2007-07-19 at 07:56 +0100, Gavin Henry wrote:
  Dear All,
 
  Is it possible to store shared folder lists in an LDAP Directory
 along
  with your virtual users?
 
  You could have LDAP return namespaces. First define a private
 namespace
  in dovecot.conf, and then return another from LDAP. You'd have to
 return
  fields like:
 
  namespace_2=maildir:/shared/boxes
  namespace_2_prefix=Shared/
 
  Or you could just configure the second namespace in dovecot.conf as
 well
  and just override the location with namespace_2.

 Sounds all good, but I can't find any info about LDAP lookups for
 namespaces on the wiki.

 This isn't specific to either namespaces or LDAP. You can override any
 setting with any userdb (that's documented,
 http://wiki.dovecot.org/UserDatabase/ExtraFields). The internal names
 for namespace settings aren't documented anywhere though, and they're
 going to change in Dovecot v2.0.

Ah, ok. Thanks.

 If this is a often requested feature, should we do a dovecot.schema file
 for these kind of things. I'd be willing to develop/discuss one and
 contribute it.

 First I've heard. :)

;-)





[Dovecot] shared folders

2007-06-14 Thread T. Horsnell
A number of our users would greatly benefit from truly
shareable mail folders. I know we can bodge this with
symlinks, but mailbox corruptions seem to occur when
simultaneous updates are made, but this may be a client
issue I guess.
So I wonder if true shareability is creeping up the agenda.
By true shareability, I mean such that if two users have
the same folder open and one of them makes a modification
to it, the display of that folder on the other user's screen
immediately reflects that change. I guess this may well
require a co-operating client...

Cheers,
Terry 
-- 


Re: [Dovecot] shared folders

2007-06-14 Thread Timo Sirainen
On Thu, 2007-06-14 at 17:34 +0100, T. Horsnell wrote:
 A number of our users would greatly benefit from truly
 shareable mail folders. I know we can bodge this with
 symlinks, but mailbox corruptions seem to occur when
 simultaneous updates are made, but this may be a client
 issue I guess.
 So I wonder if true shareability is creeping up the agenda.
 By true shareability, I mean such that if two users have
 the same folder open and one of them makes a modification
 to it, the display of that folder on the other user's screen
 immediately reflects that change. I guess this may well
 require a co-operating client...

Most clients suck at co-operating. Dovecot tells them about flag changes
and other changes immediately, but most clients just ignore those.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] shared folders

2007-05-23 Thread Timo Sirainen
On Tue, 2007-05-22 at 15:27 +0200, David Obando wrote:
 Dear all,
 
 I would like to use shared folders but I'm not quite sure whether
 Dovecot supports it the way I want it:
 
 -user A should be able to share a folder with users B, C, D
 -B, C and D should have read-access to this folder
 
 Did anyone implement shared folders like this?

Dovecot v1.1 will have a better and easier support for shared mailboxes.
But it should be possible to do what you want with v1.0 too:

1. Create symlinks to the shared maildir and make sure the filesystem
permissions are wide enough so that all the users can read/write to the
directories.

2. Enable ACL plugin and create dovecot-acl file limiting the users'
access to read-only.



signature.asc
Description: This is a digitally signed message part


[Dovecot] shared folders

2007-05-22 Thread David Obando
Dear all,

I would like to use shared folders but I'm not quite sure whether
Dovecot supports it the way I want it:

-user A should be able to share a folder with users B, C, D
-B, C and D should have read-access to this folder

Did anyone implement shared folders like this?

Regards,
David


-- 
The day microsoft makes something that doesn't suck is the day they start 
making vacuum cleaners.
gpg --keyserver pgp.mit.edu --recv-keys 1920BD87
Key fingerprint = 3326 32CE 888B DFF1 DED3  B8D2 105F 29CB 1920 BD87