[Mailman-Users] Still having trouble with an email filter vis-a-vis Chinese crap.
Mark Sapiro
mark at msapiro.net
Sat May 5 18:14:33 EDT 2018
On 05/05/2018 02:05 PM, Kenneth G. Gordon wrote:
> On 5 May 2018 at 13:20, Mark Sapiro wrote:
>
>>> Subject =?utf-8?B?
>>
>> Do you really mean it doesn't contain the ':'?
>
> I am reasonably sure that SOME do not, possibly those few which are getting through, but
> since you brought that up (although I DID suspect as much), I have not been able to check
> on the accuracy of my memory since so far this morning, I have had no more of them show
> up.
>
>> You could try
>>
>> ^Subject:?\s*=\?utf-8\?B\?
>>
>> which would match Subject followed by a colon or not and any amount of
>> white space.
However, if the colon is missing, the
Subject =?utf-8?B?...
line is not a header and it can't be matched by header_filter_rules.
I.e., a message like
To: someone
From: someone
Message-ID: <aaa at b.c>
Subject hi there
Date: some date
body
will be parsed as headers
To: someone
From: someone
Message-ID: <aaa at b.c>
and body
Subject hi there
Date: some date
body
so there's no way you can match that 'Subject' with header_filter_rules
because it isn't a header. If that's really what you're looking at, you
would have to implement a custom handler to match that. See
<https://wiki.list.org/x/4030615>.
On the other hand, if some MUA actually displays the decoded line as the
message subject, it almost certainly does have the colon.
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list