[antispam-f] Re: Tab in 'From:'

  • From: Frank de Bruijn <antispam@xxxxxxxxxx>
  • To: antispam@xxxxxxxxxxxxx
  • Date: Mon, 23 Oct 2006 22:16:50 +0200

On 23 Oct, Steven Pampling <steve.pampling@xxxxxxxxxxxxx> wrote:
> In article <87b5d2784e.Dave@xxxxxxxxxxxxxxxxxxxxxxxxx>,
>    Dave Barnett <dave@xxxxxxxxxxxxxxxxx> wrote:
> > In today's spams, there are a couple that start the 'From:' header
> > with a Tab.  This is not new and they have appeared over the last
> > month or so.  What rule will hit these?  I have failed in my efforts
> > to write on so far :-(

> I don't think the existing rule set copes with tabs.

It doesn't.

> If Frank has finished the Regex coding then From: = ^\t.* will match any
> From header line that starts with a tab.

Could never work. All preceding whitespace is stripped before a header's
contents is checked. Changing that wouldn't be a good idea, as tabs are
perfectly valid in header fields (see RFC2822). In fact, the messages I
receive nearly always have tabs in e.g. the Received headers.

> (^ = start of string, \t = tab, and .* is any character any number of
> times)

> Those with long memories will recall me campaigning for regex capability
> many moons ago.

Sorry to disappoint you, but I'm not sure AntiSpam will ever get real
regex support. I've added some more wildcard functionality to 1.59 alpha
6, but I'm afraid that's not based on regular expressions.

Regards,
Frank

Other related posts: