KMail and spam filters - KDE

This is a discussion on KMail and spam filters - KDE ; Is there any way to setup the spam filters to actually detect some spam? Does KMail notify them of my Spam mark, in case they are adaptive? I recently moved from Thunderbird to KMail, I find it superior in all ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: KMail and spam filters

  1. KMail and spam filters

    Is there any way to setup the spam filters to actually detect some spam?
    Does KMail notify them of my Spam mark, in case they are adaptive? I
    recently moved from Thunderbird to KMail, I find it superior in all aspects
    except the spam filtering, the spam detector (GMX antispam, whatever that
    is) might as well not be there.


  2. Re: KMail and spam filters

    Xenofon wrote:

    > Is there any way to setup the spam filters to actually detect some spam?
    > Does KMail notify them of my Spam mark, in case they are adaptive? I
    > recently moved from Thunderbird to KMail, I find it superior in all aspects
    > except the spam filtering, the spam detector (GMX antispam, whatever that
    > is) might as well not be there.


    I think the best way of filtering spam is with a powerful external spam
    filter called program Spamassasin..

    http://spamassassin.apache.org/downloads.cgi


    It's easy to set up Kmail to use the external filter..

    http://www.tomchance.org.uk/research/random/kmail

  3. Re: KMail and spam filters

    Xenofon wrote:

    > Is there any way to setup the spam filters to actually detect some spam?
    > Does KMail notify them of my Spam mark, in case they are adaptive? I
    > recently moved from Thunderbird to KMail, I find it superior in all
    > aspects except the spam filtering, the spam detector (GMX antispam,
    > whatever that is) might as well not be there.


    I got stuck on this one myself recently. KMail has a Wizard for Spam
    filtering (Tools->Anti-spam Wizard) and should detect any spam filtering
    software you have installed e.g. SpamAssassin, Bogofilter.
    Let the wizard handle things and it will create some additional filters for
    you - KMail will put them on the end of your current filters so, if you've
    set up loads already, scan to the end of the list. You may want to move the
    spam checking filters towards the top of your list.
    For SpamAssassin I set the spamd daemon running using the init.d script to
    speed up checking.
    If you've already got loads of emails and want to train SA try man sa_learn
    and run sa_learn in the CLI against your mails in the ~/Mail folder to
    train it to recognise spam and ham.
    - Alan
    --
    email =~ s/nospam\.//

  4. Re: KMail and spam filters

    I'm using spamassassin and kmail for a couple of months now, and I think
    it's superior to thunderbird. I've stopped using thunderbird now.

    You have to install spamassassin first and have the spamd daemon run in
    background. In gentoo : rc-update add spamd default.

    In Kmail, you create two filters : one to mark the spam, one to filter the
    spam. I've a third one to separate the mail with a high Bayes mark which
    were not marked as spam by spamassassin. This one is optional.
    -First filter : if size is below 100000 bytes (arbitrary) filter
    with /usr/bin/spamc.
    -Second filter : if X-Spam-Flag is equal to YES put in the spam diectory
    (that you have created), mark as read.

    You're done.

    -Third filter : if X-Spam-Status contains BAYES_99, send to BAYES_99
    directory (that you have created).

    Note : you have to configure the system-wide spamassassin config file
    in /etc/mail/spamassasin/local.cf and/or the local configuration file per
    user in ./spamassassin/user_prefs.
    Beware, the bayes filter works after only 200 spam by default. I changed it
    to 100. Train it with sa-learn --spam /maildirectory/spam. When the bayes
    filtering is trained, spamassassin efficiency goes from 5% unseen spam to
    around 1%. That means that in 100 spam messages, only 1 is not seen as
    spam. My received messages are 80% spam, that means in 1000 total received
    messages, 200 are useful, 800 are spam and 8 are unseen spam. 8 spam in 200
    useful messages, that's quite low.

    Here are my config files (I also use pyzor) :


    local.cf


    # This is the right place to customize your installation of SpamAssassin.
    #
    # See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
    # tweaked.
    #
    ################################################## #########################
    #
    allow_user_rules 1


    user_prefs


    # SpamAssassin user preferences file. See 'perldoc
    Mail::SpamAssassin::Conf'
    # for details of what can be tweaked.
    ################################################## #########################
    #Bayesian filter training
    bayes_min_ham_num 100
    bayes_min_spam_num 100

    # How many hits before a message is considered spam
    required_hits 4.0

    #By setting this option, the header will be tagged with STRING to indicate
    that a message is spam
    rewrite_header Subject ----SPAM----

    # The subject lines of suspected spam will be tagged
    # rewrite_subject 1

    #encapsulate spam in an attachment
    report_safe 1

    # Enable the Bayes system
    use_bayes 1

    bayes_path /home/my_home_directory/.spamassassin

    # Enable or disable network checks

    skip_rbl_checks 0
    use_razor2 0
    use_dcc 0
    use_pyzor 1

    pyzor_options --homedir /home/anj/.spamassassin

    # Mail using languages used in these country codes will not be marked
    # as being possibly spam in a foreign language
    ok_languages en fr th

    # Mail using locales used in these country codes will not be marked
    # as being possibly spam in a foreign language
    ok_locales en th fr

    auto_whitelist_path /home/anj/.spamassassin/auto-whitelist
    auto_whitelist_file_mode 0666


+ Reply to Thread