[imp] Re: [horde] Filtering based on headers
Michael M Slusarz
slusarz@bigworm.colorado.edu
Fri, 19 Jul 2002 10:25:23 -0600
Quoting Ryan Gallagher <ryan@studiesabroad.com>:
| Quoting Ramon Kagan <rkagan@YorkU.CA>:
|
| > HI,
| >
| > Using IMP3.1 is there a way to filter mail based on headers. We're
| using
| > SpamAssassin and would like to filter based on the header
| > X-Spam-Status: Yes
| >
| > So far all I see are filters for To, From, cc, subject, body.
| >
| > Thanks in advance,
| >
| > Ramon Kagan
Part of the reason I rewrote/revised the filtering code was to allow
filtering on other headers besides the five listed above. The problem
still lies in that imap_search() does not have an option to search for
headers other than the five listed above. Instead, you have to do an
imap_search() for 'TEXT' - which searches ALL text in ALL messages in the
mailbox. This might be a potential performance hit (although, thinking
about it a bit more, it is probably nearly as costly to search via headers
since imap_search() would have to parse each message to grab the headers
anyway....) Hmmm. Maybe this is not such a performance problem after
all...
I guess I will take a look and see what I can come up with. It is still
probably better to filter using procmail or similar mechanism, but I
realize that sometimes this is not an option (especially for novice users
or users without access to a shell account, for example).
michael
______________________________________________
Michael Slusarz [slusarz@bigworm.colorado.edu]
The University of Colorado at Boulder