Sieve redirect not sending ( permission denied duplicate check )

I asked the question in dovecot’s mail list and seems the “issue” is the home defined in userdb/passdb:

# cat /etc/dovecot/conf.d/auth-passwdfile.conf.ext
passdb {
  driver = passwd-file
  args = scheme=MD5-CRYPT username_format=%n /etc/exim4/domains/%d/passwd
}

userdb {
  driver = passwd-file
  args = username_format=%n /etc/exim4/domains/%d/passwd
}

So I’ve been “researching” and Hestia uses /etc/exim4/domains/%d/passwd (%d is the domain name) for each domain and inside this file you have something like this:

In this example I use postmaster as mail user, admin as system user and example.com as the domain:

postmaster:{BLF-CRYPT}$2y$05$QyYhGv/LRssiexi//S19OhG9Ntma6Wiu:admin:mail::/home/admin:0:userdb_quota_rule=*:storage=0M

And /home/admin is the defined home. To be able to use sieve vacation, redirection extensions, the right home should be /home/admin/mail/example.com/postmaster where the user has write perms.

If we modify the home in passwd file:
postmaster:{BLF-CRYPT}$2y$05$QyYhGv/LRssiexi//S19OhG9Ntma6Wiu:admin:mail::/home/admin/mail/example.com/postmaster:0:userdb_quota_rule=*:storage=0M

Then we should also modify dovecot conf to use the right path for maildir_location and sieve directives:

We must edit /etc/dovecot/conf.d/10-mail.conf and replace
mail_location = maildir:%h/mail/%d/%n
by
mail_location = maildir:%h

Also edit file /etc/dovecot/conf.d/90-sieve.conf and replace
sieve = file:~/mail/%d/%n/sieve;active=~/mail/%d/%n/dovecot.sieve
by
sieve = file:~/sieve;active=~/dovecot.sieve

And the other problem is that Hestia’s commands will use /home/USER as home every time you add a new mail user, change the pass of the mail user, etc. and that means to modify at least 5 scripts:

v-add-mail-account
v-change-mail-account-password
v-change-mail-account-quota
v-suspend-mail-account
v-unsuspend-mail-account

Also sieve installation and conf, exim4 conf, etc. so I think it isn’t worth to do it because these changes could cause a lot of problems.

We can still use the workaround:

touch /home/user/.dovecot.lda-dupes
mkdir /home/user/.dovecot.lda-dupes.locks
chown user:user /home/user/.dovecot.lda-dupes*

It won’t be able to check for duplicated messages but at least vacation and redirection extensions will work.

I needed to know what was going on… now I can sleep :stuck_out_tongue:

Cheers,
sahsanu

1 Like