Re: [exim] Filter for Conditional Header Removal
On 12 April 2018 at 10:05, Ajay Kajla via Exim-users wrote: > Hi, > > We have following requirement any mail coming from a...@abc.com and subject > contains "SomeThing" to go to x...@mydomain.com With complete headers and > to > a...@mydomain.com without Cc and From headers. > > I tried following filter but it's removing headers for both > x...@mydomain.com > & a...@mydomain.com. > > = > > if ("$h_from:" contains "a...@abc.com" and "$header_subject:" contains > "SomeThing") > then > deliver "x...@mydomain.com" (should go to x...@mydomain.com With complete > headers ) > endif I can't help with the why headers are being removed for both. However my thought is that you might want to be a bit careful with "$h_from:" contains "a...@abc.com" as I'm pretty sure it will also match when $h_from is, say, "z...@abc.com" (because this also *contains* "a...@abc.com"). Mind, I might well be wrong as I've only used a system filter in one situation, and that was about 10 years ago! :-) Cheers, Mike B-) -- Systems Administrator & Change Manager IT Services, University of York, Heslington, York YO10 5DD, UK Tel: +44-(0)1904-323811 Web: www.york.ac.uk/it-services Disclaimer: www.york.ac.uk/docs/disclaimer/email.htm -- ## 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/
Re: [exim] Filter for Conditional Header Removal
On 12/04/18 11:35, Ajay Kajla via Exim-users wrote: >> On 12/04/18 10:05, Ajay Kajla via Exim-users wrote: >>> if ("$h_from:" contains "a...@abc.com" and "$header_subject:" contains >>> "SomeThing") >>> then >>> headers remove Cc >> >> Check the docs on that last command. http://exim.org/exim-html-current/doc/html/spec_html/filter_ch-exim_filter_files.html#SECTheaders -- ## 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/
Re: [exim] Filter for Conditional Header Removal
Hi Jeremy, > if ("$h_from:" contains "a...@abc.com" and "$header_subject:" contains > "SomeThing") > then > headers remove Cc >> Check the docs on that last command. I'm sorry, but can you please be little more expressive on this. With Best Regards, Ajay On Thu, Apr 12, 2018 at 2:58 PM, Jeremy Harris via Exim-users < exim-users@exim.org> wrote: > On 12/04/18 10:05, Ajay Kajla via Exim-users wrote: > > if ("$h_from:" contains "a...@abc.com" and "$header_subject:" contains > > "SomeThing") > > then > > headers remove Cc > > Check the docs on that last command. > > -- > Jeremy > > -- > ## 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/ > -- -- ## 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/
Re: [exim] Filter for Conditional Header Removal
On 12/04/18 10:05, Ajay Kajla via Exim-users wrote: > if ("$h_from:" contains "a...@abc.com" and "$header_subject:" contains > "SomeThing") > then > headers remove Cc Check the docs on that last command. -- Jeremy -- ## 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/
[exim] Filter for Conditional Header Removal
Hi, We have following requirement any mail coming from a...@abc.com and subject contains "SomeThing" to go to x...@mydomain.com With complete headers and to a...@mydomain.com without Cc and From headers. I tried following filter but it's removing headers for both x...@mydomain.com & a...@mydomain.com. = if ("$h_from:" contains "a...@abc.com" and "$header_subject:" contains "SomeThing") then deliver "x...@mydomain.com" (should go to x...@mydomain.com With complete headers ) endif if ("$h_from:" contains "a...@abc.com" and "$header_subject:" contains "SomeThing") then headers remove Cc headers remove From deliver "a...@mydomain.com" (should go to a...@mydomain.com Without Cc and >From headers ) endif = Regards, Ajay -- ## 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/