[Dovecot] Quick question on sieve

LuKreme kremels at kreme.com
Wed Nov 20 02:14:26 EET 2013


On 19 Nov 2013, at 15:36 , Stephan Bosch <stephan at rename-it.nl> wrote:
>> This means that, by default, a new mailing list is automatically sorted to its own mailbox without my doing anything at all.
> 
> Yes and yes. I'd normally translate the above Procmail recipe for you,
> but it is a bit hard to read because my Procmailese is a bit rusty
> regarding regular expressions. So I'll just work with your question. A
> very simple example looks as follows:
> 
> require "variables";
> require "fileinto";
> 
> if header :matches "list-id" "*" {
>    set "listname" "${1}";
> }
> 
> fileinto "$listname";

That's good to know (and the first time I've seen a sieve example with variables.

Will:
    :matches "list-id" "*" {

match the entire line after List-ID? desk set "list name" "${1}" trap the first term, or is $1 the entire match to EOL? If it's not the first word, is it possible to match the first word without installing the regex package with sieve? (I'm loath to install anything extra at this point)

for example, for this list, the list-id is

List-Id: Dovecot Mailing List <dovecot.dovecot.org>

Which is not a good name for fileinto "$listname"

> To fully translate your recipe, you'll probably need the regex extension (http://tools.ietf.org/html/draft-murchison-sieve-regex-08) as well. The (match) variables are documented in RFC 5229 (http://tools.ietf.org/html/rfc5229).

<off to read>

> Regards,

Thanks!

-- 
Transvestite: A guy who likes to eat, drink and be Mary.



More information about the dovecot mailing list