Re: [exim] System Filter Question

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Phil Pennock
Data:  
Para: Kevin Colagio
CC: exim-users
Assunto: Re: [exim] System Filter Question
On 2007-05-02 at 12:01 -0400, Kevin Colagio wrote:
> We are running Exim 4.52 and I'm trying to setup a system filter that
> will match the following flow...


Any particular reason to use a filter?

> if
>     $local_part ends "-l"
>     and
>         subject is "User Quarantine Account Information"
>         or
>         subject is "Spam Quarantine Summary"
> then
>     deliver to ${local_part}-owner@???
> endif


Router (untested, beware):

  qreport_to_owner:
    driver = redirect
    domains = +local_domains
    condition = ${if or{\
        {eq{$rh_subject:}{User Quarantine Account Information}}\
    {eq{$rh_subject:}{Spam Quarantine Summary}}\
    } {yes}{no}}
    data = ${quote_local_part:${local_part}-owner}@???


Put this before the Routers which will handle the mail normally, perhaps
just after you send off all non-local mail to be handled elsewhere.

$rh_<header>: is the raw value of the header, before any sort of MIME
decoding or stripping whitespace, which should be sufficient for an
auto-generated string of text; if you hit problems (eg, generating
software is sloppy and puts in trailing whitespace) then change
$rh_subject: to $bh_subject: to do MIME conversion and whitespace
stripping, but not any charset conversion. See "11.5 Expansion items"
for an explanation of these.

-Phil