On Sat, 8 May 2021 16:59:59 +0200 Matus UHLAR - fantomas wrote: > >On Fri, 07 May 2021 10:19:49 -0400 Steve Dondley wrote: > >> I want to extract the first part of an email address from the > >> "Delivered-To" header and use it witin a custom rule. > >> > >> Example pseudo code: > >> > >> my ($first_part) = $email_file =~ /^Deliver-To: (.*)/; > >> > >> body __LOCAL_AWKWARD_INTRO /hi $first_part/i > > On 08.05.21 15:02, RW wrote: > >From: RW <rwmailli...@googlemail.com> > > > >Why would you want to do this? Surely the value in this is "hi" > >being followed by an email address - regardless of a match. If > >anything the mismatch is more spammy. > > Do you mean that "hi rw" is more spammy than "hi rwmaillists"?
Neither of those are email addresses. I meant that that: hi j...@example.com or, if we take the regex literally hi <j...@example.com> is at least as spammy if that address wasn't used in the envelope than if it was. So it's sufficient to just check for the address format.