[Kde-pim] using a spamfilter with an online IMAP account

Martin Steigerwald Martin at lichtvoll.de
Thu Dec 14 12:19:36 GMT 2006


Am Donnerstag 14 Dezember 2006 12:15 schrieb Martin Steigerwald:
> Am Montag 11 Dezember 2006 22:47 schrieb Martin Steigerwald:
> > With POP3 I use an UNSURE foldern instead. I mark mails in there
> > either as spam or ham. The spam mails are moved to the spam folder
> > immediately, the ham mails remain in the UNSURE folder unless I
> > select them an rerun filter rules manually (press Ctrl-J in german
> > locale). This works reasonably well.
>
> Hello,
>
> there seems to be one major difference: On my POP3 KMail setup a

Hello, sorry for replying to myself again...

just hoping that somone finds time to follow my thoughts and give feedback 
on them...

I now looked deeper into the filter rules and it seems KMail works as 
follows:

When I train a message as Spam or Nonspam it just executes the spamfilter 
with the mail, but does not process the output of the spamfilter 
("Execute command"). Only the spam check pipes the mail through the 
spamfilter.

So this is how its supposed to work:

1) I train a mail from spam or unsure folders
2) I refilter it again manually. Now the spamfilter check runs again and 
the spamfilter should change the headers approbiately. I tested 
mailreaver.crm on the command line and it does so. Now KMail has the mail 
with the changed filter cause the spamfilter check filter uses "Pipe 
through command" and it will filter this one...

Step 2 is what only seems to work with my KMail POP3 CRM114 setup using 
Debian Package 4:3.5.5.dfsg.1-2. 

It does not seem to work with KMail IMAP CRM114 setup with KMail 1.9.1 
(KDE 3.5.1) on SUSE 10.1. Mails do not get changed headers after I 
refilter them and thus are put into the UNSURE folder again. Tested with 
filters fresh from the spamfilter wizard...

Ok, there are the KMail POP3 CRM filter rules that work nicely:

[Filter #0]
Applicability=1
AutomaticName=false
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=false
accounts-set=
action-args-0=crm -u ~/.crm114 mailreaver.crm
action-name-0=filter app
actions=1
apply-on=check-mail,manual-filtering
contentsA=262144
contentsB=deepdance.lichtvoll.de
fieldA=<size>
fieldB=To
funcA=less-or-equal
funcB=contains-not
name=crm114: Auf Spam prÃŒfen
operator=and
rules=2

[Filter #1]
Applicability=1
AutomaticName=false
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=true
accounts-set=
action-args-0=.trash.directory/Spam
action-args-1=P
action-name-0=transfer
action-name-1=set status
actions=2
apply-on=check-mail,manual-filtering
contentsA=SPAM.*
contentsB=^[2345]
fieldA=X-CRM114-Status
fieldB=X-GMX-Antispam
funcA=regexp
funcB=regexp
name=crm114: Spam ausfiltern
operator=or
rules=2

[Filter #2]
Applicability=1
AutomaticName=false
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=true
accounts-set=
action-args-0=.trash.directory/Unsicher
action-name-0=transfer
actions=1
apply-on=check-mail,manual-filtering
contentsA=UNSURE
fieldA=X-CRM114-Status
funcA=contains
name=crm114: Unsicher ausfiltern
operator=or
rules=1

[Filter #3]
Applicability=1
AutomaticName=false
ConfigureShortcut=true
ConfigureToolbar=true
Icon=mail_spam
StopProcessingHere=true
accounts-set=
action-args-0=P
action-args-1=crm -u /home/martin/.crm114 mailreaver.crm --spam
action-args-2=.trash.directory/Spam
action-name-0=set status
action-name-1=execute
action-name-2=transfer
actions=3
apply-on=
contentsA=0
fieldA=<size>
funcA=greater-or-equal
name=crm114: Als SPAM klassifizieren
operator=and
rules=1

[Filter #4]
Applicability=1
AutomaticName=false
ConfigureShortcut=true
ConfigureToolbar=true
Icon=mail_ham
StopProcessingHere=true
accounts-set=
action-args-0=H
action-args-1=crm -u /home/martin/.crm114 mailreaver.crm --good
action-name-0=set status
action-name-1=execute
actions=2
apply-on=
contentsA=0
fieldA=<size>
funcA=greater-or-equal
name=crm114: Als Nicht-SPAM klassifizieren
operator=and
rules=1

Here is the KMail IMAP CRM114 on that SUSE 10.1 installation... these 
don't work:

[Filter #0]
Applicability=0
AutomaticName=true
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=false
accounts-set=
action-args-0=crm -u $HOME/.crm114 mailreaver.crm
action-name-0=filter app
actions=1
apply-on=check-mail,manual-filtering
contentsA=256000
fieldA=<size>
funcA=less-or-equal
name=CRM114 Check
operator=and
rules=1

[Filter #1]
Applicability=0
AutomaticName=true
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=true
accounts-set=
action-args-0=.trash.directory/Spam
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=SPAM
fieldA=X-CRM114-Status
funcA=contains
name=SPAM-BekÀmpfung
operator=or
rules=1

[Filter #2]
Applicability=0
AutomaticName=true
ConfigureShortcut=false
ConfigureToolbar=false
Icon=
StopProcessingHere=true
accounts-set=
action-args-0=.trash.directory/Unsicher
action-name-0=transfer
actions=1
apply-on=check-mail,manual-filtering
contentsA=UNSURE
fieldA=X-CRM114-Status
funcA=contains
name=Behandlung von vermutetem Spam
operator=or
rules=1

[Filter #3]
Applicability=0
AutomaticName=true
ConfigureShortcut=true
ConfigureToolbar=true
Icon=mail_spam
StopProcessingHere=true
accounts-set=
action-args-0=P
action-args-1=crm -u $HOME/.crm114 mailreaver.crm --spam
action-args-2=.trash.directory/Spam
action-name-0=set status
action-name-1=execute
action-name-2=transfer
actions=3
apply-on=
contentsA=0
fieldA=<size>
funcA=greater-or-equal
name=Als SPAM klassifizieren
operator=and
rules=1

[Filter #4]
Applicability=0
AutomaticName=true
ConfigureShortcut=true
ConfigureToolbar=true
Icon=mail_ham
StopProcessingHere=true
accounts-set=
action-args-0=H
action-args-1=crm -u $HOME/.crm114 mailreaver.crm --good
action-name-0=set status
action-name-1=execute
actions=2
apply-on=
contentsA=0
fieldA=<size>
funcA=greater-or-equal
name=Als Nicht-SPAM klassifizieren
operator=and
rules=1

Any hints?

I will try a bit more this afternoon, after I wrote the rest of the text 
of my article. To bad the closing date for this article is soo soon ;(.

Regards,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7
_______________________________________________
kde-pim mailing list
kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/



More information about the kde-pim mailing list