• # à propos du spam

    Posté par (site web personnel, Mastodon) . En réponse à la dépêche Sylpheed-Claws 2.5.0 est sorti !. Évalué à 3.

    comme tout le monde j'en ai marre du spam/pourriel, et j'ai trouvé une méthode qui m'a fait passer de sylpheed à sylpheed-claws (alors que je trouve sylpheed plus joli et plus sobre, pour l'usage que j'en ai, mais qui n'a pas le support mbox, cf infra).

    voici la méthode:
    - je récupère mon courrier via fetchmail, avec un ~/.fetchmailrc du style (pensez à faire un chmod 600 ~/.fetchmailrc):

    poll mon.serveur.pop proto POP3 user "mon-compte-pop" pass "mot-de-passe" is "mon-compte-linux" here mda "/usr/bin/procmail -d %s"

    et une entrée dans la crontab du genre:

    0,15,30,45 * * * * /usr/bin/fetchmail -s -f ~/.fetchmailrc

    - le courrier est filtré et passé à spamassassin via procmail avec un ~/.procmailrc qui ressemble à ça:

    # Any spam found by spamassassin is put into the Sylpheed spam MH directory,
    # i.e. $HOME/Mail/spam. Everything else is delivered like normal.
    #
    SHELL=/bin/bash
    # MAILDIR=$HOME/Mail
    # DEFAULT=inbox/.
    LOGFILE=$HOME/.procmaillog
    VERBOSE=yes

    # Pipe the mail through spamassassin (replace 'spamassassin' with
    # 'spamc' if you use the spamc/spamd combination)
    #
    # The condition line ensures that only messages smaller than 250 kB
    # (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
    # isn't bigger than a few k and working with big messages can bring
    # SpamAssassin to its knees.
    #
    # The lock file ensures that only 1 spamassassin invocation happens
    # at 1 time, to keep the load down.
    #
    :0fw: spamassassin.lock
    * < 256000
    | /usr/bin/spamassassin

    # Mails with a score of 15 or higher are almost certainly spam (with
    # 0.05% false positives according to rules/STATISTICS.txt). Let's put
    # them in a different mbox. (This one is optional.)
    :0:
    * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
    $HOME/Mail/spam/.

    # All mail tagged as spam (eg. with a score higher than the set
    # threshold) is moved to "probably-spam".
    :0:
    * ^X-Spam-Status: Yes
    $HOME/Mail/spam/.

    # Work around procmail bug: any output on stderr will cause the "F" in
    # "From" to be dropped. This will re-add it.
    :0
    * ^^rom[ ]
    {
    LOG="*** Dropped F off From_ header! Fixing up. "

    :0 fhw
    | sed -e '1s/^/F/'
    }

    ce qui a pour effet de placer le spam directement dans ~/Mail/spam et de laisser le reste dans ma mbox

    - enfin, j'utilise le notificateur de courrier de Xfce configuré pour vérifier un compte mbox local: http://spuriousinterrupt.org/projects/mailwatch

    Avantages:
    - le courrier est récupéré régulièrement de façon automatisée
    - le notificateur ne m'informe que du courrier non-spam
    - sylpheed-claws (configuré avec un compte mbox) récupère le courrier en local
    - le spam est traité en amont et son filtrage ne ralentit pas sylpheed-claws
    - le courrier est consultable facilement en ligne de commande, et sous console, biff me previent du nouveau courrier

    bref, j'aimerait bien le support mbox pour retourner à sylpheed