On Sun, Sep 26, 2021 at 1:09 PM Hung Pham via Exim-users < exim-users@exim.org> wrote:
> Hi. > > I have a filter likes this in /etc/system_filter.exim file > > if > $h_to: is "a...@mydomain.com" > then > if $sender_address: does not match "(user1|user2|user3)@mydomain.com" > then > fail text "You are not in the allowed list" > seen finish > endif > endif > > It works well with emails sending from webmail, or other email > clients. But with Outlook, all emails can pass the filter, and be > processed as a normal message. It looks like Exim and Outlook don't > match headers, or something like that? > > Any ideas? > Try ANDing the conditions and see the result: if $h_to: is "a...@mydomain.com" and $sender_address: does not match "(user1|user2|user3)@mydomain.com" then fail text "You are not in the allowed list" seen finish endif -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' :-) -- ## 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/