Hi Pascal,
On 04/14/2010 04:18 PM, Pascal Volk wrote:
On 04/14/2010 03:46 PM Felix Leimbach wrote:
Hi all,
I'm testing a dovecot-2.0-beta4 and it is great so far, except that I can't get the sieve plugin for the LDA configured.
It doesn't find the user's homedir and uses /tmp instead. Thus it never finds any sieve scripts.
The log shows that the SQL queries return the correct home path, namely /mnt/data/vmail/example.com/me
dovecot: auth: prefetch(me@example.com): passdb didn't return userdb entries, trying the next dovecot: auth: sql(me@example.com): SELECT CONCAT(homedir, "/", maildir) AS mail, CONCAT(homedir, "/", maildir) AS home, uid, gid FROM postfix_users WHERE email = 'me@example.com'
dovecot: auth: master out: USER 1 me@example.com
mail=/mnt/data/vmail/example.com/me/
home=/mnt/data/vmail/example.com/me/ uid=5000
gid=5000
dovecot: lda(me@example.com): Effective uid=5000, gid=5000, home=/mnt/data/vmail/example.com/me/dovecot: lda(me@example.com): Namespace: type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes
dovecot: lda(me@example.com): maildir++: root=/mnt/data/vmail/example.com/me, index=, control=, inbox=/mnt/data/vmail/example.com/me
The first problem: home == mail && LAYOUT=maildir++. So ~/.dovecot.sieve will be created inside root=/mnt/data/vmail/example.com/me. IMAP will see the mailbox dovecot with the child mailbox sieve. When the directory /mnt/data/vmail/example.com/me/.dovecot.sieve exists you are unable tor create a file/link with same name in your "home dir". Please read: http://wiki.dovecot.org/VirtualUsers/Home
Thanks for pointing that out. The wiki is pretty clear and I've corrected this now. As a sidenote, I didn't find a way to automatically create user's home directories if they don't yet exist. As I don't want to change my existing maildir structure I put the home directories under a separate location: /mnt/data/vmail/doecot-homedirs/$maildir
I looked at the autocreate plugin but it looks like it can only create directories under the user's maildir.
However, the sieve plugin still uses /tmp instead of the home dir and fails:
dovecot: lda(me@example.com): fs: root=/tmp, index=, control=, inbox=
dovecot: lda(me@example.com): Namespace : Permission lookup failed from /tmp/Dovecot Delivery Mail
dovecot: lda(me@example.com): Namespace : Using permissions from /tmp: mode=0777 gid=-1
dovecot: lda(me@example.com): Namespace : Permission lookup failed from /tmp/Dovecot Delivery Mail
dovecot: lda(me@example.com): Namespace : Using permissions from /tmp: mode=0777 gid=-1
dovecot: lda(me@example.com): sieve: user has no valid personal scriptIt performs only permissions lookups. That was fixed 9 days ago: http://hg.dovecot.org/dovecot-2.0/rev/9c94f073d014
Any idea? SELECT 'maildir:~/Maildir' AS mail, CONCAT(homedir, "/", maildir) AS home, …
I'm using this now, based on your suggestion but without having to move all my current maildirs: SELECT CONCAT('maildir:', homedir, "/", maildir) AS mail, CONCAT(homedir, "/dovecot-homedirs/", maildir) AS home
I've compiled dovecot-2.0 from the current hg repo and the error is gone. Great :)
However, suddenly managesieve does not work anymore (called from TB's sieve plugin):
dovecot: managesieve(me@example.com): maildir++: root=/mnt/data/vmail/example.com/me, index=, control=, inbox=/mnt/data/vmail/example.com/me
Here the client sits for 20 seconds displaying "Authenticating ..." and then stops with a timeout error.
dovecot: managesieve(me@example.com): Connection closed bytes=0/17
On a related note: I want to have a default sieve script which is executed for every user in addition to their own scripts. The reason is to put spam emails into a separate spam folder. I planned to use sieve_global_dir for that purpose, but it seems that the script there needs to be included in the user's own script. But most of the users won't even have a sieve script, let alone add that include. How can I achieve that global spam sorting?
Thanks and best regards, Felix