Author Topic: SIEVE-Problem in Roundcube: Correct settings in main.cf (postfix) & 10-mail.conf  (Read 170 times)

Offline roundcubetestit

  • Newbie
  • *
  • Posts: 9
Hello everybody,

I have tested under FreeBSD 11.4 taking into account the comments in
https://blog.andreev.it/?p=1604
postfix 3.5.7.1, dovecot 2.3.11.3 with dovecot-pigeonhole 0.5.11 and roundcube-php74-1.4.9,1 set up (Virtual Users Home).

This all works as expected, with one exception: problems with server-side sieve filters.

After I added the following in managesieve/config.inc.php

Code: [Select]
$config['managesieve_vacation'] = 1;
in Roundcube to create a separate button "vacation(out of office)" under the filter button, I was surprised that no vacation messages were generated for incoming emails.

A look into the logfile shows a problem which is probably well known:

Quote
Oct 04 11:49:57 imap(user@domain.tld)<51952><PWnZSdWwA71/AAAB>: Debug: Mailbox dovecot.sieve: Mailbox opened because: STATUS

Oct 04 11:49:57 imap(user@domain.tld)<51952><PWnZSdWwA71/AAAB>: Error: stat(/var/mail/vhosts/ user@domain.tld /user/.dovecot.sieve/tmp) failed: Not a directory

According to several sources on the WWW, the above error message is due to the fact that the HOME directory is used as the MAILDIR directory. You can activate the entry "maildir_stat_dirs=yes" in /dovecot/conf.d/10-mail.conf to prevent the above error message:

Quote
"Seen dovecot-sieve is always enabled, setting maildir_stat_dirs = yes permits to avoid /var/mail/domain.tld/user/.dovecot.sieve (symlink) to be treated as a directory (default behavior)".
Source: https://github.com/tomav/docker-mailserver/pull/1481

Unfortunately the entry "maildir_stat_dirs=yes" does not cause the above mentioned error message "Not a directory" to disappear after restarting Dovecot. This error message is also displayed when creating and saving other custom SIEVE filters in Roundcube. So you can't create filters that will be applied.

Since this is a freshly set up system, I still have the possibility to configure the whole thing from the beginning in a way that the described problem is no longer caused by using the HOME directory as MAILDIR directory.

My question is: Where do I start here?


In my 10-mail.conf for Dovecot2 is current:

Code: [Select]
mail_home = /var/mail/vhosts/%d/%n
mail_location = maildir:~

main.cf (postfix):
Code: [Select]
home_mailbox = Maildir/
virtual_mailbox_base = /var/mail/vhosts


Can anyone tell me which modifications I have to make in 10-mail.conf and main.cf to fulfill following recommendations from https://wiki2.dovecot.org/VirtualUsers/Home:
Quote
Home vs. mail directory

Home directory shouldn't be the same as mail directory with mbox or Maildir formats (but with dbox/obox it's fine). It's possible to do that, but you might run into trouble with it sooner or later.


Many greetings
roundcubetestit