[Dovecot] Sieve regex never matches
Hi,
I found the following code on the net which should redirect all mails to another address depending on the time of day (useful for forwarding mails to work):
require ["regex"]; if allof (header :regex "date" "(08|09|10|11|12|13|14|15|16|17):..:..", not header :regex "date" "(sat|sun)") { redirect "address@work>"; keep; }
To check and test I simplified the regex to match all mails within a certain hour:
require ["regex"]; if header :regex "date" "20:..:.." { redirect "user@domain"; keep; }
Both scripts compile fine, but their regex never match. Has anyone an idea why? I'm using Dovecot 1.0.0 on Debian Etch stable.
Frank
On Sun, 2007-11-25 at 00:01 +0100, frank.kintrup@fkware.de wrote:
Both scripts compile fine, but their regex never match. Has anyone an idea why? I'm using Dovecot 1.0.0 on Debian Etch stable.
So I guess you also use Debian-compiled Sieve plugin? It's possible that it doesn't have regex support compiled in. I'm not sure if it gives any errors or if it just silently ignores it..
Hi Timo,
Both scripts compile fine, but their regex never match. Has anyone an idea why? I'm using Dovecot 1.0.0 on Debian Etch stable.
So I guess you also use Debian-compiled Sieve plugin? It's possible that it doesn't have regex support compiled in. I'm not sure if it gives any errors or if it just silently ignores it..
No, no errors, so regex support was compiled in. The regex just never matched/always returned false. I've installed version 1.0.5 from the Debian testing branch yesterday evening, and now it works, so the problem has already been fixed.
Frank
participants (3)
-
Frank Kintrup
-
frank.kintrup@fkware.de
-
Timo Sirainen