Re: [hypermail] filtering input

From: Daniel Stenberg <daniel_at_haxx.se_at_hypermail-project.org>
Date: Thu, 3 May 2001 14:24:02 +0200 (MET DST)
Message-ID: <Pine.GSO.4.30.0105031418470.1296-100000_at_pm1.contactor.se>


On Tue, 1 May 2001, Peter C. McCluskey wrote:

> My tentative thought is to have the filter options work a lot like the
> "deleted" option, i.e. have CFG_LIST-style options:
>
> filter_out = To: .*foo.com
> filter_require = To: .*foo.com
>
> where any message with a header that matches a filter_out line, or
> doesn't have a header matching a filter_require line, would be deleted
> using the same rules as with the delete option (but with a slightly
> different message left in the stub files for delete_level values which
> leave stub files).
> Does this sound like a good approach?

Sure. But are we always only interested in filtering on headers? If not, we need to have to take into acount that a mail body line could start with "To: foo.com". I bet the average user wouldn't want that to match if they're only after the actual header.

I'd say it would be interesting to be able to filter on mail body contents as well.

With a full scale regex engine in use, I can also see other options coming up. Like "search/replace" of particular contents (to remove static stuff from things like the Subject: line) and "Reply-string-prefix-pattern"(1).

(1) = The pattern we use today to detect/strip off "Re:" strings. When people use localized mail clients, they add various strings that hypermail can't possibly know about but that I would be able to add as a user. For example, swedish clients tend to use "Sv:" instead.

-- 
      Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Received on Thu 03 May 2001 02:28:39 PM GMT

This archive was generated by hypermail 2.2.0 : Thu 22 Feb 2007 07:33:53 PM GMT GMT