Gnus development mailing list
 help / color / mirror / Atom feed
From: NAGY Andras <nagya@inf.elte.hu>
Subject: Sieve support in Gnus, sample implementation
Date: 19 Feb 2001 04:45:55 +0100	[thread overview]
Message-ID: <dzcr90vtjws.fsf@pandora.inf.elte.hu> (raw)

[-- Attachment #1: Type: text/plain, Size: 1830 bytes --]

Gnus has a nice feature, splitting (and fancy splitting), for sorting
incoming mail to folders on the client side.  Furthermore, Gnus has
another feature, group mail splitting, which allows the user to store
splitting info in group paramteres, that is, keep everything related
to a particular mailing list (splitting rules, to-address, admin
address, comments, styles etc) in one place.

Sieve is a mail filtering language, available on certain IMAP servers,
and enables server side mail filtering.  Sieve's server side sorting
is more efficient than Gnus' client side, but the user has to maintain
a separate sieve script in addition to the other group paramteres.

So why not combine these two things, and let Gnus auto-generate a
Sieve script, based on group paramters?

Why not, indeed.  :)

Below is a quick hack (no concepts, docs or whatever) demonstrating a
possible implementation.  This allows you to write things like

 (sieve address "sender" "owner-ding@hpc.uh.edu")

or

 (sieve anyof ( (address "sender" ("quux@bar.com" "boss@bar.com")
                (size :over 12K))))

among group parameters, and integrate them into your sieve script,
resulting in:

if anyof (address "sender" ["quux@bar.com", "boss@bar.com"] ) {
        fileinto "INBOX.mail.bar";
}
elsif address "sender" "owner-ding@hpc.uh.edu" {
        fileinto "INBOX.list.ding";
}



Usage: create an empty, or modify your existing script to look like:

--->
require "fileinto";

front of your script

## Begin Gnus Sieve Script

# i think two newlines are needed here
## End Gnus Sieve Script

rest of your script
<---

Define group paramters, and do an M-x sieve-update, then upload your
script.


Opinions, suggestions (both technical and conceptual), patches etc are
welcome.  BTW, any ideas why lines 55-56 (commented out) not working?



Andras



[-- Attachment #2: sieve.el --]
[-- Type: application/emacs-lisp, Size: 1697 bytes --]

                 reply	other threads:[~2001-02-19  3:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dzcr90vtjws.fsf@pandora.inf.elte.hu \
    --to=nagya@inf.elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).