Re: regexp dealing with display name don't work

2018-04-28 Thread Joëlle Pfeffer
You were right : as soon as I escaped the @ character, it worked. I had probably not tested it before though it was the first thing I should have done with a special character. Please excuse me for the disturbance and thank you for the quickness of the answers from your team and from other subs

Re: regexp dealing with display name don't work

2018-04-27 Thread John Hardin
On Fri, 27 Apr 2018, Joëlle Pfeffer wrote: To answer John Harding, here are some display names that I want to block : "@ADMIN" "@WEB-SUPPORT" "@SUPPORT ADMIN" "@webmaster" Is the @ at the beginning of the name part in all cases? Try this: header FROM_NAME_PREFIX_ATSIGN From:name =~ /^\@

Re: regexp dealing with display name don't work

2018-04-27 Thread John Hardin
On Fri, 27 Apr 2018, Joëlle Pfeffer wrote: Hi David, Thank you for your answer. I don't think I have to escape the @ character. You do. It is recognized without being escaped since when my rule is : From:name =~ /@.b/i The period is changing the interpretation of the @ sign. -- John H

Re: regexp dealing with display name don't work

2018-04-27 Thread Bill Cole
On 27 Apr 2018, at 16:27, Joëlle Pfeffer wrote: Hi David, Thank you for your answer. I don't think I have to escape the @ character. Yes, you do, if you want to match a character following it that could be the first character in an unreserved variable name (letter or underscore) or is an e

regexp dealing with display name don't work

2018-04-27 Thread Joëlle Pfeffer
To answer John Harding, here are some display names that I want to block : "@ADMIN" "@WEB-SUPPORT" "@SUPPORT ADMIN" "@webmaster" I think I already tried to escape the @ character but it didn't work better. I will try again. Cordialement, Joëlle Pfeffer, Cheffe de projet DINSI/Infrastruc

Re: regexp dealing with display name don't work

2018-04-27 Thread Joëlle Pfeffer
- Mail original - De: "David B Funk" À: "Joëlle Pfeffer" Cc: users@spamassassin.apache.org Envoyé: Vendredi 27 Avril 2018 22:09:01 Objet: Re: regexp dealing with display name don't work On Fri, 27 Apr 2018, Joëlle Pfeffer wrote: > I have progressed. &g

Re: regexp dealing with display name don't work

2018-04-27 Thread John Hardin
On Fri, 27 Apr 2018, David B Funk wrote: (note the trailing 'i' makes the regex be case-insenstive so /\@A/i doesn't make sense). ...it makes precisely as much sense as /\@a/i does... :) -- John Hardin KA7OHZhttp://www.impsec.org/~jhardin/ jhar...@impsec.orgFALaholic

Re: regexp dealing with display name don't work

2018-04-27 Thread David B Funk
On Fri, 27 Apr 2018, Joëlle Pfeffer wrote: I have progressed. If my rule is header REGLE_HF002 From:name =~ /@A/i e-mails containing From: @A or From: "@AB" or From: "@Ab" are not blocked but if my rule is header REGLE_HF002 From:name =~ /@.b/i e-mails containing From: "@Ab" or From: "@A

Re: regexp dealing with display name don't work

2018-04-27 Thread John Hardin
On Fri, 27 Apr 2018, Joëlle Pfeffer wrote: I have progressed. If my rule is header REGLE_HF002 From:name =~ /@A/i e-mails containing From: @A < jopfef...@free.fr > or From: "@AB" < jopfef...@free.fr > or From: "@Ab" < jopfef...@free.fr > are not blocked but if my rule is header REGLE_HF002 Fr

Re: regexp dealing with display name don't work

2018-04-27 Thread John Hardin
On Fri, 27 Apr 2018, Joëlle Pfeffer wrote: I have progressed. If my rule is header REGLE_HF002 From:name =~ /@A/i e-mails containing From: @A < jopfef...@free.fr > or From: "@AB" < jopfef...@free.fr > or From: "@Ab" < jopfef...@free.fr > are not blocked but if my rule is header REGLE_HF002 Fr

regexp dealing with display name don't work

2018-04-27 Thread Joëlle Pfeffer
I have progressed. If my rule is header REGLE_HF002 From:name =~ /@A/i e-mails containing From: @A < jopfef...@free.fr > or From: "@AB" < jopfef...@free.fr > or From: "@Ab" < jopfef...@free.fr > are not blocked but if my rule is header REGLE_HF002 From:name =~ /@.b/i e-mails contain

Re: regexp dealing with display name don't work

2018-04-26 Thread John Hardin
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 o

regexp dealing with display name don't work

2018-04-26 Thread Joelle
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