The correct syntax for the header rule should be: header __FROM_ADDRESS From:addr =~ /\@yahoo\.com/i
This rule will specifically match email addresses containing "@yahoo.com" while excluding addresses like "ya...@gmail.com". Regarding the example provided, the "__RETURNPATH_IS" rule should indeed be triggered since it matches "yahoo.com" in the return-path. If you're uncertain about the intended behavior of the rules, please clarify the requirements so we can adjust the rules accordingly. Jimmy On Wed, Mar 20, 2024 at 4:52 AM Erickarlo Porro <epo...@earthcam.com> wrote: > Could someone help me figure out why my custom rule is matching when it > should not be matching? > > > > This is my current setup: > > header __FROM_ADDRESS From =~ /yahoo/i > > header __RETURNPATH_IS Return-Path !~ /yahoo.com$/i > > > > meta NOT_IT (__FROM_ADDRESS && __RETURNPATH_IS) > > describe NOT_IT Sender is not correct > > score NOT_IT 4.0 > > > > > > Take these headers as an exmaple: > > From: ya...@gmail.com > > Return-path: ya...@yahoo.com > > > > If I send an email that would have those headers Spamassassin is getting a > hit for my NOT_IT rule but that should not match because __RETURNAPTH_IS > should not get a hit. > > > > How can I troubleshoot this? > > > > >