You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Joelle <jp...@seinesaintdenis.fr> on 2018/04/27 00:41:58 UTC
regexp dealing with display name don't work
Hello,
I want to block e-mails with a sender display name containing given strings.
All my rules of the type ;
From:name =~ /string/
don't work
On the other side,
rules of the type :
From:addr =~ /string/
work
and rules of the type
From =~ /string/
work only if string lies in the address part of the From field
What must I do to filter e-mails on the display name ?
--
Sent from: http://spamassassin.1065346.n5.nabble.com/SpamAssassin-Users-f3.html
Re: regexp dealing with display name don't work
Posted by John Hardin <jh...@impsec.org>.
On Thu, 26 Apr 2018, Joelle wrote:
> Hello,
>
> I want to block e-mails with a sender display name containing given strings.
>
> All my rules of the type ;
> From:name =~ /string/
> don't work
>
> On the other side,
> rules of the type :
> From:addr =~ /string/
> work
>
> and rules of the type
>> From =~ /string/
> work only if string lies in the address part of the From field
>
> What must I do to filter e-mails on the display name ?
Firstly, please provide some examples of complete From: headers that you
want to match. Please don't change them in any way.
Secondly, your first example is case-sensitive. Is it possible that your
RE and the actual header display name you want to match differ in case?
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
From the Liberty perspective, it doesn't matter if it's a
jackboot or a Birkenstock smashing your face. -- Robb Allen
-----------------------------------------------------------------------
5 days until May Day - Remember 110 million people murdered by Communism