On 9/24/21 21:07, Hung Pham via Exim-users wrote:
> Hi.
>
> I have a filter likes this in /etc/system_filter.exim file
>
> if
>   $h_to: is "a...@mydomain.com"

You might want to make that:

foranyaddress $header_to:
( $thisaddress contains "a...@mydomain.com" )

or something like that. I think that what you have is comparing the entire 
contents of the To: header, therefore it would match if it is exactly 
a...@mydomain.com but not if it is:

All People <a...@mydomain.com>

See 
https://www.exim.org/exim-html-current/doc/html/spec_html/filter_ch-exim_filter_files.html#SECTheadervariables

> then
>     if $sender_address: does not match "(user1|user2|user3)@mydomain.com"

$sender_address is the envelope sender, you can see that in the incoming line 
of the exim log.

If you closely examine the envelope sender (as logged) and the exact format of 
the To: header, you'll probably find what is making the difference.



-- 
## 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/

Reply via email to