in this thread I wrote it

(?:^|\n)From\:\s*(?:=\?[^?]+\?[BbQq]\?[^?]*\?=|"?
[A-Za-z0-9 ._-]*"?)?\s*[^@\r\n]+\@asdfgh\.com


put it in a single line

Thomas



Von:    katip <ka...@katip.com>
An:     ASSP development mailing list <assp-test@lists.sourceforge.net>
Datum:  22.09.2015 10:50
Betreff:        Re: [Assp-test] Dubious redRe



hmm, indeed..
now its getting complicated with my very modest regex knowledge.
do me favour and tell me a safe example pls. you know what i want to 
achieve. thks.

Katip
>> does the job in short:
>> From\:\s*[^\r\n]+\@asdfgh\.com
> Yes - short! But the 'from:' header will be broken in to multiple lines,
> if it is too long (more than 72 chars) - like:
>
> From: 
=?utf8?B?ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD?=[CR][LF]
> [TAB]   <users_name@@asdfgh.com>[CR][LF]
> next_header:
>
> or
>
> From: [CR[LF]]
> [TAB
> 
]=?utf8?B?ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD?=[CR][LF]
> [TAB]   <users_name@@asdfgh.com>[CR][LF]
> next_header:
>
>
> Your simple (lazy) regex will not match!
>
> Thomas
>
>
>
> Von:    katip <ka...@katip.com>
> An:     ASSP development mailing list <assp-test@lists.sourceforge.net>
> Datum:  22.09.2015 08:25
> Betreff:        Re: [Assp-test] Dubious redRe
>
>
>
> Thanks dear, yes, a "From:" containing "@asdfgh.com" should trigger 
redRe.
>
> my problem was ignoring LF & CR and redRe
> "From\:\s.{1,100}\@asdfgh\.com" was too extensive with 100 chars. next
> line (which is a TO: and has nothing to do with redRe) happened to
> contain an adress containing "@asdfgh.com", thus matching redRe.
>
> now it looks like the following does the job in short:
> From\:\s*[^\r\n]+\@asdfgh\.com
>
> Katip
>
> -------- Original Message --------
> *Subject: *Re: [Assp-test] Dubious redRe
> *From: *Thomas Eckardt <thomas.ecka...@thockar.com>
> *To: *ASSP development mailing list <assp-test@lists.sourceforge.net>
> *Date: *Tue Sep 22 2015 07:59:37 GMT+0300 (GTB Standard Time)
>> Sorry , forgot that the senders name could be provided in ASCII.
>>
>> (?:^|\n)From\:\s*(?:=\?[^?]+\?[BbQq]\?[^?]*\?=|"?[A-Za-z0-9
>> ._-]*"?)?\s*[^@\r\n]+\@asdfgh\.com
>>
>> Thomas
>>
>>
>>
>>
>>
>> Von:    Thomas Eckardt <thomas.ecka...@thockar.com>
>> An:     ASSP development mailing list <assp-test@lists.sourceforge.net>
>> Datum:  21.09.2015 22:12
>> Betreff:        Re: [Assp-test] Dubious redRe
>>
>>
>>
>> Don't  know exactly what you want to do, but the regex works like
> expected
>> - like designed.
>>
>> I think you want to redlist a mail, if the FROM: address contains an
> email
>> address with the @asdfgh.com domain.
>> If I'm right, you have to be much more specific in the regex!
>>
>>
> 
(?:^|\n)From\:\s*(?:=\?[^?]+\?[BbQq]\?[^?]*\?=)?\s*[^@\r\n]+\@asdfgh\.com
>> The mail ...
>> (?:^|\n) - may start or have [LF] (in front of 'From:')
>> From\:\s* - has 'From:' and no or multiple spaces,LF,CR,TAB ...
>> (?:=\?[^?]+\?[BbQq]\?[^?]*\?=)? - may have a mime-encoded name
>>    \s* -  has no or multiple spaces,LF,CR,TAB ...
>> [^@\r\n]+ - has at least one character (up to infinity) that is not any
> of
>> : @,CR,LF
>> \@asdfgh\.com - and finaly has the domain
>>
>> because all assp regexes are not case sensitive, the [BbQq] may be
> written
>> as [bq]
>>
>> Thomas
>>
>>
>>
>> Von:    Katip <ka...@katip.com>
>> An:     ASSP development mailing list <assp-test@lists.sourceforge.net>
>> Datum:  21.09.2015 19:16
>> Betreff:        [Assp-test] Dubious redRe
>>
>>
>>
>> v2.4.5 (15229), win2k8r2
>>
>> (raw headers view)
>> ...
>> From: =?iso-8859-9?Q?Ali_Y=FCksel?= <aliyuk...@qwerty.com>
>> To: "Naci Bey" <n...@asdfgh.com>
>> ...
>>
>> redRe has an entry :
>> From\:\s.{1,100}\@asdfgh\.com
>>
>> message is tagged by ASSP:
>> X-Assp-Re-redRe: From: Ali
>> =?UTF-8?Q?Y=C3=BCksel=20?=<aliyuk...@qwerty.com> T
>> X-Assp-Redlisted: Yes (From: Ali
>> =?UTF-8?Q?Y=C3=BCksel=20?=<aliyuk...@qwerty.com>To...)
>>
>> header lines are appearantly perfect in raw view (checked with various
>> editors).
>> how does it come...? TIA
>>
>> Katip
>>
> 
------------------------------------------------------------------------------
>> _______________________________________________
>> Assp-test mailing list
>> Assp-test@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/assp-test
>>
>>
>>
>>
>>
>> DISCLAIMER:
>> *******************************************************
>> This email and any files transmitted with it may be confidential,
> legally
>> privileged and protected in law and are intended solely for the use of
> the
>> individual to whom it is addressed.
>> This email was multiple times scanned for viruses. There should be no
>> known virus in this email!
>> *******************************************************
>>
>>
> 
------------------------------------------------------------------------------
>> _______________________________________________
>> Assp-test mailing list
>> Assp-test@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/assp-test
>>
>>
>>
>>
>>
>>
>> DISCLAIMER:
>> *******************************************************
>> This email and any files transmitted with it may be confidential,
> legally
>> privileged and protected in law and are intended solely for the use of
> the
>> individual to whom it is addressed.
>> This email was multiple times scanned for viruses. There should be no
>> known virus in this email!
>> *******************************************************
>>
>>
> 
------------------------------------------------------------------------------
>> _______________________________________________
>> Assp-test mailing list
>> Assp-test@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/assp-test
>>
> 
------------------------------------------------------------------------------
> _______________________________________________
> Assp-test mailing list
> Assp-test@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/assp-test
>
>
>
>
>
>
> DISCLAIMER:
> *******************************************************
> This email and any files transmitted with it may be confidential, 
legally
> privileged and protected in law and are intended solely for the use of 
the
>
> individual to whom it is addressed.
> This email was multiple times scanned for viruses. There should be no
> known virus in this email!
> *******************************************************
>
> 
------------------------------------------------------------------------------
> _______________________________________________
> Assp-test mailing list
> Assp-test@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/assp-test
>




------------------------------------------------------------------------------
_______________________________________________
Assp-test mailing list
Assp-test@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/assp-test






DISCLAIMER:
*******************************************************
This email and any files transmitted with it may be confidential, legally 
privileged and protected in law and are intended solely for the use of the 

individual to whom it is addressed.
This email was multiple times scanned for viruses. There should be no 
known virus in this email!
*******************************************************

------------------------------------------------------------------------------
_______________________________________________
Assp-test mailing list
Assp-test@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/assp-test

Reply via email to