1 (edited by lethalp1mp 2010-07-08 10:59:49)

Topic: [SOLVED]Per user sieve rule directory not getting created.

iRedMail 0.6
CentOS 5

Can't manage sieve rules in roundcube as the user's sieve rule directory is not getting created. I can create them by hand and it will work. Any ideas or is this normal?

Here is a debug log with my domain sanitized out:

deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: Loading modules from directory: /usr/lib/dovecot/lda
deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: Module loaded: /usr/lib/dovecot/lda/lib10_quota_plugin.so
deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: Module loaded: /usr/lib/dovecot/lda/lib90_cmusieve_plugin.so
deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: auth input: home=/home/vmail/sanitized.tld/sales/
deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: auth input: quota_rule=*:bytes=0
deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: Home dir not found: /home/vmail/sanitized.tld/sales/
deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: Quota root: name= backend=maildir args=
deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: Quota rule: root= mailbox=* bytes=0 messages=0
deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: maildir: data=//home/vmail/sanitized.tld/sales//:INDEX=//home/vmail/sanitized.tld/sales//
deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: maildir++: root=//home/vmail/sanitized.tld/sales/, index=, control=, inbox=//home/vmail/sanitized.tld/sales/
deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: cmusieve: /home/vmail/sieve/sanitized.tld/sales/dovecot.sieve doesn't exist
deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: cmusieve: Using sieve path: /home/vmail/sieve/dovecot.sieve
deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: cmusieve: Executing script /home/vmail/sieve/dovecot.sievec
deliver(sales@sanitized.tld): Jul 06 22:13:04 Info: msgid=<20100707031303.70E4EC4AF2F@mail.sanitized.tld>: saved mail to INBOX

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: [SOLVED]Per user sieve rule directory not getting created.

Be careful about the directory permissions. it should be owned by user 'vmail' and group 'vmail'.

3

Re: [SOLVED]Per user sieve rule directory not getting created.

ZhangHuangbin wrote:

Be careful about the directory permissions. it should be owned by user 'vmail' and group 'vmail'.

That was one of the first things I checked.

[root@mail ~]# ls -l /home/
total 8
drwx------ 2 policyd policyd 4096 Jun 26  2009 policyd
drwx------ 6 vmail   vmail   4096 Jul  6 22:13 vmail
[root@mail ~]# ls -l /home/vmail/
total 16
drwx------ 3 vmail vmail 4096 Jul  6 18:38 sanitized.com
drwx------ 3 vmail vmail 4096 Jul  6 22:13 sanitized.net
drwx------ 4 vmail vmail 4096 Jul  6 21:57 sieve
drwx------ 3 vmail vmail 4096 Jun 29  2009 moresanitized.com
[root@mail ~]# ls -l /home/vmail/sieve/
total 16
drwx------ 3 vmail vmail 4096 Jul  6 20:43 sanitized.com
-rwx------ 1 vmail vmail 2030 Jul  6 19:23 dovecot.sieve
-rw------- 1 vmail vmail  112 Jul  6 21:57 dovecot.sievec
drwx------ 4 vmail vmail 4096 Jun 29  2009 moresanitized.com

4

Re: [SOLVED]Per user sieve rule directory not getting created.

What does the output in your first post mean? debug message before or after you create directories?

5

Re: [SOLVED]Per user sieve rule directory not getting created.

ZhangHuangbin wrote:

What does the output in your first post mean? debug message before or after you create directories?

The debug log is from /var/log/sieve.log with new user (created in postfixadmin) receiving their initial welcome message after creation. Am I supposed to be creating the sieve directories for each site and user by hand? I was under the impression it was done by pysieved or dovecot.

Thanks!

6

Re: [SOLVED]Per user sieve rule directory not getting created.

Dovecot will create them automaticly.
Please post log before you create directory manually.

7

Re: [SOLVED]Per user sieve rule directory not getting created.

ZhangHuangbin wrote:

Dovecot will create them automaticly.
Please post log before you create directory manually.

That is the log before the sieve folder creation that I posted initially. It never created the /home/vmail/sieve/domain.tld/user directory, so I left it alone until I could find out why it wasn't working. If it helps any, this server has been running and upgraded since iRedMail 0.4x, I've followed and upgraded via the upgrade tutorials for every revision. (0.5x, 0.6)

I may try a fresh install on another machine and compare config files. Thanks!

8

Re: [SOLVED]Per user sieve rule directory not getting created.

Found the problem. Needed to patch:

 /usr/lib/python2.4/site-packages/pysieved/plugins/dovecot.py

Edit the above file, search for:

os.mkdir(self.basedir)

change to:

os.makedirs(self.basedir)

It now correctly creates the sieve directory for the user. I don't remember seeing this in any of the upgrade howto's, but I could have easily missed it.

Thanks!