[Dovecot] Shared folder
Hi,
I wish to setup a shared folder where everyone can read and copy. How does that work? Does each user get their own index file to determine weather a mail i read or not? can users move or copy mail?
Thanks in advance
Best regards - Jon
Hi Jon,
Wednesday, July 18, 2007, 3:30:17 PM, you wrote:
Hi,
I wish to setup a shared folder where everyone can read and copy. How does that work? Does each user get their own index file to determine weather a mail i read or not? can users move or copy mail?
Thanks in advance
Best regards - Jon
It's a good question...
I tried to do this with help of namespaces, but looks like it's a wrong way.
I need this feature to:
- Migrate from Communigate Pro and MS Exchange to dovecot
- Train SpamAssassing
Unfortunately I had no luck. Maybe somebody has other ideas?
-- Sergey
Hi,
If you mean you wish for people to able to add to their personal baysian filter I create a folder that is searched every minuit and reported as spam or not spam with a script and crontab. I don't think all users should be able to report to a spamserver as they may report unwanted mail although they are not spam.
/jon
Sergey A. Kobzar wrote:
Hi Jon,
Wednesday, July 18, 2007, 3:30:17 PM, you wrote:
Hi,
I wish to setup a shared folder where everyone can read and copy. How does that work? Does each user get their own index file to determine weather a mail i read or not? can users move or copy mail?
Thanks in advance
Best regards - Jon
It's a good question...
I tried to do this with help of namespaces, but looks like it's a wrong way.
I need this feature to:
- Migrate from Communigate Pro and MS Exchange to dovecot
- Train SpamAssassing
Unfortunately I had no luck. Maybe somebody has other ideas?
Hi Jon,
I have limited number of users. They are IT specialists and I can trust them.
In CommuniGate Pro I've created 2 public folders - Spam and Harm. When I create new account, these folders become visible automatically. Then SA checks it periodically.
Is it possible to do same things with Dovecot? Does any other MDA support this feature?
Thursday, July 19, 2007, 12:34:56 AM, you wrote:
Hi,
If you mean you wish for people to able to add to their personal baysian filter I create a folder that is searched every minuit and reported as spam or not spam with a script and crontab. I don't think all users should be able to report to a spamserver as they may report unwanted mail although they are not spam.
/jon
Sergey A. Kobzar wrote:
Hi Jon,
Wednesday, July 18, 2007, 3:30:17 PM, you wrote:
Hi,
I wish to setup a shared folder where everyone can read and copy. How does that work? Does each user get their own index file to determine weather a mail i read or not? can users move or copy mail?
Thanks in advance
Best regards - Jon
It's a good question...
I tried to do this with help of namespaces, but looks like it's a wrong way.
I need this feature to:
- Migrate from Communigate Pro and MS Exchange to dovecot
- Train SpamAssassing
Unfortunately I had no luck. Maybe somebody has other ideas?
-- Sergey
On Thu, 2007-07-19 at 09:53 +0300, Sergey A. Kobzar wrote:
In CommuniGate Pro I've created 2 public folders - Spam and Harm. When I create new account, these folders become visible automatically. Then SA checks it periodically.
Is it possible to do same things with Dovecot? Does any other MDA support this feature?
Support for shared mailboxes are described in http://wiki.dovecot.org/SharedMailboxes, is there something that doesn't work?
Hi Timo,
I followed instructions in Namespaces, but no luck. I sent a question about this problem 3th Jul:
===
I have a problem with namespases in Dovecot:
namespace public { separator = / prefix = Public/ location = maildir:/home/mail/public }
namespace private { separator = / prefix = inbox = yes }
namespace private works well, but I can't subscribe to namespace Public in Outlooks Express, The Bat! and Mozilla Thunderbird. Outlook shows error 'Mailbox doesn't exist: Public'. Same with The Bat!.
maildir:/home/mail/public exists and has correct rights:
# ls -alh /home/mail/public/ total 0 drwx------ 5 mail mail 184 Jul 2 21:55 . drwxr-x--- 4 mail root 104 Jul 2 21:01 .. drwx------ 2 mail mail 48 Jul 2 21:01 cur -rw-r--r-- 1 mail mail 0 Jul 2 21:54 dovecot-shared drwx------ 2 mail mail 48 Jul 2 21:01 new -rw-r--r-- 1 mail mail 0 Jul 2 21:55 subscriptions drwx------ 2 mail mail 48 Jul 2 21:01 tmp
# dovecot --version 1.0.1
# uname -rsm Linux 2.6.20-gentoo-r8 i686
===
Thursday, July 19, 2007, 10:20:38 AM, you wrote:
On Thu, 2007-07-19 at 09:53 +0300, Sergey A. Kobzar wrote:
In CommuniGate Pro I've created 2 public folders - Spam and Harm. When I create new account, these folders become visible automatically. Then SA checks it periodically.
Is it possible to do same things with Dovecot? Does any other MDA support this feature?
Support for shared mailboxes are described in http://wiki.dovecot.org/SharedMailboxes, is there something that doesn't work?
-- Sergey
On Thu, 2007-07-19 at 10:54 +0300, Sergey A. Kobzar wrote:
I followed instructions in Namespaces, but no luck. I sent a question about this problem 3th Jul: .. namespace private works well, but I can't subscribe to namespace Public in Outlooks Express, The Bat! and Mozilla Thunderbird. Outlook shows error 'Mailbox doesn't exist: Public'. Same with The Bat!.
Oh, and I guess I asked why do you try to subscribe to that.
You should create e.g. Public/Spam and Public/Ham mailboxes, and subscribe to them. There should be no need to subscribe to Public.
Hi Timo,
Thursday, July 19, 2007, 10:57:47 AM, you wrote:
Oh, and I guess I asked why do you try to subscribe to that.
Yes, you did.
You should create e.g. Public/Spam and Public/Ham mailboxes, and subscribe to them. There should be no need to subscribe to Public.
I see. Will try and tell you results. Thanks :)
-- Sergey
Hi Timo,
This is my current configuration:
mail_location = maildir:/home/mail/%d/%n mail_extra_groups = mail
namespace public { separator = / prefix = Public/ location = maildir:/home/mail/public }
namespace private { separator = / prefix = inbox = yes }
System mail user: first_valid_uid = 8 last_valid_uid = 8
System mail group: first_valid_gid = 12 last_valid_gid = 12
ls -Rl /home/mail/public/
/home/mail/public/: total 0 drw-rw---- 5 mail mail 184 Jul 19 10:08 Harm drw-rw---- 5 mail mail 184 Jul 19 10:08 Spam -rw-rw---- 1 mail mail 0 Jul 19 09:55 dovecot-shared -rw-rw---- 1 mail mail 0 Jul 19 09:55 subscriptions
/home/mail/public/Harm: total 0 drw-rw---- 2 mail mail 48 Jul 19 10:08 cur -rw-rw---- 1 mail mail 0 Jul 19 10:00 dovecot-shared drw-rw---- 2 mail mail 48 Jul 19 10:08 new -rw-rw---- 1 mail mail 0 Jul 19 10:08 subscriptions drw-rw---- 2 mail mail 48 Jul 19 10:08 tmp
/home/mail/public/Harm/cur: total 0
/home/mail/public/Harm/new: total 0
/home/mail/public/Harm/tmp: total 0
/home/mail/public/Spam: total 0 drw-rw---- 2 mail mail 48 Jul 19 10:07 cur -rw-rw---- 1 mail mail 0 Jul 19 10:00 dovecot-shared drw-rw---- 2 mail mail 48 Jul 19 10:07 new -rw-rw---- 1 mail mail 0 Jul 19 10:08 subscriptions drw-rw---- 2 mail mail 48 Jul 19 10:07 tmp
/home/mail/public/Spam/cur: total 0
/home/mail/public/Spam/new: total 0
/home/mail/public/Spam/tmp: total 0
When I try connect to the server by Outlook, I get error:
Permission denied
Configuration: Account: xxx@domain.com Server: mail.domain.com User name: xxx@domain.com Protocol: IMAP Port: 993 Secure(SSL): 1 Code: 800cccd2
What's wrong?
Thursday, July 19, 2007, 10:57:47 AM, you wrote:
On Thu, 2007-07-19 at 10:54 +0300, Sergey A. Kobzar wrote:
I followed instructions in Namespaces, but no luck. I sent a question about this problem 3th Jul: .. namespace private works well, but I can't subscribe to namespace Public in Outlooks Express, The Bat! and Mozilla Thunderbird. Outlook shows error 'Mailbox doesn't exist: Public'. Same with The Bat!.
Oh, and I guess I asked why do you try to subscribe to that.
You should create e.g. Public/Spam and Public/Ham mailboxes, and subscribe to them. There should be no need to subscribe to Public.
-- Sergey
On 19.7.2007, at 12.16, Sergey A. Kobzar wrote:
# ls -Rl /home/mail/public/ /home/mail/public/: total 0 drw-rw---- 5 mail mail 184 Jul 19 10:08 Harm drw-rw---- 5 mail mail 184 Jul 19 10:08 Spam -rw-rw---- 1 mail mail 0 Jul 19 09:55 dovecot-shared -rw-rw---- 1 mail mail 0 Jul 19 09:55 subscriptions
What about /home/mail/public, or /home/mail?
/home/mail/public/Harm: /home/mail/public/Spam:
These are invisible to Dovecot. They need to begin with a dot.
total 0 drw-rw---- 2 mail mail 48 Jul 19 10:07 cur -rw-rw---- 1 mail mail 0 Jul 19 10:00 dovecot-shared drw-rw---- 2 mail mail 48 Jul 19 10:07 new -rw-rw---- 1 mail mail 0 Jul 19 10:08 subscriptions drw-rw---- 2 mail mail 48 Jul 19 10:07 tmp
The only subscriptions file should be in /home/mail/public.
When I try connect to the server by Outlook, I get error:
Permission denied
I guess it didn't have access to /home/mail/public. But you shouldn't
rely on Outlook for your error reporting, who knows what it did to
get that error message. If there's nothing in Dovecot's logs, try
manually instead:
1 login user pass 2 list "" * 3 select Public/Spam 3 subscribe Public/Spam
Where does it fail?
# ls -Rl /home/mail/public/ /home/mail/public/: total 0 drw-rw---- 5 mail mail 184 Jul 19 10:08 Harm drw-rw---- 5 mail mail 184 Jul 19 10:08 Spam -rw-rw---- 1 mail mail 0 Jul 19 09:55 dovecot-shared -rw-rw---- 1 mail mail 0 Jul 19 09:55 subscriptions
Maybe find /home/mail/public -type d -exec chmod 770 {} \; will help?
-Remy
Hi Timo,
Friday, July 20, 2007, 12:07:56 AM, you wrote:
What about /home/mail/public, or /home/mail?
Fixed. /home/mail/public had incorrect rights.
/home/mail/public/Harm: /home/mail/public/Spam:
These are invisible to Dovecot. They need to begin with a dot.
Done. Now I can see these folders.
total 0 drw-rw---- 2 mail mail 48 Jul 19 10:07 cur -rw-rw---- 1 mail mail 0 Jul 19 10:00 dovecot-shared drw-rw---- 2 mail mail 48 Jul 19 10:07 new -rw-rw---- 1 mail mail 0 Jul 19 10:08 subscriptions drw-rw---- 2 mail mail 48 Jul 19 10:07 tmp
The only subscriptions file should be in /home/mail/public.
Thanks. Fixed :)
Well, now I can see Spam and Harm folders bat can't move messages from Inbox into Spam folder for example. MUA just freezes. Nothing in logs (mail_debug = yes).
Second question. You told /home/mail/public is not an Maildir, but it has cur, new and tmp folders. Why?
# ls -alh /home/mail/public/ total 4.0K drwxrwx--- 7 mail mail 232 Jul 20 09:53 . drwxr-x--- 4 mail root 104 Jul 19 09:54 .. drwxrw---- 5 mail mail 264 Jul 20 09:57 .Harm drwxrw---- 5 mail mail 264 Jul 20 09:52 .Spam drwxrw---- 2 mail mail 48 Jul 20 09:35 cur -rw-rw---- 1 mail mail 0 Jul 19 09:55 dovecot-shared drwx------ 2 mail mail 48 Jul 20 09:52 new -rw------- 1 mail mail 10 Jul 20 09:53 subscriptions drwx------ 2 mail mail 48 Jul 20 09:52 tmp
-- Sergey
On Fri, 2007-07-20 at 12:20 +0300, Sergey A. Kobzar wrote:
Well, now I can see Spam and Harm folders bat can't move messages from Inbox into Spam folder for example. MUA just freezes. Nothing in logs (mail_debug = yes).
Is it MUA that freezes or Dovecot's imap process? (Does imap process use 100% cpu?)
Try manually:
1 login user pass 2 select inbox 3 copy 1 Public/Spam
Does it succeed?
Second question. You told /home/mail/public is not an Maildir, but it has cur, new and tmp folders. Why?
That's kind of a bug. v1.1 doesn't do that anymore.
Hi Timo,
Friday, July 20, 2007, 12:40:59 PM, you wrote:
On Fri, 2007-07-20 at 12:20 +0300, Sergey A. Kobzar wrote:
Well, now I can see Spam and Harm folders bat can't move messages from Inbox into Spam folder for example. MUA just freezes. Nothing in logs (mail_debug = yes).
Is it MUA that freezes or Dovecot's imap process? (Does imap process use 100% cpu?)
It's MUA. Server looks good at those time: Tasks: 88 total, 2 running, 86 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.3%sy, 0.0%ni, 98.3%id, 0.7%wa, 0.0%hi, 0.7%si, 0.0%st
Try manually:
1 login user pass 2 select inbox 3 copy 1 Public/Spam
Does it succeed?
# telnet localhost 143 Trying 127.0.0.1... Connected to localhost.domain.com. Escape character is '^]'.
- OK Dovecot ready.
- login user@domain.com passwd
- OK Logged in.
- select inbox
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
- 1 EXISTS
- 0 RECENT
- OK [UIDVALIDITY 1183490762] UIDs valid
- OK [UIDNEXT 41] Predicted next UID
- OK [READ-WRITE] Select completed.
- copy 1 Public/Spam
... and no answer.
- logout does not work - no answer.
I can kill telnet session only.
In logs:
Jul 20 10:57:16 mail dovecot: IMAP(user@domain.com): Effective uid=8, gid=12, home= Jul 20 10:57:16 mail dovecot: IMAP(user@domain.com): Namespace: type=public, prefix=Public/, sep=/, inbox=no, hidden=no, subscriptions=no Jul 20 10:57:16 mail dovecot: IMAP(user@domain.com): maildir: data=/home/mail/public Jul 20 10:57:16 mail dovecot: IMAP(user@domain.com): maildir: root=/home/mail/public, index=/home/mail/public, control=, inbox= Jul 20 10:57:16 mail dovecot: IMAP(user@domain.com): Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, subscriptions=no Jul 20 10:57:16 mail dovecot: IMAP(user@domain.com): maildir: data=/home/mail/domain.com/user Jul 20 10:57:16 mail dovecot: IMAP(user@domain.com): maildir: root=/home/mail/domain.com/user, index=/home/mail/domain.com/user, control=, inbox= Jul 20 10:57:16 mail dovecot: imap-login: Login: user=<user@domain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Second question. You told /home/mail/public is not an Maildir, but it has cur, new and tmp folders. Why?
That's kind of a bug. v1.1 doesn't do that anymore.
Thanks. I will try to upgrade Dovecot, but 1.1 is marked is unstable in Gentoo :). Worth to try.
-- Sergey
On Fri, 2007-07-20 at 13:04 +0300, Sergey A. Kobzar wrote:
- copy 1 Public/Spam
... and no answer.
What does strace show for the imap process for this copy command? http://wiki.dovecot.org/Debugging/ProcessTracing
Hi Timo,
Friday, July 20, 2007, 1:32:37 PM, you wrote:
On Fri, 2007-07-20 at 13:04 +0300, Sergey A. Kobzar wrote:
- copy 1 Public/Spam
... and no answer.
What does strace show for the imap process for this copy command? http://wiki.dovecot.org/Debugging/ProcessTracing
Maybe I did something wrong, but no luck:
When I've connected to localhost 143:
# netstat -anp | grep imap | grep ESTAB tcp 0 0 127.0.0.1:143 127.0.0.1:36261 ESTABLISHED 9883/imap
# strace -tt -o log -p 9883 Process 9883 attached - interrupt to quit
Then I did:
- select inbox
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
- 1 EXISTS
- 0 RECENT
- OK [UIDVALIDITY 1183490762] UIDs valid
- OK [UIDNEXT 41] Predicted next UID
- OK [READ-WRITE] Select completed.
- copy 1 Public/Spam
- logout
No output from strace:
# strace -tt -o log -p 9883 Process 9883 attached - interrupt to quit Process 9883 detached #
What's wrong?
-- Sergey
Hi Timo,
Friday, July 20, 2007, 2:04:37 PM, you wrote:
On Fri, 2007-07-20 at 13:58 +0300, Sergey A. Kobzar wrote:
No output from strace:
# strace -tt -o log -p 9883 Process 9883 attached - interrupt to quit Process 9883 detached #
-o log means it writes the output to "log". I guess it's not empty?
Fixed. The reason was in maildir folder permissions. Now everything works nice. Thank you Timo :)
I've found one strange things, but not sure it's Dovecot related.
I can subscribe to Spam and Non-Spam (maildirs inside Public namespace) by Mozilla Thunderbird and The Bat! MUAs and everything works good. I see these folders in Outlook Express, can subscribe, but they are not present in IMAP folder list. They appear when I press Go to button in Show/Hide IMAP Folders window, but when I restart Outlook, folders disappear again.
I understand this is MS product with many bugs. Is it possible to fix it? Thanks for any help.
-- Sergey
On 7/20/2007, Sergey A. Kobzar (tod.zullu@gmail.com) wrote:
# ls -alh /home/mail/public/ total 4.0K drwxrwx--- 7 mail mail 232 Jul 20 09:53 . drwxr-x--- 4 mail root 104 Jul 19 09:54 ..
Shouldn't this ^^^^^^^^^
be mail mail?
I'm not sure if this would cause your problem though...
drwxrw---- 5 mail mail 264 Jul 20 09:57 .Harm
Any why Harm instead of Ham (just curious, I know it doesn't matter what you name the directory)?
--
Best regards,
Charles
Hi Charles,
Friday, July 20, 2007, 2:47:49 PM, you wrote:
On 7/20/2007, Sergey A. Kobzar (tod.zullu@gmail.com) wrote:
# ls -alh /home/mail/public/ total 4.0K drwxrwx--- 7 mail mail 232 Jul 20 09:53 . drwxr-x--- 4 mail root 104 Jul 19 09:54 ..
Shouldn't this ^^^^^^^^^
be mail mail?
Fixed already.
I'm not sure if this would cause your problem though...
drwxrw---- 5 mail mail 264 Jul 20 09:57 .Harm
Any why Harm instead of Ham (just curious, I know it doesn't matter what you name the directory)?
You are right: http://wiki.apache.org/spamassassin/Ham Thanks for this.
-- Sergey
Hi,
If you mean you wish for people to able to add to their personal baysian filter I create a folder that is searched every minuit and reported as spam or not spam with a script and crontab. I don't think all users should be able to report to a spamserver as they may report unwanted mail although they are not spam.
/jon
Sergey A. Kobzar wrote:
Hi Jon,
Wednesday, July 18, 2007, 3:30:17 PM, you wrote:
Hi,
I wish to setup a shared folder where everyone can read and copy. How does that work? Does each user get their own index file to determine weather a mail i read or not? can users move or copy mail?
Thanks in advance
Best regards - Jon
It's a good question...
I tried to do this with help of namespaces, but looks like it's a wrong way.
I need this feature to:
- Migrate from Communigate Pro and MS Exchange to dovecot
- Train SpamAssassing
Unfortunately I had no luck. Maybe somebody has other ideas?
participants (6)
-
Charles Marcus
-
Jon
-
Jon Essen-Moller
-
Remy Zandwijk
-
Sergey A. Kobzar
-
Timo Sirainen