bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sieve (was: Re: Mailutils new competitor)


From: Alain Magloire
Subject: Re: Sieve (was: Re: Mailutils new competitor)
Date: Mon, 19 Feb 2001 16:30:42 -0500 (EST)

> 
> > 
> > Yes, sieve seems to be the standard language(at least the one documentend
> > by the ietf(imc)) to make filtering etc ...  Instead of reinventing yet
> > another awkward syntax to do the same, lets standardize on std.
> > 
> 
> indeed, I thought I mentioned this Long Ago (tm).

Something missing currently in the API : a general abstraction Data
to do searching and sorting/threading.  An abstraction layer that is
independant of the protocol but that each protocol could implement.

For example looking for "From" == "bug-mailutils" for POP3
will translate to 

TOP msgno
...
parse headers
strcmp (bug-mailutils, from_header)
...

For IMAP it will be

a00 SEARCH FROM "bug-mailutils"
...

JavaMail took the approach that I think Gnome camel took to, defining
a set of term token.

...
  SubjecTerm subjectTerm = new SubjectTerm ("making money"); 
  FromTerm fromTerm = new FromTerm (new InternetAddress ("bug-mailutils"));
  aTerm = new OrTerm (fromTerm, subjectTerm);
...
 etc ...

The aTerm contains everything for the protocol to implement the search.
 
I'm not sure how camel implement that in C.

Something similar could be done in mailutils, or maybe using
SQL commands ;-),  Or maybe using sieve as a general glue for
searching, sorting, threading etc .. but it seems to have limitations.

> 
> as I recall sieve goes something like:
> 
>   if message_subject == $known_subject
>      save_to($known_subject_folder)

# from rfc 3028
        if size :over 1M
        {
                reject text:
                        Please do not send me large attachments.
                        Put your file on a server and send me the URL.
                        Thank you.
                        .... Fred
                        .
                ;
                stop;
        }

# Handle messages from known mailing lists
# Move messages from IETF filter discussion list to filter folder
#
        if header :is "Sender" "address@hidden"
        {
                fileinto "filter";  # move to "filter" folder
        }
 

> 
>  basically, it's syntax knows about mail and defines actions to be performed. 
> The sieve interpreter should take hooks so that when a 'save_to' operation
> happens, it calls mailutils' save message to folder function.
> 

-- 
au revoir, alain
----
Aussi haut que l'on soit assis, on n'est toujours assis que sur son cul !!!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]