This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KMail IMAP spam filtering not working

Tags: None
(comma "," separated)
User avatar
Michael
Registered Member
Posts
92
Karma
0
OS

KMail IMAP spam filtering not working

Wed Nov 05, 2008 10:32 am
I got got BogoFilter installed and configured in the Anti-Spam wizard. Although I can classify a mail as spam with the button and it is moved to the appropriate folder, it does not happen automatically after the emails are downloaded.

I use disconnected IMAP and tried to send the spam mails to local folders and IMAP folders to, but neither works automatically.

Any suggestions?


Michael, proud to be a member of KDE forums since 2008-Oct. / KaOS Linux user
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
This is because IMAP filters do not work correctly at the moment. I believe there is already a bug on bugs.kde.org about this, which might hold more information.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Michael
Registered Member
Posts
92
Karma
0
OS
bcooksley wrote:This is because IMAP filters do not work correctly at the moment. I believe there is already a bug on bugs.kde.org about this, which might hold more information.


Thanks, I could not find the bug over bugs.kde.org, but I assume it was my fault. I hope they will fix it soon.


Michael, proud to be a member of KDE forums since 2008-Oct. / KaOS Linux user
User avatar
Michael
Registered Member
Posts
92
Karma
0
OS
bcooksley wrote:This is because IMAP filters do not work correctly at the moment. I believe there is already a bug on bugs.kde.org about this, which might hold more information.



Hmm, filtering now works...


Michael, proud to be a member of KDE forums since 2008-Oct. / KaOS Linux user
Dinth
Registered Member
Posts
68
Karma
0
Unfortunately they dont (ive tested 4.2.1, 4.2.0, 4.1.0, 4.0.0 and some 4.x.x betas). And unfortunately i couldnt find any response from KDE community to make it work - no bug on bugzilla (ive wrote first), one topic on forum, some threads on usenet, but in all of them response is the same - "use ctrl+j to filter manualy each message". Nice if somebody recives 3 emails a day, but if someone gets more than hundred a day on each of his three email accounts, it stops beight funny :(
Also i dont think that making this work would be so hard - all other email klients (GTK+) which ive tested haven't any problems with this.
Im so desperate, that im starting to think about some donation for anybody who will
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Does your Spam filter appear in KMail > Settings > Configure Filters?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Dinth
Registered Member
Posts
68
Karma
0
bcooksley wrote:Does your Spam filter appear in KMail > Settings > Configure Filters?


Ive got 4 filters there: Bogomail check, spam detection, mark as spam, mark as not-spam, all created by antispam wizard (sory if names aren't exacly as in english locale)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
In the advanced tabs of both Bogomail check and Spam detection in the Configure filters dialog, are the desired accounts correctly selected? If they are not there, you may have to reconfigure KMail with a disconnected IMAP account.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
HKL
Registered Member
Posts
1
Karma
0
I have testet the new version of KMail 1.11.1: (OS 11.1 - KDE4.2.1)
I have the same problem how it's describe obove.
All activated filter in my IMAP box can only shifted with manually email adress. That is never acceptable. In Thunderbird this function ist automatical in action since long time.

Craetings

HLK

Last edited by HKL on Sat Mar 07, 2009 12:42 pm, edited 1 time in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Given the way IMAP ( server side data ) works, you might find that Disconnected IMAP has a higher chance of working with Filtering.

Last edited by bcooksley on Sat Mar 07, 2009 1:03 pm, edited 1 time in total.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Dinth
Registered Member
Posts
68
Karma
0
That is difference between IMAP and disconnected IMAP account types besides that disconnected IMAP work offline ?
Dinth
Registered Member
Posts
68
Karma
0
Ive tried with "Disconnected IMAP" accounts type and still i cannot force Kmail to filter my incoming mail.
Here is kmail export of my filters:
Code: Select all
[Filter #0]
Applicability=0
AutomaticName=false
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=true
ToolbarName=:
accounts-set=
action-args-0=.272574229.directory/.INBOX.directory/wp-hackers
action-name-0=transfer
actions=1
apply-on=check-mail,manual-filtering
contentsA=
fieldA=List-Post
funcA=contains
name=:
operator=and
rules=1

[Filter #1]
Applicability=0
AutomaticName=false
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=true
ToolbarName=: [Seriale telewizyjne | Heroes, Battlestar Galactica, Stargate Atlantis, Dr. House, Gotowe na wszystko, Lost, Prison Break i inne] has a new user
accounts-set=
action-args-0=.272574229.directory/.INBOX.directory/centrumseriali
action-name-0=transfer
actions=1
apply-on=check-mail,manual-filtering
contentsA=[Seriale telewizyjne | Heroes, Battlestar Galactica, Stargate Atlantis, Dr. House, Gotowe na wszystko, Lost, Prison Break i inne] has a new user
fieldA=Subject
funcA=contains
name=: [Seriale telewizyjne | Heroes, Battlestar Galactica, Stargate Atlantis, Dr. House, Gotowe na wszystko, Lost, Prison Break i inne] has a new user
operator=and
rules=1

[Filter #2]
Applicability=0
AutomaticName=true
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=true
ToolbarName=:root@mobione.pl
accounts-set=
action-args-0=.272574229.directory/.INBOX.directory/mobione
action-name-0=transfer
actions=1
apply-on=check-mail,manual-filtering
contentsA=root@mobione.pl
contentsB=webmaster@mobione.pl
fieldA=From
fieldB=From
funcA=contains
funcB=contains
name=:root@mobione.pl
operator=and
rules=2

[Filter #3]
Applicability=0
AutomaticName=false
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=false
ToolbarName=Bogofilter Check
accounts-set=
action-args-0=bogofilter -p -e
action-name-0=filter app
actions=1
apply-on=check-mail,manual-filtering
contentsA=256000
fieldA=
funcA=less-or-equal
name=Bogofilter Check
operator=and
rules=1

[Filter #4]
Applicability=0
AutomaticName=false
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=true
ToolbarName=Wykrywanie spamu
accounts-set=
action-args-0=trash
action-args-1=P
action-args-2=R
action-name-0=transfer
action-name-1=set status
action-name-2=set status
actions=3
apply-on=check-mail,manual-filtering
contentsA=(yes)|(spam\b)
fieldA=X-Bogosity
funcA=regexp
name=Wykrywanie spamu
operator=or
rules=1

[Filter #5]
Applicability=0
AutomaticName=false
ConfigureShortcut=true
ConfigureToolbar=true
Icon=mail-mark-junk
StopProcessingHere=true
ToolbarName=Spam
accounts-set=
action-args-0=P
action-args-1=bogofilter -s
action-args-2=trash
action-name-0=set status
action-name-1=execute
action-name-2=transfer
actions=3
apply-on=
contentsA=0
fieldA=
funcA=greater-or-equal
name=Oznacz jako spam
operator=and
rules=1

[Filter #6]
Applicability=0
AutomaticName=false
ConfigureShortcut=true
ConfigureToolbar=true
Icon=mail-mark-notjunk
StopProcessingHere=true
ToolbarName=Nie spam
accounts-set=
action-args-0=H
action-args-1=bogofilter -n
action-name-0=set status
action-name-1=execute
actions=2
apply-on=
contentsA=0
fieldA=
funcA=greater-or-equal
name=Oznacz jako nie-spam
operator=and
rules=1

[General]
filters=7


Here are intresting parts from my kmailrc:
Code: Select all
[Account 272574229]
0=""
Folder=
Id=272574229
Name=xxx@xxx.h.pl #1
Namespace:=.
Type=Imap
auth=*
auto-expunge=true
check-exclude=false
check-interval=5
hidden-folders=false
host=xxx.pl
identity-id=1609787456
listOnlyOpenFolders=false
loadondemand=true
locally-subscribed-folders=false
locallyUnsubscribedFolders=
login=xxx@xxx.pl
port=993
sieve-alternate-url=
sieve-port=2000
sieve-reuse-config=true
sieve-support=false
sieve-vacation-filename=kmail-vacation.siv
store-passwd=true
subscribed-folders=false
trash=trash
use-default-identity=true
use-ssl=true
use-tls=false

(...)

[Filter #0]
Applicability=0
AutomaticName=true
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=true
ToolbarName=:
accounts-set=
action-args-0=.272574229.directory/.INBOX.directory/wp-hackers
action-name-0=transfer
actions=1
apply-on=check-mail,manual-filtering
contentsA=
fieldA=List-Post
funcA=contains
name=:
operator=and
rules=1

[Filter #1]
Applicability=0
AutomaticName=false
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=true
ToolbarName=: [Seriale telewizyjne | Heroes, Battlestar Galactica, Stargate Atlantis, Dr. House, Gotowe na wszystko, Lost, Prison Break i inne] has a new user
accounts-set=
action-args-0=.272574229.directory/.INBOX.directory/centrumseriali
action-name-0=transfer
actions=1
apply-on=check-mail,manual-filtering
contentsA=[Seriale telewizyjne | Heroes, Battlestar Galactica, Stargate Atlantis, Dr. House, Gotowe na wszystko, Lost, Prison Break i inne] has a new user
fieldA=Subject
funcA=contains
name=: [Seriale telewizyjne | Heroes, Battlestar Galactica, Stargate Atlantis, Dr. House, Gotowe na wszystko, Lost, Prison Break i inne] has a new user
operator=and
rules=1

[Filter #2]
Applicability=0
AutomaticName=false
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=true
ToolbarName=:root@mobione.pl
accounts-set=
action-args-0=.272574229.directory/.INBOX.directory/mobione
action-name-0=transfer
actions=1
apply-on=check-mail,manual-filtering
contentsA=root@mobione.pl
contentsB=webmaster@mobione.pl
fieldA=From
fieldB=From
funcA=contains
funcB=contains
name=:root@mobione.pl
operator=and
rules=2

[Filter #3]
Applicability=0
AutomaticName=false
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=false
ToolbarName=Bogofilter Check
accounts-set=
action-args-0=bogofilter -p -e
action-name-0=filter app
actions=1
apply-on=check-mail,manual-filtering
contentsA=256000
fieldA=
funcA=less-or-equal
name=Bogofilter Check
operator=and
rules=1

[Filter #4]
Applicability=0
AutomaticName=false
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=true
ToolbarName=Wykrywanie spamu
accounts-set=
action-args-0=trash
action-args-1=P
action-args-2=R
action-name-0=transfer
action-name-1=set status
action-name-2=set status
actions=3
apply-on=check-mail,manual-filtering
contentsA=(yes)|(spam\b)
fieldA=X-Bogosity
funcA=regexp
name=Wykrywanie spamu
operator=or
rules=1

[Filter #5]
Applicability=0
AutomaticName=false
ConfigureShortcut=true
ConfigureToolbar=true
Icon=mail-mark-junk
StopProcessingHere=true
ToolbarName=Spam
accounts-set=
action-args-0=P
action-args-1=bogofilter -s
action-args-2=trash
action-name-0=set status
action-name-1=execute
action-name-2=transfer
actions=3
apply-on=
contentsA=0
fieldA=
funcA=greater-or-equal
name=Oznacz jako spam
operator=and
rules=1

[Filter #6]
Applicability=0
AutomaticName=false
ConfigureShortcut=true
ConfigureToolbar=true
Icon=mail-mark-notjunk
StopProcessingHere=true
ToolbarName=Nie spam
accounts-set=
action-args-0=H
action-args-1=bogofilter -n
action-name-0=set status
action-name-1=execute
actions=2
apply-on=
contentsA=0
fieldA=
funcA=greater-or-equal
name=Oznacz jako nie-spam
operator=and
rules=1

[Folder-.272574229.directory/.INBOX.directory/centrumseriali]
Compactable=true
ContentsType=0
ExpireAction=Delete
ExpireMessages=false
ExpireToFolder=
FolderSize=-1
Id=1006032490
IgnoreNewMail=false
ImapPath=/INBOX.centrumseriali/
MailingListArchiveAddress=
MailingListEnabled=false
MailingListFeatures=0
MailingListHandler=0
MailingListHelpAddress=
MailingListId=
MailingListPostingAddress=
MailingListSubscribeAddress=
MailingListUnsubscribeAddress=
MainFolderViewItemDnDSortingKey=-1
MainFolderViewItemIsExpanded=false
MainFolderViewItemIsHidden=false
MainFolderViewItemIsSelected=false
NoContent=false
NormalIconPath=
PermanentFlags=95
PutRepliesInSameFolder=false
ReadExpireAge=3
ReadExpireUnits=3
ReadOnly=false
SystemLabel=
TotalMsgs=410
UidValidity=1233844123
UnreadExpireAge=12
UnreadExpireUnits=0
UnreadIconPath=
UnreadMsgs=0
UploadAllFlags=false
UseCustomIcons=false
UseDefaultIdentity=true
WhoField=
checkmail=true
htmlLoadExternalOverride=false
htmlMailOverride=false

[Folder-.272574229.directory/.INBOX.directory/mobione]
Compactable=true
ContentsType=0
ExpireAction=Delete
ExpireMessages=false
ExpireToFolder=
FolderSize=-1
Id=1751544406
IgnoreNewMail=false
ImapPath=/INBOX.mobione/
MailingListArchiveAddress=
MailingListEnabled=false
MailingListFeatures=0
MailingListHandler=0
MailingListHelpAddress=
MailingListId=
MailingListPostingAddress=
MailingListSubscribeAddress=
MailingListUnsubscribeAddress=
MainFolderViewItemDnDSortingKey=-1
MainFolderViewItemIsExpanded=false
MainFolderViewItemIsHidden=false
MainFolderViewItemIsSelected=false
NoContent=false
NormalIconPath=
PermanentFlags=95
PutRepliesInSameFolder=false
ReadExpireAge=3
ReadExpireUnits=3
ReadOnly=false
SystemLabel=
TotalMsgs=1328
UidValidity=1233843678
UnreadExpireAge=12
UnreadExpireUnits=0
UnreadIconPath=
UnreadMsgs=0
UploadAllFlags=false
UseCustomIcons=false
UseDefaultIdentity=true
WhoField=
checkmail=true
htmlLoadExternalOverride=false
htmlMailOverride=false

[Folder-.272574229.directory/.INBOX.directory/wp-hackers]
Compactable=true
ContentsType=0
ExpireAction=Delete
ExpireMessages=false
ExpireToFolder=
FolderSize=-1
Id=1315457531
IgnoreNewMail=false
ImapPath=/INBOX.wp-hackers/
MailingListArchiveAddress=
MailingListEnabled=false
MailingListFeatures=0
MailingListHandler=0
MailingListHelpAddress=
MailingListId=
MailingListPostingAddress=
MailingListSubscribeAddress=
MailingListUnsubscribeAddress=
MainFolderViewItemDnDSortingKey=-1
MainFolderViewItemIsExpanded=false
MainFolderViewItemIsHidden=false
MainFolderViewItemIsSelected=false
NoContent=false
NormalIconPath=
PermanentFlags=95
PutRepliesInSameFolder=false
ReadExpireAge=3
ReadExpireUnits=3
ReadOnly=false
SystemLabel=
TotalMsgs=1065
UidValidity=1233843560
UnreadExpireAge=12
UnreadExpireUnits=0
UnreadIconPath=
UnreadMsgs=0
UploadAllFlags=false
UseCustomIcons=false
UseDefaultIdentity=true
WhoField=
checkmail=true
htmlLoadExternalOverride=false
htmlMailOverride=false

[Folder-.272574229.directory/INBOX]
Compactable=true
ContentsType=0
ExpireAction=Delete
ExpireMessages=false
ExpireToFolder=
FavoriteFolderViewItemDnDSortingKey=0
FavoriteFolderViewItemIsExpanded=false
FavoriteFolderViewItemIsHidden=false
FavoriteFolderViewItemIsSelected=true
FolderSize=-1
Id=81721463
IgnoreNewMail=false
ImapPath=/INBOX/
MailingListArchiveAddress=
MailingListEnabled=false
MailingListFeatures=0
MailingListHandler=0
MailingListHelpAddress=
MailingListId=
MailingListPostingAddress=
MailingListSubscribeAddress=
MailingListUnsubscribeAddress=
MainFolderViewItemDnDSortingKey=-1
MainFolderViewItemIsExpanded=true
MainFolderViewItemIsHidden=false
MainFolderViewItemIsSelected=true
NoContent=false
NormalIconPath=
PermanentFlags=2015
PutRepliesInSameFolder=false
ReadExpireAge=3
ReadExpireUnits=3
ReadOnly=false
SystemLabel=
TotalMsgs=2020
UidValidity=1230769427
UnreadExpireAge=12
UnreadExpireUnits=0
UnreadIconPath=
UnreadMsgs=0
UploadAllFlags=false
UseCustomIcons=false
UseDefaultIdentity=true
WhoField=
checkmail=true
htmlLoadExternalOverride=false
htmlMailOverride=false
[Folder-trash]
Compactable=true
ContentsType=0
ExpireAction=Delete
ExpireMessages=false
ExpireToFolder=
FolderSize=-1
Id=109106450
IgnoreNewMail=false
MailingListArchiveAddress=
MailingListEnabled=false
MailingListFeatures=0
MailingListHandler=0
MailingListHelpAddress=
MailingListId=
MailingListPostingAddress=
MailingListSubscribeAddress=
MailingListUnsubscribeAddress=
MainFolderViewItemDnDSortingKey=-1
MainFolderViewItemIsExpanded=false
MainFolderViewItemIsHidden=false
MainFolderViewItemIsSelected=false
NormalIconPath=
PutRepliesInSameFolder=false
ReadExpireAge=3
ReadExpireUnits=3
SystemLabel=
TotalMsgs=2055
UnreadExpireAge=12
UnreadExpireUnits=0
UnreadIconPath=
UnreadMsgs=1112
UseCustomIcons=false
UseDefaultIdentity=true
WhoField=
htmlLoadExternalOverride=false
htmlMailOverride=false


Last edited by Dinth on Sat Mar 07, 2009 8:13 pm, edited 1 time in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
It appears that at this time then unfortunately, you are affected by the broken filters in KMail. It will likely be fixed when KMail is rewritten to Akonadi, which will hopefully fix many of these bugs. I know that KMail filters do work with POP3 mail.

I am not sure, but I think there is a way to process entire folders, probably from the right click menu.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Dinth
Registered Member
Posts
68
Karma
0
Hmm so there are some people for which filtering of incoming imap folders work? So I suppose that this bug is related to a server configuration in some way? Am i right (because i have access to my dovecot configuration) ?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The bug is not related to server configuration. I do not know how Thunderbird filters the mail, but I suspect that it copies the new mail, in full complete with attachments to your local system for filtering ( which is not a good practice )

The difference between Disconnected IMAP and IMAP is that with Disconnected IMAP, a certain amount of data about mails is cached on the local system, while with IMAP it all happens directly on the server, nothing is saved by KMail.

You might be interested in IMAP Sieve scripts which should be able to provide spam filtering on the server side.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]