Re: [Exim] Two questions

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Tor Slettnes
Fecha:  
A: Valentin S. Ryabinin
Cc: exim-users
Asunto: Re: [Exim] Two questions
On Apr 30, 2004, at 01:03, Valentin S. Ryabinin wrote:

> # i want to deliver all messages, which "yes" in spam_router: to spam
> mailbox.
> # mailbox spam exists in cyrus such as public.spam
> # how i can redirect in spam_router any message by condition into spam
> box?
> # i think i must change $local_part from 'anyuser' to 'spam'


I would do this via a sieve filter within Cyrus. That way, each user
can control their own filters (e.g. using Cyrus' "sieveshell", or
graphical sieve editors like 'websieve' or 'ingo' (which can be tied
into IMP)).

Here is an example sieve script:

### Sieve Filter
require "fileinto";

if header :matches "X-Spam-Status" "Yes*"
    { fileinto "INBOX.Junk"; }


elsif address :localpart :is [ "To", "Cc" ] [ "postmaster", "abuse",
"root" ]
    { fileinto "INBOX.Admin"; }


elsif address :localpart :is [ "To", "Cc" ] "noc"
    { fileinto "INBOX.InterNic"; }


elsif address :localpart :is  [ "To", "Cc" ] "yourusername"
    { keep; }


else
    { fileinto "INBOX.Bulk"; }