Re: [exim] Filter separator

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Maxi Cooper - EGS
Data:  
Para: Mike Cardwell
CC: Users Users
Asunto: Re: [exim] Filter separator
Thanks for your reply Mike. What would you recommend to do this if the
comma filter won't be safe (I certainly didn't considered the commas in the
name field :S )? I will have messages with one or several addresses in the
To header, among which there could be two specific ones which I wanna
remove, any other suggestions?

Regards.

Maxi Cooper
*EGS* | Gestionamos pedidos.
Tel.: 11 5917 2513 | 15 4070 6215
egsolus.com.ar


2014-02-20 13:47 GMT-03:00 Mike Cardwell <exim-users@???>:

> * on the Thu, Feb 20, 2014 at 12:02:46PM -0300, Maxi Cooper - EGS wrote:
>
> > Hi all. Have a quick question but can't find the answer anywhere. I need
> to
> > change the separator in a filter expression, so that:
> >
> > ${filter{a,b,c}{!eq{$item}{b}}
> >
> > returns "a,c"
>
> root@glue:~# exim4 -be '${filter{<,a,b,c}{!eq{$item}{b}}}'
> a,c
> root@glue:~#
>
> > Also, can I use a AND or OR expression here, something of the sort of:
> >
> > ${filter{a:b:c}{!eq{$item}{b} AND !eq{$item}{c}}
> > so that this returns just "a". I would try this, but doesn't see the best
> > way to achieve it:
> >
> > ${filter{${filter{a,b,c}{!eq{$item}{b}}}{!eq{$item}{c}}
>
>
> root@glue:~# exim4 -be
> '${filter{<,a,b,c}{and{{!eq{$item}{b}}{!eq{$item}{c}}}}}'
> a
> root@glue:~#
>
> > FYI, I need this to filter some addresses in a custom filter, where I
> need
> > to remove two specific addresses from certain emails, so that "a,b,c"
> would
> > actually be $h_To.
>
> Be careful with that. "To" headers can contain all sorts of information.
> People
> can have commas in their name field for example.
>
> --
> Mike Cardwell  https://grepular.com/     http://cardwellit.com/
> OpenPGP Key    35BC AF1D 3AA2 1F84 3DC3  B0CF 70A5 F512 0018 461F
> XMPP OTR Key   8924 B06A 7917 AAF3 DBB1  BF1B 295C 3C78 3EF1 46B4

>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>