[imp] Filters

Michael M Slusarz slusarz@bigworm.colorado.edu
Sun, 19 May 2002 23:13:59 -0600


Quoting Ground Hog <hogalot@yahoo.com>:

| Is there a way to filter incoming messages based on
| header information besides "To", "Cc", "From" and
| "Subject"?  Our ISP has installed Spam Assassin which
| will mark messages with a header similar to the
| following:
| 
| X-Spam-Status: Yes, hits=34.5 required=7.0 
| X-Spam-Status: No, hits=0.8 required=7.0 
| 
| I would like to automatically delete any messages
| marked as "X-Spam-Status: Yes" (I am using an IMAP
| mailbox).  Any easy way to do this with an IMP filter?

As of right now, there is no way of doing this.  But this is definitely 
something I think could be implemented, and would be generally helpful. 
(Patches anyone?)

Until recently, there was no easy way to return message headers except for 
the headers defined in imap_headerinfo().  However, I just added a function 
(in the HEAD branch) that returns all headers for a given message - 
MIME_Structure::parseMIMEHeaders().  This would be handy for implementation.

michael

______________________________________________
Michael Slusarz [slusarz@bigworm.colorado.edu]
The University of Colorado at Boulder