[Dovecot] Sieve problem with managesieve
I have a problem with a sieve script.. my config is dovecot 1.2.15 with managesieve, and roundcube.
Now i have this script WORKING:
require ["fileinto"]; # rule:[TracSvil] if anyof (header :contains "From" "xxx@example.com") { fileinto "INBOX.Trac Svil"; stop; }
And this script NOT working: require ["fileinto"]; # rule:[TracSvil] if anyof (header :is "From" "trac@ardeek.com") { fileinto "INBOX.Trac Svil"; stop; }
Can someone explain me the difference between these script? there is any error in the second script?
Greetings!
-- Simone Caruso IT Consultant p.iva: 03045250838
On Wed, 10 Nov 2010 19:01:02 +0100, Simone Caruso wrote:
I have a problem with a sieve script.. my config is dovecot 1.2.15 with managesieve, and roundcube. if anyof (header :contains "From" "xxx@example.com") if anyof (header :is "From" "trac@ardeek.com")
":is" is an absolute match, ":contains" is a substring match.
http://tools.ietf.org/html/rfc5228#section-2.7.1
-- Aleksander 'A.L.E.C' Machniak http://alec.pl LAN Management System Developer http://lms.org.pl Roundcube Webmail Project Developer http://roundcube.net
On 10/11/2010 21:14, A.L.E.C wrote:
On Wed, 10 Nov 2010 19:01:02 +0100, Simone Caruso wrote:
I have a problem with a sieve script.. my config is dovecot 1.2.15 with managesieve, and roundcube. if anyof (header :contains "From" "xxx@example.com") if anyof (header :is "From" "trac@ardeek.com")
":is" is an absolute match, ":contains" is a substring match.
Of course, but with the SAME header "From:" ( From: "AA" xxx@sample.com for example) :contains match but :is _don't_ match... i don't understand the reason :/
For my logic "if anyof (header :is "From" "xxx@example.com")" should match "From: "AA" xxx@example.com", but in practice that script don't.
-- Simone Caruso IT Consultant p.iva: 03045250838
Hi,
"header :is From" compares against the whole From: header. You only
want to test the containing email address. See
address
This lets you match on only an address field's email address, not its . The test header "From" :is "jsmith@example.com" would be false Check the RFC and search for "address", there you will find Michael On Nov 11, 2010, at 11:13 AM, Simone Caruso wrote: On 10/11/2010 21:14, A.L.E.C wrote: On Wed, 10 Nov 2010 19:01:02 +0100, Simone Caruso wrote: I have a problem with a sieve script..
my config is dovecot 1.2.15 with managesieve, and roundcube.
if anyof (header :contains "From" "xxx@example.com")
if anyof (header :is "From" "trac@ardeek.com") ":is" is an absolute match, ":contains" is a substring match. Of course, but with the SAME header "From:" ( From: "AA" for example) :contains match but :is
_don't_ match... i don't understand the reason :/ For my logic "if anyof (header :is "From" "xxx@example.com")" should --
Simone Caruso
IT Consultant
p.iva: 03045250838
associated name. For example, I could send an email as "John Smith"
because that is not the entire header. But address "From" :is "jsmith@example.com
" would be true because that is the entire address.
explanations and examples
http://www.faqs.org/rfcs/rfc3028.html
match "From: "AA" xxx@example.com", but in practice that script
don't.
participants (3)
-
A.L.E.C
-
Michael Kliewe
-
Simone Caruso