Hello Steffen,
Thanks for your help, your message has reminds me that I forget the
header specification.
This new sieve script works for me :
require ["fileinto"];
if allof (header :contains "To" "[email protected]")
{
fileinto "INBOX.Test";
redirect "[email protected]";
stop;
}
Thanks,
Clement
-----
Date: Mon, 18 Mar 2013 14:28:17 +0100 (CET)
From: Steffen Kaiser <[email protected]>
To: Dovecot Mailing List <[email protected]>
Subject: Re: [Dovecot] Dovecot - Sieve script loaded but filtering
doesn't works ?
Message-ID:
<alpine.deb.2.02.1303181419590.3...@pc-2m63.inf.fh-bonn-rhein-sieg.de>
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 18 Mar 2013, Clement PAULET wrote:
Dear Clement,
This is my script (using for my test) :
require "fileinto";
if address "To" "[email protected]"
{
fileinto "Test";
}
Works for me in v2.2.
Did you verified that the header "To" really exists in the message and
that "[email protected]" is part of it? The log you've posted displays
the
envelope information, which is not necessary the same as the header
information.
Also, remove the precompiled Sieve script, in order to ensure that the
pre-compiled one is really one from the script. You could also
decompile
it to make sure, it has been created from your test script. You'll
find
sieve-dump in src/sieve-tools/, if you compile from sources, or maybe
in
/usr/local/bin.