KMail Filters

Alexander Nordström alexander.nordstromNOSPAM at tpg.com.au
Sun May 9 21:25:37 BST 2004


On Monday, 10 May 2004 03:50, Stephan Matthiesen wrote:
> it should be:
> "<Message body>" contains regular expression
> "Content-Disposition: attachment; filename=.*.pif"
>
> (use regular expression, and note the . before the *)

Also note that using regular expressions on the whole message body is a Bad 
Idea if you intend to apply filters on entire folders or if you receive large 
amounts of messages at a time. The good news is that Content-Disposition is a 
header which you can manually enter in the first field of the filter rule (I 
haven't verified it with this particular header though).

There may also be a newline followed by some whitespace after attachment; so 
that gives us something like:

Content-Disposition
matches regular expression
attachment;\s*filename=.*\.(exe|pif)

(Meaning attachment; followed by any whitespace \s including newline, repeated 
any number of times * followed by filename=, any character except newline any 
number of times .* followed by a period \. followed by either exe or pif.)

-- 
Alex Nordstrom
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list