[Dovecot] High cpu usage OpenSolaris

2007-07-28 Thread Gary Gendel
Hi,

I've built 64-bit dovecot 1.0.2 on Opensolaris to replace version
1.0.0rc10. It functions fine, but when I connect, it eats up all
available cpu. My guess is that the poll thread is running continuously.
Any ideas on what I should do to verify this or does anyone know of a fix?

Thanks,
Gary

begin:vcard
fn:Gary Gendel
n:Gendel;Gary
org:IC Manage, Inc
adr:Suite 17;;101 Church Street;Los Gatos;CA;95030;USA
email;internet:[EMAIL PROTECTED]
title:Chief Software Architect
tel;work:908-369-0334
tel;home:908-369-5496
url:http://www.icmanage.com
version:2.1
end:vcard



Re: [Dovecot] Dovecot LDAP schema?

2007-07-28 Thread Sergey A. Kobzar
Hi Hadmut,

You can use standard LDAP attributes. It's more than enough.

My configs:

dovecot.conf:

first_valid_uid = 8
last_valid_uid = 8

first_valid_gid = 12
last_valid_gid = 12

auth_username_format = %Lu

auth default {
  mechanisms = plain

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

  userdb static {
args = uid=mail gid=mail
  }

}


dovecot-ldap.conf:

hosts = localhost

dn = cn=Dovecot,ou=DSA,o=top
dnpass = xxx

ldap_version = 3

base = ou=Users,dc=%d,o=top
scope = onelevel

pass_attrs = userPassword=password
pass_filter = uid=%n



Saturday, July 28, 2007, 12:53:09 PM, you wrote:

> Hi,

> does dovecot define its own LDAP schema or should I create my own one?


> (I want to provide IMAP boxes for virtual users that do not have a 
> Unix account on the mail server and thus do not want to use the 
> plain uid/gid entries of the posix account objectclass to avoid confusion
> and accidently giving access to accounts.)

> regards
> Hadmut



-- 
Sergey



[Dovecot] Dovecot LDAP schema?

2007-07-28 Thread Hadmut Danisch
Hi,

does dovecot define its own LDAP schema or should I create my own one?


(I want to provide IMAP boxes for virtual users that do not have a 
Unix account on the mail server and thus do not want to use the 
plain uid/gid entries of the posix account objectclass to avoid confusion 
and accidently giving access to accounts.)

regards
Hadmut


Re: [Dovecot] Shared mailboxes (maildir, symlinks) and permissions

2007-07-28 Thread Sergey A. Kobzar
Hi Andreas,

Check mailing list archives. I asked same questions last week.


My 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
}

/home/mail/public/:
total 4
drwx-- 7 mail mail 208 Jul 24 10:25 .
drwx-- 4 mail root 104 Jul 24 10:18 ..
drwx-- 5 mail mail 296 Jul 24 10:52 .Non-Spam
drwx-- 5 mail mail 296 Jul 24 10:33 .Spam
drwx-- 2 mail mail  48 Jul 24 10:18 cur
drwx-- 2 mail mail  48 Jul 24 10:18 new
-rw--- 1 mail mail  14 Jul 24 10:25 subscriptions
drwx-- 2 mail mail  48 Jul 24 10:18 tmp

/home/mail/public/.Non-Spam:
total 28
drwx-- 5 mail mail   296 Jul 24 10:52 .
drwx-- 7 mail mail   208 Jul 24 10:25 ..
drwx-- 2 mail mail48 Jul 24 10:52 cur
-rw--- 1 mail mail 0 Jul 24 10:13 dovecot-shared
-rw--- 1 mail mail69 Jul 24 10:25 dovecot-uidlist
-rw--- 1 mail mail   144 Jul 24 10:52 dovecot.index
-rw--- 1 mail mail 16384 Jul 24 10:52 dovecot.index.cache
-rw--- 1 mail mail   460 Jul 24 10:52 dovecot.index.log
drwx-- 2 mail mail48 Jul 24 10:25 new
drwx-- 2 mail mail48 Jul 24 10:25 tmp

/home/mail/public/.Spam:
total 32
drwx-- 5 mail mail   296 Jul 24 10:33 .
drwx-- 7 mail mail   208 Jul 24 10:25 ..
drwx-- 2 mail mail48 Jul 24 10:29 cur
-rw--- 1 mail mail 0 Jul 24 10:14 dovecot-shared
-rw--- 1 mail mail62 Jul 24 10:25 dovecot-uidlist
-rw--- 1 mail mail   144 Jul 24 10:29 dovecot.index
-rw--- 1 mail mail 17408 Jul 24 10:29 dovecot.index.cache
-rw--- 1 mail mail   460 Jul 24 10:33 dovecot.index.log
drwx-- 2 mail mail48 Jul 24 10:18 new
drwx-- 2 mail mail48 Jul 24 10:25 tmp


Everything works nice.

BTW /home/mail/public/ is not a mailbox and must not contain cur new
and tmp folders. As Timo said this bug was fixed in 1.1.



Saturday, July 28, 2007, 5:11:05 AM, you wrote:

> Hello list, 

> I am trying to set up a public mailbox for users to put spam in so that
> sa-learn can do its job at night. Only I can't seem to fully understand how
> and which permissions should be set. I've read [1] and am using Dovecot
> 1.0.1.

> First some background information: I do not host or care (at the moment) about
> virtual users or virtual mail hosting. All users have Unix system accounts
> and shell access. I'd like to have a Spam folder, say /var/mail/public/.Spam
> that is a maildir where users can put Spam that got through the server-side
> filter. Spamassassin's sa-learn runs nightly and learns from the contents of
> the Spam folder.

> After reading [1] I think I should have under /var/mail/public a file called
> dovecot-shared that belongs to root:mail and has permissions 0660 (with user
> dovecot being a member of group mail) so that it looks like this:

> [EMAIL PROTECTED]:/var/mail/public# ls
> drwxr-sr-x 2 root mail 4096 2007-07-28 03:29 .
> drwxrwsr-x 3 root mail 4096 2007-07-28 02:19 ..
> -rw-rw 1 root mail0 2007-07-28 02:46 dovecot-shared
> [EMAIL PROTECTED]:/var/mail/public#

> The first question arises: should Dovecot have write access 
> to /var/mail/public itself?

> Now I should create the Spam folder called /var/mail/public/.Spam. Should this
> directory be in maildir format, i.e. should it already contain the 
> subdirectories cur, tmp and new? What of the permissions of this directory? I
> am pretty sure Dovecot needs write access to it, so it should look like this:

> [EMAIL PROTECTED]:/var/mail/public# ls
> drwxr-sr-x 3 root mail 4096 2007-07-28 03:44 .
> drwxrwsr-x 3 root mail 4096 2007-07-28 02:19 ..
> -rw-rw 1 root mail0 2007-07-28 02:46 dovecot-shared
> drwxrwsr-x 2 root mail 4096 2007-07-28 03:44 .Spam
> [EMAIL PROTECTED]:/var/mail/public#

> The .Spam directory here is completely empty.

> Now in a user's Maildir (/home/user1/Maildir) there are the user's private
> folders; a symlink to /var/mail/public/.Spam should be added:

> [EMAIL PROTECTED]:/home/user1/Maildir# ln -s /var/mail/public/.Spam .
> [EMAIL PROTECTED]:/home/user1/Maildir# ls
> ...
> drwx--  5 user1 user1 4096 2007-07-19 16:14 .INBOX.foo
> drwx--  5 user1 user1 4096 2007-07-06 23:01 .INBOX.bar
> ...
> lrwxrwxrwx  1 user1 user1  22 2007-07-28 03:51 .Spam -> /var/mail/public/.Spam
> ...
> [EMAIL PROTECTED]:/home/user1/Maildir#

> Is that all I have to do? Probably not, because I keep getting errors like the
> following when connecting (after subscribing of course):

> Jul 28 03:52:35 host dovecot: IMAP(user1): 
> mkdir(/home/user1/Maildir/.Spam/cur) failed: Permission denied

> Should I have created the cur, tmp and new subdirectories manually and set
> their permissions like /var/mail/public/.Spam? But that still wouldn't give
> user1 write access. If I gave the users (or "others": chmod o+w) write
> permissions then Dovecot's index files would be owned by the first user tha