Re: [exim] Filter separator

Pàgina inicial
Delete this message
Reply to this message
Autor: Maxi Cooper - EGS
Data:  
A: Mike Cardwell
CC: Users Users
Assumpte: Re: [exim] Filter separator
Thanks for your reply Mike. Addresses seems promising, only that the name
will be lost, right? Anyways, I tried it (with just one address for now)
but can't manage to make it work, am I missing something?

        headers remove "To"
        headers add "To: ${filter{${addresses:>,
$h_Cc:}}{!eq{${addresses:>, $h_X-Pedidos:}}{$item}}}"
        headers remove "Cc"


This is in my system filter file, and I have in *$h_Cc* two addresses, my
Gmail account and *pedidos@domainA.* In *$h_X-Pedidos *I have *Some name
<pedidos@domainA>.* Still, when I receive the email I do have this address
in the To: field. Any ideas?

Thanks again and regards.

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


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

> * on the Thu, Feb 20, 2014 at 01:59:15PM -0300, Maxi Cooper - EGS wrote:
>
> > 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?
>
> The "addresses" string expansion looks useful:
>
> root@glue:~# exim4 -be '${addresses:"Mike,Cardwell" <foo@???>,
> Wibble <wobble@???>}'
> foo@???:wobble@???
> root@glue:~#
>
> Here it is in action:
>
> root@glue:~# exim4 -be '${filter{${addresses:"Mike,Cardwell" <
> foo@???>, Wibble <wobble@???>}}{and{{!eq{foo@???
> }{$item}}{!eq{notinthelist@???}{$item}}}}}'
> wobble@???
> root@glue:~#
>
> So you probably want something like this:
>
>
> ${filter{${addresses:$h_To:}}{and{{!eq{ADDRESS1}{$item}}{!eq{ADDRESS2}{$item}}}}}
>
> Don't forget about Cc headers.
>
> --
> 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/
>