* 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" <[email protected]>, Wibble
<[email protected]>}'
[email protected]:[email protected]
root@glue:~#
Here it is in action:
root@glue:~# exim4 -be '${filter{${addresses:"Mike,Cardwell"
<[email protected]>, Wibble
<[email protected]>}}{and{{!eq{[email protected]}{$item}}{!eq{[email protected]}{$item}}}}}'
[email protected]
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
signature.asc
Description: Digital signature
-- ## 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/
