LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to create filter in KMail on "No Subject" messages (http://www.linuxquestions.org/questions/linux-software-2/how-to-create-filter-in-kmail-on-no-subject-messages-590457/)

Eric_Cartman 10-09-2007 03:44 AM

How to create filter in KMail on "No Subject" messages
 
Hi all,
From some time I am having strange experience with my mail client.I am receiving messages with No Subject,date 1.1.1970,no sender,etc.Absolutely weird :) All of them are comming from my yahoo.com mail account.When I check the web based mail,the is empty box,and right after that when I check the same box with KMail I received those messages.

How I can get rid of them?How to create filter on No Subject or date?

Thanks in advance!

I am using Mandriva 2007.0,KMail 1.9.4.

matthewg42 10-09-2007 09:41 PM

You have several options. To empty subjects try this

Code:

Subject matches regular expression  ^ *$
Don't forget the space between the ^ and the *. ^ means start of string, a space means a space. The * means the previous part (space) 0 or more times, and the $ means the end of the string. In short, match where the subject contains zero or more spaces.

For the date you could try
Code:

<age in days> is greater than 365
...which will zap anything older than a year. There shouldn't any new mail arriving dates more than that.

Either of those will do, or you could have an AND rule... depends what you want.

Eric_Cartman 10-10-2007 12:11 PM

Thanks a lot,matthewg42!
I applied both filters and they seems working.I am wondering if the No subject filter will block useful mail,that have No subject or Space between words in subject title?
Thanks again

matthewg42 10-10-2007 12:50 PM

Quote:

Originally Posted by Eric_Cartman (Post 2919817)
Thanks a lot,matthewg42!
I applied both filters and they seems working.I am wondering if the No subject filter will block useful mail,that have No subject or Space between words in subject title?
Thanks again

If you have just the no subject filter, then it will catch all subjects with no subject. If you combine it with the two into one rule then it will only trigger when both conditions are met. See this screenshot, note the area I have highlighted in blue. You should fill in the action according to whenever you want to do to these messages, such as move them to a spam folder, or delete them or whatever.

The regular expression will not trigger when there are spaces and other characters in the subject - the ^ and $ mean th beginning and end of the field, and between then only are mentioned spaces (0 or more spaces) - if there are any other characters it will not match.

Eric_Cartman 10-11-2007 01:59 AM

Thanks again!This is actually what I did.
Have a good one!

Georgi Stoynev


All times are GMT -5. The time now is 09:50 PM.