Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

subject filter for gb2312

2 views
Skip to first unread message

Marcel Hochuli

unread,
Sep 14, 2011, 12:27:07 PM9/14/11
to
Hi

I want to filter out any chinese e-mail on a MTA. The only common string I found was the beginning of the subject that defines the chinese encoding, gb2312.

Subject: =?gb2312?B?TWFuYWdlcnMgc2tpbGxzIHVwZ3I=?=
=?gb2312?B?YWRpbmcKIC0tzuK9obLFvrSzyg==?=

My rule checks Subject is *gb2312*

It doesn't met the above Example Subject.

But it will met if the subject is just "=?gb2312?B?TWFuYWdl".

Why the difference? - How do I catch it?


Marcel

+---
mailto:mhoc...@a-f.ch
otherto:no...@a-f.ch
_______________________________________




#############################################################
This message is sent to you because you are subscribed to
the mailing list <CGat...@mail.stalker.com>.
To unsubscribe, E-mail to: <CGateP...@mail.stalker.com>
To switch to the DIGEST mode, E-mail to <CGatePr...@mail.stalker.com>
To switch to the INDEX mode, E-mail to <CGatePr...@mail.stalker.com>
Send administrative queries to <CGatePro...@mail.stalker.com>

Nicolas Hatier

unread,
Sep 14, 2011, 12:49:20 PM9/14/11
to
Try

Header is Subject:*gb2312

I think the Subject condition acts on the decoded header.

Nicolas

Nicolas Hatier, ing. <nicolas...@niversoft.com>
Niversoft idées logicielles - http://www.niversoft.com

Marcel Hochuli

unread,
Sep 15, 2011, 10:39:52 AM9/15/11
to
Thanks Nicolas

With your help I got the correct check:

[Header Field]   [is]   [Subject:*gb2312*]

This works as expected.


Marcel

+---
_______________________________________



Kee Hinckley

unread,
Sep 15, 2011, 3:59:04 PM9/15/11
to

On Sep 15, 2011, at 10:39 AM, Marcel Hochuli wrote:

> Thanks Nicolas
>
> With your help I got the correct check:
>
> [Header Field] [is] [Subject:*gb2312*]
>
> This works as expected.

The only problem I have with that is that it would filter out this message.

Nicolas Hatier

unread,
Sep 15, 2011, 4:07:07 PM9/15/11
to
You can use

[Header Field]   [in]   [Subject:*gb2312?B*,Subject:*gb2312?Q*]

I don't remember if ? is a wildcard or not in rules, but the B or Q right after will take care of all the cases. B means Base64 and Q means QuotedPrintable, and currently there's no other option.

Nicolas

Nicolas Hatier, ing. <nicolas...@niversoft.com>
Niversoft idées logicielles - http://www.niversoft.com


0 new messages