On Mon, 2014-09-01 at 03:17 -0400, Jude DaShiell wrote:
> Messages with question marks and spaces have been showing up in my inbox 
> on another account.  To blacklist these [? ] would take care of those 
> characters in a Subject: line.  Would such a regular expression 
> effectively blacklist any message having just those two kinds of 
> characters in its Subject: line in any combination?
>
No: a regex along these lines 
   /[? ]/ 
will hit all subject lines containing either a space or a question mark,
i.e. just about every subject line you'll ever see.

This one 
   /[? ].*[? ]/ 
will only hit subjects with both characters in any order, but is
probably also far too general to use by itself. Make it a subrule (name
starts double underscore) and use a metarule to combine it with another
subrule that fires on something that usually only appears in spam and
you may have the basis of something more useful.

Metarules are useful. For instance one that must find a product name and
a sales phrase in the message to fire will distinguish sales spam from a
message from a friend raving about a new widget he's just bought. Learn
to use them rather than relying on a single regex to recognise spam.


Martin



>   The ultimate 
> blacklist entry for such messages would include all punctuation and the 
> space character.  These messages are written in fonts not translated by 
> us-ascii or unicode, so I'd be open to blacklisting based on national 
> origin of messages as well but think both kinds of blacklist entries will 
> need to be used in order to shut this traffic off permanently.  The other 
> internet service provider runs his system wide open and users have to use 
> spamassassin to deal with the consequences.
> 
> 
> 



Reply via email to