View Single Post
Old 5th August 2011, 09:02
osterhase osterhase is offline
Join Date: Jul 2011
Location: Germany
Posts: 49
Thanks: 5
Thanked 7 Times in 5 Posts
Default Changing the location of the sieve-filter-file

Hi there!

My story to migrate from an postfixadmin administrated mail-server to an ISPConfig managed one goes on: It all worked fine so far. The database is in place and existing users are able to send and receive mail. Their mailfilters are respected and used.

I've figured that ISPConfig is using a slightly different directory structure when a new mailbox is created than has been used before. Especially the filter-rule-file is created on a different place.

The location of the filterrule file in the current setup is /var/vmail/[domain]/[user]/sieve/dovecot.sieve whereas ISPConfig wants to use /var/vmail/[domain]/[user]/sieve

At first I've modfied /etc/dovecot/dovecot-sql.conf as follows:
user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '') as mail, uid, gid, CONCAT('maildir:storage=', floor(quota/1024)) AS quota, CONCAT(maildir, '/sieve/dovecot.sieve') as sieve FROM mail_user WHERE email = '%u'
Next I've taught ISPConfig in /usr/local/ispconfig/server/plugins-enabled/ the new location of the filterrule:
[Line 99]:
$sieve_file = $data["new"]["maildir"].'/sieve/dovecot.sieve';
My next problem is that in /usr/local/ispconfig/server/plugins-enabled/ the subfolder "sieve" is not created. I would like to create that folder when the subfolders Junk, Trash, Sent and Inbox are created. Due it is a normal folder and not a maildir I can't use existing code. To admit that: I'm not much of a php-coder. Is it sufficient to add the creation of that folder in the mentioned file - and - (I feel a bit ashamed) with which code-line?

The next point whereas ISPConfig creates a separate "Maildir" in a newly created mailbox, I want to have the folders Junk, Trash, Sent and the Inbox directly in /var/vmail/[domain]/[user]. So I have simply removed that bit in the, from:
$maildomain_path .= '/Maildir';
$maildomain_path .= '';
two times. Is that suffiecient to fulfill my goal?

I would appreciate any help.

Uuh... btw: ISPConfig, Debain Squeeze (6.0), Postfix, Dovecot
Reply With Quote
Sponsored Links