(*** This bug was imported into bugs.kde.org ***) Package: kmail Version: 2.1 (using KDE 2.1.1 ) Severity: wishlist Installed from: Other Compiler: gcc 2.95-3 OS: Linux OS/Compiler notes: Not Specified I'd really love the ability to filter out spam by saying- if the message isn't from someone in my address book ... then do - (Submitted via bugs.kde.org)
*** Bug 48279 has been marked as a duplicate of this bug. ***
*** Bug 44764 has been marked as a duplicate of this bug. ***
I'd just like to add that i would love this feature too, with a few extra features. -- the ability to group people in my adress book -- then the ability to filter based on whether a mail matches one person or a group of people in my addressbook. this would move a lot of the work for the filtering i do at the moment over to the addressbook, and seems a lot more intuitive. great work on the filters btw.
I'd just like to add that i would love this feature too, with a few extra features. the ability to group people in my adress book then the ability to filter based on whether a mail matches one person or a group of people in my addressbook. this would move a lot of the work for the filtering i do at the moment over to the addressbook, and seems a lot more intuitive. great work on the filters btw. (this form strips double dashes so i'm resubmitting, sorry)
hi, that would DEFINITIVELY be GREAT features !! I'd love to be able to create groups of people/mailing lists in my adress book. Further it would be wonderfull to be able to create filters based on people/groups Best regards and THANKS A LOT for the great work yall do Tarax
This would be a VERY useful feature.
I'm not sure of the history of this as it is noted as "imported into bugs...", it is 2 and a half years old, references a version that is higher than the current [if "2.1" can be believed (?) ] and duplicates one of the items I mentioned in bug 54984 [item 4b: match against address book and/or distro lists] so my guess is that this is a popular item :)
*** Bug 72762 has been marked as a duplicate of this bug. ***
i just want to say, that this feature should be included. if it matches with my adressbook, stop filtering and move this mail into a specified folder.
As long as this feature is not implemented, I would like to propose a temporary solution that works fine for me. I attached a bash script which I use to pipe through incoming e-mails. It adds an "X-In-Addressbook-Or-Recent"-Tag to the e-mail header with "Yes" if the From-e-mail-address is found in the address book or in the list of recent e-mail receivers located in the kmail configuration file, otherwise with "No". In my kmail configuration, this filter is applied to all incoming e-mails; filters following it can use the tag then. In my case, I let kmail mark the mail as important and then end the filtering, so that mails from known people are not piped through spamassassin. I'm a relatively new user to Linux, so this script could probably be written more elegant (especially with better from-e-mail-reg-exps), and I don't provide any guarantee that it will work, or that it won't destroy e-mails. So before you try it, make a back up of your data. Anyway, I've been using it for some time and didn't have problems. The X-Tag is always added below the "From"-Header; I don't know if this is conflicting with the specifications of an e-mail header, but it didn't do damage to my e-mail processing in kmail. Based on this position of the header line, the script also supports filtering mails again without writing the X-tag twice. So here it is. You might need to adjust the paths. Once again, the usual way to use it would be to create a filter piping the mail through this script and then a filter with the following criteria: "X-In-Addressbook-Or-Recent" contains "Yes" #!/bin/bash IFS=" " KABC_VCF_PATH="$HOME/.kde/share/apps/kabc/std.vcf" KMAILRC_PATH="$HOME/.kde/share/config/kmailrc" TAGNAME="X-In-Addressbook-Or-Recent:" fromHeaderFound=0 while read line do echo $line if [[ $fromHeaderFound = "0" ]]; then if [ ${line:0:6} = "From: " ]; then # Check for e-mail address in < > emailAddress=`expr "$line" : '.*<\(.*\)>.*'` # If not found, check for standalone e-mail address if [ ${#emailAddress} = "0" ]; then emailAddress=`expr "$line" : 'From:\ \(.*\)'` fi # Only add tag if e-mail address could be read if [ ! ${#emailAddress} = "0" ]; then # Check for e-mail address in address book grep -i "$emailAddress" "$KABC_VCF_PATH" > /dev/null if [ $? = "0" ]; then echo "${TAGNAME} Yes" else # Check for e-mail address in recent list grep -i "$emailAddress" "$KMAILRC_PATH" > /dev/null if [ $? = "0" ]; then echo "${TAGNAME} Yes" else echo "${TAGNAME} No" fi fi fi fromHeaderFound="1" # Only write next line if it is not an old X-Tag read line if [ ! ${line:0:${#TAGNAME}} = "${TAGNAME}" ]; then echo $line fi fi fi done
There is a bug in my script (see last comment) that Jochen Puchalla fortunately informed me about. In the "echo $line" commands, I forgot to put $line into quotes, so if there are special characters like * in incoming mails, they will be interpreted by the shell. With *, this makes your home directory appear in mails from other people - not quite a nice experience. So if you're using my script, please correct this by either replacing the two lines with echo $line by echo "$line" or just copy and paste the new version below. I included spaces instead of tabs this time, so maybe it will even be indented in the comment view ;-). #!/bin/bash IFS=" " KABC_VCF_PATH="$HOME/.kde/share/apps/kabc/std.vcf" KMAILRC_PATH="$HOME/.kde/share/config/kmailrc" TAGNAME="X-In-Addressbook-Or-Recent:" fromHeaderFound=0 while read line do echo "$line" if [[ $fromHeaderFound = "0" ]]; then if [ ${line:0:6} = "From: " ]; then # Check for e-mail address in < > emailAddress=`expr "$line" : '.*<\(.*\)>.*'` # If not found, check for standalone e-mail address if [ ${#emailAddress} = "0" ]; then emailAddress=`expr "$line" : 'From:\ \(.*\)'` fi # Only add tag if e-mail address could be read if [ ! ${#emailAddress} = "0" ]; then # Check for e-mail address in address book grep -i "$emailAddress" "$KABC_VCF_PATH" > /dev/null if [ $? = "0" ]; then echo "${TAGNAME} Yes" else # Check for e-mail address in recent list grep -i "$emailAddress" "$KMAILRC_PATH" > /dev/null if [ $? = "0" ]; then echo "${TAGNAME} Yes" else echo "${TAGNAME} No" fi fi fi fromHeaderFound="1" # Only write next line if it is not an old X-Tag read line if [ ! ${line:0:${#TAGNAME}} = "${TAGNAME}" ]; then echo "$line" fi fi fi done
*** Bug 76561 has been marked as a duplicate of this bug. ***
two features are in kdepim cvs now and will be in kdepim-3.3: - filter messages of which the sender is in the addressbook - filter messages of which the sender is in a certain category (group) of the addressbook.
reset invalid values in Version field to "unspecified"