Thank you for your continued support Zhang, it's much appreciated!
Here's what I did:
Enabled debug as you suggested
In roundcube I created a folder "Gmail", and a filter to filter everything from "gmail.com" into this folder.
A "dovecot.sieve" link is created in my user folder (Folder where Maildir is) that points to "/var/vmail/sieve/mydomain.com/username/roundcube.sieve"
File looks like this:
require ["fileinto"];
# rule:[Gmail]
if anyof (address :contains "Sender" "gmail.com")
{
fileinto "Gmail";
}
Then patched /etc/dovecot/dovecot.conf to include:
plugin {
sieve = /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
}
When I receive a message, this shows up in sieve.log:
deliver(username@mydomain.com): Aug 19 08:20:11 Info: Loading modules from directory: /usr/lib/dovecot/modules/lda
deliver(username@mydomain.com): Aug 19 08:20:11 Info: Module loaded: /usr/lib/dovecot/modules/lda/lib10_quota_plugin.so
deliver(username@mydomain.com): Aug 19 08:20:11 Info: Module loaded: /usr/lib/dovecot/modules/lda/lib90_cmusieve_plugin.so
deliver(username@mydomain.com): Aug 19 08:20:11 Info: auth input: home=/var/vmail/vmail01/mydomain.com/u/us/use/username-2009.08.17.08.51.13/
[...] (Cut some long lines dealing with quota)
deliver(username@mydomain.com): Aug 19 08:20:11 Info: maildir:data=//var/vmail/vmail01/mydomain.com/u/us/use/username-2009.08.17.08.51.13//Maildir/:INDEX=//var/vmail/vmail01/mydomain.com/u/us/use/username-2009.08.17.08.51.13//Maildir/
deliver(username@mydomain.com): Aug 19 08:20:11 Info: maildir++: root=//var/vmail/vmail01/mydomain.com/u/us/use/username-2009.08.17.08.51.13//Maildir, index=, control=, inbox=//var/vmail/vmail01/mydomain.com/u/us/use/username-2009.08.17.08.51.13//Maildir
And then, as I expected, here's the kicker:
deliver(username@mydomain.com): Aug 19 08:20:11 Info: cmusieve: /var/vmail/sieve/mydomain.com/username/dovecot.sieve doesn't exist
deliver(username@mydomain.com): Aug 19 08:20:11 Info: cmusieve: Using sievepath: /var/vmail/sieve/dovecot.sieve
deliver(username@mydomain.com): Aug 19 08:20:11 Info: cmusieve: Script not found: /var/vmail/sieve/dovecot.sieve
deliver(username@mydomain.com): Aug 19 08:20:11 Info: msgid=<20090819132003.68C8520206C@mail.mydomain.com>: saved mail to INBOX
So, I changed /etc/dovecot/dovecot.conf to look like this:
plugin {
#sieve = /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
sieve = %Lh/dovecot.sieve
}
And sent the same email:
[...] (Skipped the first part since it's the same)
deliver(username@mydomain.com): Aug 19 08:26:15 Info: cmusieve: Using sieve path: /var/vmail/vmail01/mydomain.com/u/us/use/username-2009.08.17.08.51.13//dovecot.sieve
deliver(username@mydomain.com): Aug 19 08:26:15 Info: cmusieve: Executing script /var/vmail/vmail01/mydomain.com/u/us/use/username-2009.08.17.08.51.13//dovecot.sievec
deliver(username@mydomain.com): Aug 19 08:26:15 Info: msgid=<20090819132554.0911D202877@mail.mydomain.com>: saved mail to INBOX
Errors are gone, it even says it is executing the script, and yet it doesn't...