[Dovecot] store sieve scripts with maildir
Hi,
I am using dovecot 1.0.10 and pysieved, in a master/slave cluster with ldap (auth_bind=yes). For conceptuals reasons, i would like to keep on the same partition the mailstore + sieve scripts.
I have try to set "sieve" and "home" variables under the "plugin" section with an absolute path, and i have tried to override home variable in user_attrs (dovecot-ldap.conf) as well with an absolute path, but in vain.
Is there a solution ? sam
On Mar 4, 2008, at 12:09 PM, Samuel HAMEAU wrote:
I am using dovecot 1.0.10 and pysieved, in a master/slave cluster
with ldap (auth_bind=yes). For conceptuals reasons, i would like to
keep on the same partition the mailstore + sieve scripts.I have try to set "sieve" and "home" variables under the "plugin"
section with an absolute path, and i have tried to override home
variable in user_attrs (dovecot-ldap.conf) as well with an absolute
path, but in vain.
Set mail_debug=yes and auth_debug=yes. What does deliver log then?
Timo Sirainen a écrit :
On Mar 4, 2008, at 12:09 PM, Samuel HAMEAU wrote:
I am using dovecot 1.0.10 and pysieved, in a master/slave cluster with ldap (auth_bind=yes). For conceptuals reasons, i would like to keep on the same partition the mailstore + sieve scripts.
I have try to set "sieve" and "home" variables under the "plugin" section with an absolute path, and i have tried to override home variable in user_attrs (dovecot-ldap.conf) as well with an absolute path, but in vain.
Set mail_debug=yes and auth_debug=yes. What does deliver log then?
Thanks for your fast answer.
With the plugin options, i get :
- for the deliver :
- for smartsieve/pysieved login, i get :
dovecot: 2008-03-04 13:39:22 Info: auth(default): new auth connection: pid=15871 dovecot: 2008-03-04 13:39:22 Info: auth(default): client in: AUTH 1 PLAIN service=pysieved resp=<hidden> dovecot: 2008-03-04 13:39:22 Info: auth(default): ldap(user1): bind: dn=uid=user1,ou=Users,dc=company,dc=com dovecot: 2008-03-04 13:39:22 Info: auth(default): client in (unknown command): dovecot: 2008-03-04 13:39:22 Info: auth(default): client out: OK 1 user=user1 dovecot: 2008-03-04 13:39:22 Info: auth(default): master in: USER 1 user1 service=pysieved dovecot: 2008-03-04 13:39:22 Info: auth(default): ldap(shameau): user search: base=ou=Users,dc=company,dc=com scope=subtree filter=(&(objectClass=posixAccount)(uid=shameau)) fields=homeDirectory,uidNumber,gidNumber dovecot: 2008-03-04 13:39:22 Info: auth(default): master out: USER 1 user1 uid=1428 home=/home/user1 gid=1000
deliver(shameau): 2008-03-04 13:38:06 Info: Loading modules from directory: /usr/lib/dovecot/modules/lda deliver(shameau): 2008-03-04 13:38:06 Info: Module loaded: /usr/lib/dovecot/modules/lda/lib90_cmusieve_plugin.so deliver(shameau): 2008-03-04 13:38:06 Info: Home dir not found: /var/spool/imap/user1/sieve deliver(shameau): 2008-03-04 13:38:06 Info: maildir: data=/var/spool/imap/user1 deliver(shameau): 2008-03-04 13:38:06 Info: maildir: root=/var/spool/imap/user1, index=/var/spool/imap/user1, control=, inbox= deliver(shameau): 2008-03-04 13:38:06 Info: msgid=<20080304123806.0477B22408E@semoule>: saved mail to INBOX
So, it seems it works for deliver (the home dir is the equivalent of my "home" variable in the plugin section, but not the sieve variable (which would be /var/spool/imap/user1/pysieved/sieve). However, it doesn't for the auth (from auth-master socket) which keeps the home value fetched from ldap.
I am using the auth-master/auth-client sockets with pysieved. When i connect using the smartsieve php frontal, pysieved seeks data in /home/user1 insted of /var/spool/imap/user1/sieve ...
is it a dovecot or pysieved issue ?
sam
Samuel HAMEAU a écrit :
Timo Sirainen a écrit :
On Mar 4, 2008, at 12:09 PM, Samuel HAMEAU wrote:
I am using dovecot 1.0.10 and pysieved, in a master/slave cluster with ldap (auth_bind=yes). For conceptuals reasons, i would like to keep on the same partition the mailstore + sieve scripts.
I have try to set "sieve" and "home" variables under the "plugin" section with an absolute path, and i have tried to override home variable in user_attrs (dovecot-ldap.conf) as well with an absolute path, but in vain.
Set mail_debug=yes and auth_debug=yes. What does deliver log then?
Thanks for your fast answer.
With the plugin options, i get :
- for the deliver :
- for smartsieve/pysieved login, i get :
dovecot: 2008-03-04 13:39:22 Info: auth(default): new auth connection: pid=15871 dovecot: 2008-03-04 13:39:22 Info: auth(default): client in: AUTH 1 PLAIN service=pysieved resp=<hidden> dovecot: 2008-03-04 13:39:22 Info: auth(default): ldap(user1): bind: dn=uid=user1,ou=Users,dc=company,dc=com dovecot: 2008-03-04 13:39:22 Info: auth(default): client in (unknown command): dovecot: 2008-03-04 13:39:22 Info: auth(default): client out: OK 1 user=user1 dovecot: 2008-03-04 13:39:22 Info: auth(default): master in: USER 1 user1 service=pysieved dovecot: 2008-03-04 13:39:22 Info: auth(default): ldap(shameau): user search: base=ou=Users,dc=company,dc=com scope=subtree filter=(&(objectClass=posixAccount)(uid=shameau)) fields=homeDirectory,uidNumber,gidNumber dovecot: 2008-03-04 13:39:22 Info: auth(default): master out: USER 1 user1 uid=1428 home=/home/user1 gid=1000
deliver(shameau): 2008-03-04 13:38:06 Info: Loading modules from directory: /usr/lib/dovecot/modules/lda deliver(shameau): 2008-03-04 13:38:06 Info: Module loaded: /usr/lib/dovecot/modules/lda/lib90_cmusieve_plugin.so deliver(shameau): 2008-03-04 13:38:06 Info: Home dir not found: /var/spool/imap/user1/sieve deliver(shameau): 2008-03-04 13:38:06 Info: maildir: data=/var/spool/imap/user1 deliver(shameau): 2008-03-04 13:38:06 Info: maildir: root=/var/spool/imap/user1, index=/var/spool/imap/user1, control=, inbox= deliver(shameau): 2008-03-04 13:38:06 Info: msgid=<20080304123806.0477B22408E@semoule>: saved mail to INBOX
So, it seems it works for deliver (the home dir is the equivalent of my "home" variable in the plugin section, but not the sieve variable (which would be /var/spool/imap/user1/pysieved/sieve). However, it doesn't for the auth (from auth-master socket) which keeps the home value fetched from ldap.
I am using the auth-master/auth-client sockets with pysieved. When i connect using the smartsieve php frontal, pysieved seeks data in /home/user1 insted of /var/spool/imap/user1/sieve ...
is it a dovecot or pysieved issue ?
sam
Actually, there is no problem with the deliver : it displays a warning if the home directory overrided by the variable "home" (in my conf) is not existent, and it uses the right sieve script according to the "sieve" variable described in the plugin section.
However, pysieved (using auth-master socket) does not get the right value for "sieve" and "home" variables (or at least pysieved does not get the right value for sieve scripts location).
Is a dovecot or pysieved issue ?
Actually, there is no problem with the deliver : it displays a warning if the home directory overrided by the variable "home" (in my conf) is not existent, and it uses the right sieve script according to the "sieve" variable described in the plugin section.
However, pysieved (using auth-master socket) does not get the right value for "sieve" and "home" variables (or at least pysieved does not get the right value for sieve scripts location).
Is a dovecot or pysieved issue ?
To make it clear and end up the thread, the deliver does use the home/sieve variables described in the plugin section. However, the auth-master socket (that i use with a frontend to manage my sieve scripts) does not use them.
There is then 4 choices : plugin's variables (tricky,might be hazardous for an uninitiated?)
- make my own dovecot patch making the master socket or userdb-ldap read
- use dovecot 1.1.* and overriding the home attribute value in user_attr (dovecot-ldap.conf)
- patch my application (here pysieved)
- use the dovecot managesieve patch (if managesieve reads plugin's variables??)
I would have appreciated to see that there is a proper way to change the sieve scripts location with dovecot 1.0.x which works with pysieved (and at least ldap userdb). As I have mentioned, there are solutions. Thanks anyway for this great software.
sam
On Fri, 2008-03-07 at 15:16 +0100, Samuel HAMEAU wrote:
There is then 4 choices : plugin's variables (tricky,might be hazardous for an uninitiated?)
- make my own dovecot patch making the master socket or userdb-ldap read
This doesn't seem a very good idea. Plugin settings weren't meant to be used there.
- use dovecot 1.1.* and overriding the home attribute value in user_attr (dovecot-ldap.conf)
- patch my application (here pysieved)
These would work.
- use the dovecot managesieve patch (if managesieve reads plugin's variables??)
Yes, it should work, mainly because managesieve itself doesn't read any settings but gets them the same way as imap.
I don't have any other suggestions.
Hello...
I had the problem described in this thread. I fixed it by changing the dovecot.py program in the pysieved package. My mailfolders are all in /home/vmail/USERNAME.
The last two lines (comment + code) in the code below is my addition to dovecot.py. The code above my lines are there to let you know where in the programme to add my line(s). It's in a function called lookup.
for part in ret.split('\t'): if part.startswith('uid='): uid = part[4:] elif part.startswith('gid='): gid = part[4:] elif part.startswith('home='): home = part[5:]
# HACK TO HARDCODE HOMEDIR PATH home = '/home/vmail/' + params['username']
Thanks, Tobias
Samuel HAMEAU wrote:
There is then 4 choices : plugin's variables (tricky,might be hazardous for an uninitiated?)
- make my own dovecot patch making the master socket or userdb-ldap read
- use dovecot 1.1.* and overriding the home attribute value in user_attr (dovecot-ldap.conf)
- patch my application (here pysieved)
participants (3)
-
Samuel HAMEAU
-
Timo Sirainen
-
Tobias Balle-Petersen